How do I alias a hostname in windows?
Sophia Terry
Same question as How to alias a hostname?
but for windows, particularly windows 7
I don't want to specify an ip address (hosts file) just an alias so that \\mylaptop points to \\longcomputername and all programs will be able to find it should I use that dns
1 Answer
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).
2