Host File not working properly


Recommended Posts

I am trying to poison my host file to remap a domain of mine for development of my site on a new hosting partner.   I have opened up the host file in Administrator mode and made the change, and have saved it.

 

I then flushed my DNS, cleared my browser cache, history and closed it down.

 

Reloading the site in the now fresh browser and DNS cache, still resolves to my live site and not the new IP.

 

I am using Win 8.1.1 Pro.  I have done this in the past and have never had any issues up until now.  Any ideas?

 

 

 

 

Link to comment
Share on other sites

your doing it wrong would be my guess..  What are you putting in the host file?

 

So ran notepad as admin, opened up windows\system32\drivers\etc\host

 

put in new IP for www.google.com you can see I resolve www.google.com to its right ip, I then save the host file flush my dns and there you go it returns what I put in the host file

 

post-14624-0-86180400-1400497265.png

Link to comment
Share on other sites

Double check you don't have a typo in the HOSTS file.

 

Also note, HOSTS won't work if you have a manual proxy set. (This has been my past experience, may not apply to 8.x now - and only applied in browser, ping won't be affected)

Link to comment
Share on other sites

Agreed Host file would not have anything to do with a browser resolving through a proxy. With a proxy your proxy resolves fqdn for you, not the local system.  Be it automatic set proxy or manual set proxy.

 

To validate it host file works, simple test like I did above is all that is needed.  I have seen name before IP in host file as a common mistake.

 

Other likely issue is antivirus/security software blocking the change, reverting it, etc. 

 

Example - this just popped up on my 8.1.1 box I used to show example of it working

 

post-14624-0-14332300-1400500348.png

 

I let it do its thing - and where you go.. No more entry in my host file

 

post-14624-0-18163200-1400500531.png

Link to comment
Share on other sites

I am not using a proxy on my end so I can verify that.

 

As for my hosts entry, I have several different entries which have worked fine in the past and still do which I have made.  

 

I have to chalk this one up to Firefox this time around (It is set to use System Proxy settings) as all other browsers on my system, IE, Opera and Chrome all work fine with the new entry. 

 

Budman,

 

Thank you for reminding me of the simple ping command. :)  I spaced that out last night (when we hammer at a problem so long, we do not always see the solution in front of us).  If I had done that instead, I would see that it was Firefox causing my headache and Windows is working properly.

Link to comment
Share on other sites

Browsers maintain their own cache - flushing the local system cache does not flush the browser dns cache. This needs to be flushed as well.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.