Closed

Hosts file ignored by browsers on Windows 7

Hello,

Changes I've made on windows\system32\drivers\etc\hosts file are ignored by web browsers like IE, Firefox on Windows 7 x64.

On the other hand, ping command seems aware of hosts file. It gives the output of 127.0.0.1 for web addresses which are opened by web browsers normally.

Thank you for your time.
14 answers Last reply
More about hosts file browsers windows
  1. No its not, I have a host file from mvps.org and both IE and FF obey the entries and block the unwanted connections.
  2. what programs are you running for security?

    Some of those can cause this as well as some types of malware.
  3. I use Norton Internet Security version 17. I experience this problem even when its firewall turned off.
  4. Check within your browser and see if a proxy is set. That could override HOSTS files (or seem to) as all the traffic filters through that.
  5. nocheese said:
    Check within your browser and see if a proxy is set. That could override HOSTS files (or seem to) as all the traffic filters through that.


    No proxy is set. I have tried mvps.org hosts file but it doesn't work either.
  6. What are the specific websites it is not working for and cut-n-paste the relevant lines from your hosts file here so we can see.
  7. I can't understand how can it be possible that "ping" command gives a different output than web browsers...
  8. ertpresso said:
    I can't understand how can it be possible that "ping" command gives a different output than web browsers...


    Ping doesn't use DNS as it's first method of address resolution, especially on an H-node.
  9. nocheese said:
    What are the specific websites it is not working for and cut-n-paste the relevant lines from your hosts file here so we can see.


    My HOSTS file:
    Quote:
    127.0.0.1 localhost
    127.0.0.1 imdb.com


    My HOSTS file path:
    Quote:
    C:\Windows\System32\drivers\etc


    "ping imdb.com" command output:
    Quote:
    imdb.com [127.0.0.1] yoklanıyor32 bayt veri ile:
    127.0.0.1 cevabı: bayt=32 süre<1ms TTL=128
    127.0.0.1 cevabı: bayt=32 süre<1ms TTL=128
    127.0.0.1 cevabı: bayt=32 süre<1ms TTL=128
    127.0.0.1 cevabı: bayt=32 süre<1ms TTL=128

    127.0.0.1 için Ping istatistiği:
    Paket: Giden = 4, Gelen = 4, Kaybolan = 0 (%0 kayıp),
    Mili saniye türünden yaklaşık tur süreleri:
    En Az = 0ms, En Çok = 0ms, Ortalama = 0ms
  10. So, in your browser, after you put in the address bar...
    imdb.com
    www.imdb.com
    http://www.imdb.com

    and the website opens, what is in the address bar after the fact? Probably because your browser, when you omitted the "www" as part of the auto-search function automatically tried it when it received no response at 127.0.0.1.

    If you instead point to an address that will actually answer the web page request, then your browser won't automatically try what it thinks you wanted.

    I do this in my house and office to block unwanted websites... So I have a web service running on one of my internal servers set for all non-specified address headers to go to a "This page is blocked" page.

    So using your example, I pointed imdb.com to 127.0.0.1 and when I tried imdb.com in my browser it was sent to www.imdb.com when 127.0.0.1 failed.

    I then directed it to a valid web server internal address in instead and this time my test went to the "This page is blocked" address.

    As long as the browser doesn't get any response it will try variations in it's own attempt to correct a possible typo and give you what it thought you wanted.
  11. nocheese, thank you for your time and replies.

    imdb.com
    www.imdb.com
    http://www.imdb.com
    imdb + CTRL + ENTER

    all entries above into address bar point me to

    http://www.imdb.com/ address. :(

    If you do not have this problem it must be because of something in my system... However, during my search online I had the thought that other people have this problem on Windows 7 too. A search query of "hosts "windows 7" ignored" in Google returns with many results... This is strange...
  12. I tried a tab, two tabs, one space, two spaces, more spaces between 127.0.0.1 and the address ("imdb.com") in my HOSTS file and used ipconfig /flushdns command before hitting the GO button in the address bar, and restarted DNS client service each time to have a difference, there was no difference. I tried enabling/disabling Google DNS service for TCP/IPv4 of the wireless network I use to connect to internet, it did not help either. I tried Firefox, portable Firefox, IE 64 bit, IE 32 bit but none of them used my HOSTS file...
  13. enter the site and press ctrl+f5
    it'll try to reconnect to the site
  14. This post is a year old!
Ask a new question

Read More

Configuration Windows 7 Browsers