you question is not clear. dns names just return an ipaddress. by default asp.net core does not check the host header (dns name used for request). In IIS the host header binding are at the site level.
in asp.net core you can write middleware to remap the url based on the host header. google for examples