Is it possible to enter some sort of CNAME record or alias in the windows hosts file (C:\Windows\System32\drivers\etc\hosts)?

Basically I want to forward all requests made to host A to host B, without having to hard code the IP address (which changes frequently).


The windows hosts file supports only ip->name mappings, it does not support any other standard DNS record types. See here:


I would recommend running a simple dns server in order to do the redirect you are talking about. Try powerdns http://www.powerdns.com/


PowerDNS is not supported on Windows. I would recommend a tool such as "SimpleDNS" (14 day Trial) or "Technitium DNS Server" (free) which can be used to create a simple local DNS server.

Once you setup the program, you can create a zone and record for the CNAME you're trying to test and point your DNS server settings to only to test.

DNS Settings

I was able to use this to test TrafficManager and this looks to be the easiest way to do it on a Windows computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.