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

I'm on my localhost PC. I need to add an entry that maps our public site to our dev server.

I tried several things with no luck: // where the IP here is our internal dev server or devserver devserver

I'm not sure what I'm doing wrong here.

share|improve this question
up vote 2 down vote accepted

Remember that is different than, so make sure to include the full domain name in the host file. Also your browser and OS will cache dns responses, so you may need to clear the browser cache and run ipconfig -flushdns on the command line before the host file response starts working.

share|improve this answer
I just don't know which above that I tried is the correct syntax. Thanks. – MSSucks Apr 26 '10 at 2:37
is it IP space domain name where IP is the Ip you want to point the domain name to? – MSSucks Apr 26 '10 at 2:37
Yes.. IP then space or tab then domain name. See – Greg Bray Apr 26 '10 at 16:59
Nice. I did not realize we registered our domain name with www or without the www and that made all the difference when specifying it in the hosts has to be the one you registered...include or not to include the www is where the problem lied. – MSSucks May 21 '10 at 16:30
Just fyi you still register, but in terms of DNS and Host files is different than Most people have them point to the same IP address or have one be a CNAME of the other, but just remember that they are not the same thing and the host file needs either entries for both or just one entry for whichever version you type into your browers. – Greg Bray May 21 '10 at 16:43

HI Coffee,

For the sake of being thorough, the "// where the IP here is our internal...etc." is not in the actual hosts file right?

Not sure if you are doing this already, but you you should ping "" after adding that line in your hostfile, if it responds from you know the hosts file is working and perhaps its a host header or other webserver issue that preventing it from displaying in your browser.

Cheers, iain

share|improve this answer
no the // was just for this post...showing a's not in the hosts file. – MSSucks Apr 26 '10 at 2:38

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.