networking - Changing my hosts file won't work

08
2014-07
  • user293535

    A while ago, I messed with my hosts file and it worked just fine. Then I wanted to undo my changes, so instead of deleting the entries, I completely restored the hosts file using one of Microsoft's quick fix download things.

    Then I tried looking up a solution on the web, one of them suggested that I make a whole new hosts file and save it in the System32/drivers/etc directory. Now it's a "Text Document" instead of a "File" like the other files in that directory.

    Any changes I make now do not work. I tried it on a family member's computer, and it worked fine, so it definitely has to do with the mess-up on my part. Just for clarification: My hosts file has worked in the past. If anyone could help I would really appreciate it.

  • Answers
  • Biapy

    You may want to enable the displaying of file extensions in Explorer options, as described by Show or hide file name extensions.

    You may then remove the previously hidden .txt extension from your hosts file.

  • Scott

    Windows users are able to edit their host file directly from their PC. Windows 7 or Vista

    1. Browse to Start > All Programs > Accessories.
    2. Right-click Notepad, and select "Run as administrator".
    3. Click "Continue" on the UAC prompt.
    4. Click File > Open.
    5. Browse to C:\Windows\System32\Drivers\etc.
    6. Change the file filter drop-down box from Text Documents (.txt) to All Files (.*).
    7. Select hosts and click Open.
    8. Make the needed changes, as shown above, and close Notepad.
    9. Save when prompted.

    Hope it works.


  • Related Question

    etc/hosts question
  • patrickinmpls

    Sometimes when I'm reading news I click on a headline and it takes me to telegraph.co.uk news which I don't like to read, so I tried to make my hosts file redirect to localhost. So in my hosts file I put 127.0.0.1 telegraph.co.uk

    which works if I just type in that exact address, but if it has a longer URL it gets through how can I block all telegraph.co.uk articles, including those in this format

    http://www.telegraph.co.uk/news/worldnews/middleeast/iraq/6913907/Iraq-hostages-Peter-Moores-kidnapping-masterminded-by-Iran.html


  • Related Answers
  • Phoshi

    www.telegraph.co.uk and telegraph.co.uk are two totally different addresses. Place 127.0.0.1 www.telegraph.co.uk in your hosts file as well.

    This is because the www. is simply a subdomain of telegraph.co.uk, not a particularly special part of the web. They simply both lead to the same place - but the hosts file is not very clever, you have to be very clear and verbose when blocking things.