Not answering your question exactly, but since you noted that the aliases are empty GetHostEntry - the Dns.GetHostByName and Dns.Resolve methods do sort sorting of the aliases .
It gives what you can call a stupidly incomplete list of aliases - as far as I can tell, it only adds an alias if the search was by name, and that name was an alias.
So basically, if the return host name is different from what you enter, then what you enter is an alias. The returned alias value has a fully qualified name. So this is really just a way to get the full alias name.
It should be noted that for Microsoft these methods are deprecated, like most methods in the Dns class.
See also stackoverflow posts
source share