Home » Questions » Computers [ Ask a new question ]

With Windows 7, why is an entry in the hosts file not working?

With Windows 7, why is an entry in the hosts file not working?

I updated some entries in the hosts file at C:\WINDOWS\System32\drivers\etc. As a test, I decided to make Google point to 127.0.0.1.

Asked by: Guest | Views: 371
Total answers/comments: 4
Guest [Entry]

"You may have to restart Internet Explorer or Firefox, or whatever browser you are using.

Also, try going to command prompt and typing:

ipconfig /flushdns

Lastly, double check you are typing google.com in the address bar and remember that both google.com and www.google.com are completely different as far as DNS is concerned and you will need to add an entry for both."
Guest [Entry]

"I noticed it takes a certain amount of time to resolve on windows 7.

Also I only have one space separating ""127.0.0.1 domain"" and it works fine.

ipconfig /flushdns doesn't seem to make a difference just clear your cache and wait a few minutes it will eventually take effect.

if still have problems make sure you running notepad as admin when you edit file and saving."
Guest [Entry]

"This is an old question but just today we had a situation where we noticed the host file being ignored. My answer is probably not applicable to the lot of you, but if I can help only one person from pulling out their hair, it was worth posting it.

In our case, we used notepad++ to edit the hosts file and couldn't figure out why none of the entries worked. Turned out notepad++ was saving the file with a wrong EOL (end of line) format. When we eventually opened the file in normal notepad, we saw one huge string on line 1. So it did nothing."
Guest [Entry]

"I think i just figured out why it does not seem to be working if you choose to test it with google and that is because our browsers change the address to https and as its a secure protocol it bypasses our trusted host file. but in fact its still working fine.
As an example now obviously blocking hp.com is only as a test please undo after you confirm its working try adding 127.0.0.1 www.hp.com dont worry about how many spaces as long as there is one it should block that address"