Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question
up vote 21 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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