How do I alias a hostname in windows?

Solution 1:

HOSTS is only for giving names to IP addresses. So you can so something like:

10.1.1.2 Computer.domain.com Alias1 Alias99

And with that you could ping 10.1.1.2 by "computer.domain.com" "alias1" or "alias99".

But you can't do

Computer Alias1 Alias99

To do it by host names only (I.E. the target host is on a dynamic IP), then you need a DNS server (assuming dynamic IP on target host, then you'll need one that keeps up to date with the host's changing IP).

In the DNS server you'd set alias entries ("CNAME" records) that point to the target machine's Host entry ("A" record).