CWD Forum » Security

Block Websites - Host File

(2 posts)
  1. asterix

    member
    Joined: Aug '09
    Posts: 16

    I'm trying to read this financial article on Seeking Alpha and the web page, right after loading, gets redirected to some spammy "personal antivirus" site.

    I can manually block web pages in each of my browsers, but I seem to remember there being a way to do it for all of them at once, and having the capability to import multiple websites to block at once (similar to how Spybot S&D does it) using my Windows hosts file?

    Is there a way to block websites using the host file?

    Posted 1 year ago #
  2. Sponsored Links

    Posted 1 year ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 143

    Great question. You can indeed block a list of web sites using your host file. First, your host file is most commonly located in C:\windows\system32\drivers\etc\HOSTS.

    Use Notepad or Wordpad to edit it, but save a backup copy first. Also note that if you save without specifying an extension, Windows will, by default, add a ".txt" extension to the file, so you'll be left with an unusable HOSTS.txt. To prevent this, rename the original hosts file to HOSTS.bak, and the new HOSTS.txt one to simply HOSTS.

    Add a commented section to place your blocked websites and then block them like this:

    # Manual entries
    127.0.0.1 example.com

    You can list as many as you want. All this does is point your browser at 127.0.0.1 - which is a loop back to your own PC, instead of sending you to the offending website.

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.

485 posts in 187 topics over 14 months by 49 of 96 members. Latest: xiezhen, Markjohn, krocodiled