How to Block a Website in Windows

Sometimes it may be necessary to block a website for to protect privacy, to prevent access to adult content or simply to avoid websites which use a large amount of bandwidth. Here is the simplest and most effective way to block all access to certain websites or domains.

Steps

  1. Image titled Block a Website in Windows Step 1
    1
    Open the windows HOST file. In Windows 7, Vista, and XP it should be located in the following directory (or the drive in which windows is installed) C:\WINDOWS\SYSTEM32\DRIVERS\ETC\
  2. Image titled Block a Website in Windows Step 2
    2
    Edit the file named HOST in notepad.
  3. Image titled Block a Website in Windows Step 3
    3
    Set it up. Add the following line of code to the bottom of the file: 127.0.0.1 localhost
  4. Image titled Block a Website in Windows Step 4
    4
    Block each website. For each website you wish to block add a new line of code: 127.0.0.1 website to block (see the next step for an example).
  5. Image titled Block a Website in Windows Step 5
    5
    Example: 127.0.0.1 facebook.com
  6. Image titled Block a Website in Windows Step 6
    6
    Save the file. File-> Save-> Yes Overwrite
  7. Image titled Block a Website in Windows Step 7
    7
    Reboot. Restart the computer.
  8. Image titled Block a Website in Windows Step 8
    8
    Test. Direct your web browser to the blocked website to ensure the block has been successful.

Article Info

Categories: Windows