Jump to content



Photo

Host File not working properly

Answered Go to the full post

  • Please log in to reply
6 replies to this topic

#1 +Medfordite

Medfordite

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 16-March 06
  • Location: Medford Oregon
  • OS: Win 8.1 Pro
  • Phone: HTC One M7 - Blue

Posted 19 May 2014 - 02:40

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?

 

 

 

 



Best Answer +BudMan , 19 May 2014 - 11:46

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

 

 

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

 

Go to the full post



#2 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 19 May 2014 - 11:01

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

 

hostfile.png



#3 Raa

Raa

    Resident president

  • Tech Issues Solved: 7
  • Joined: 03-April 02
  • Location: NSW, Australia

Posted 19 May 2014 - 11:11

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)



#4 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 19 May 2014 - 11:46   Best Answer

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

 

antivirus.png

 

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

 

cleaned.png



#5 OP +Medfordite

Medfordite

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 16-March 06
  • Location: Medford Oregon
  • OS: Win 8.1 Pro
  • Phone: HTC One M7 - Blue

Posted 19 May 2014 - 14:02

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.



#6 spikey_richie

spikey_richie

    XXXIII

  • Tech Issues Solved: 5
  • Joined: 02-February 05
  • Location: Nuneaton, UK
  • OS: Windows 8.1u1 Pro 64-bit
  • Phone: Sony Xperia Z1

Posted 19 May 2014 - 14:11

Firefox causing my headache and Windows is working properly.

 

Wash your mouth out! :p



#7 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 19 May 2014 - 15:26

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