The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Windows 7 hosts file not working

    Discussion in 'Windows OS and Software' started by anotherusername, Oct 20, 2012.

  1. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    A few days ago I noticed that my hosts file was not blocking sites as intended any more. Like any tech savvy user, I googled this problem and tried out various proposed solutions. Unfortunately as of this writing all the proposed solutions that I have tested so far have failed to work. I:

    a. changed formatting in my hosts file
    b. deleted hosts file when a. failed and got a completely clean new one
    c. tried ipconfig/flushdns
    d. uninstalled spybot, as per some suggestions

    None of these solutions, even getting a new clean hosts file, have worked out. I have zero clue as to why this problem is not going away. Any help is appreciated.
     
  2. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    ...swinging for the fences

    open regedit and navigate to
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters

    is the databasepath key pointing to your host file?
     
  3. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    It said systemroot\system32.... and I changed it to C:\Windows\System32\... and no change. I then restarted and did another ipconfig/flushdns and still the host file continues to not work.
     
  4. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    No, no, what is the whole datapath? you don't need to change that.
    It SHOULD be

    %SystemRoot%\System32\drivers\etc

    don't change it to

    c:\windows\System32\drivers\etc
     
  5. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    ...also, in your previous folling around with your host file, you didn't accidently add an extension, did you (ie, making it hosts.txt)
     
  6. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    (make sure that you are showing extensions under CONTROL PANEL > FOLDER OPTIONS > VIEW)
     
  7. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    Ok, the datapath was exactly what you described. I reverted it back to its original form. And hosts file is not in .txt form. It just says "FILE" in the type section.
     
  8. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
  9. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    That is one of the first sites that pops up when you google "windows 7 hosts file not working". I tried out the solution from the main post there and all the small tweaks suggested in the comments section. The problem still persists.
     
  10. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    attach your hosts file...
     
  11. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
  12. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    Big hosts file.....

    OK, the bad news, I guess, is that it works fine on my computer. That begs the question--how are you testing it? Are ads coming through you are trying to block? Are you able to ping the urls in the host file and get a response (note, you WILL get a response, it will just be from 127.0.0.1, instead of the actual ip address).
     
  13. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    I am testing hosts file by adding sites like google, cnn, facebook etc. and seeing if they get blocked. I am not sure what you mean by getting a response but I am unable to block them, blocked as in I should not be able to visit and use a site that is placed in my hosts file.
     
  14. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    ok...I don't want to sound insulting, but how are you adding them?

    In the hosts you attached, none of those were in there. Did you try to test one of the sites already in there? Any chance you just are not adding them correctly?
     
  15. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    open a command prompt with administrative privilidges
    type the following

    ping track.acclaimnetwork.com

    what are the results?
     
  16. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    Not an insulting question. Different people have different levels of computer literacy, especially when it comes to these sorts of things. I purposefully am deleting the lines that I manually added for each test in case I forget to delete them later. For the ping test this is my result:




    pingr.png
     
  17. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    that is the correct response for a working HOSTS file

    the 127.0.0.1 is a loopback address

    If you ping track.acclaimnetwork.com without that entry in the host file, you're response would be

    Reply from 67.23.26.37: bytes=32........

    Your host file is "telling" your computer that track.acclaimnetwork.com is at 127.0.0.1, so we can see your HOSTS file is working, because the response is from your own computer (the loopback address).

    You must be entering the information wrong.

    Did you, for example, type in
    Code:
    127.0.0.1     www.google.com
    
     
  18. anotherusername

    anotherusername Notebook Consultant

    Reputations:
    0
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    30
    Ok, so I copy and pasted the information from the code window and it worked. I was unable to access google. I am not sure why it is working, but it is working now. I know for certain that when I was inserting 127.0.0.1 and copying and pasting the name of sites from address bar into hosts file I was still able to access them. Don't know why it is working now but I am glad that it is.

    Thanks for all your assistance gerry. I appreciate it.
     
  19. gerryf19

    gerryf19 I am the walrus

    Reputations:
    2,275
    Messages:
    3,990
    Likes Received:
    0
    Trophy Points:
    105
    Glad it is working....

    you didn't include the http:// did you?