An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
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