Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Suppose points to IP address.

I want to be able to put in my Windows hosts file so that it goes to another IP address. I've defined it as such in the hosts file.

When I ping I still get and when I visit the URL, it still resolves the website on instead of from where I want,

share|improve this question
up vote 2 down vote accepted

Did you place your hosts file in: C:\Windows\System32\drivers\etc with this syntax:

share|improve this answer
Also, you must be administrator to save it, so if windows 7: Click Start – search for “Notepad“, right-click and select “Run as Administrator“ then open the hosts file – IT_Fixr Jun 29 '11 at 23:25
The actual issue was, I had to restart my computer. :-/ Strange but true. – FinalForm Jun 29 '11 at 23:42
That's a little odd, host file changes should take immediately. Though a cached DNS lookup may take precedence. Did you try ipconfig /flushdns ? – SpacemanSpiff Jun 30 '11 at 0:33
The hosts file should take effect immediately and entries in the hosts file should replace matching entries in the DNS resolver cache upon saving the hosts file. I'm pretty sure that running ipconfig/flushdns will preload the DNS resolver cache with entries from the hosts file along with clearing the DNS resolver cache of entries not contained in the hosts file. – joeqwerty Jun 30 '11 at 3:59

Perhaps the local resolver cache is queried first? Does running 'ipconfig /flushdns' perhaps resolve the issue?

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.