How to block a website using the Hosts file in Windows OS

The location of the hosts file depends on your operation system.

  • Windows XP, Vista and Windows 7 C:\WINDOWS\system32\drivers\etc\hosts
  • Windows 2000 C:\WINNT\system32\drivers\etc\hosts

Note! Make a backup of the hosts file and put it somewhere safe, in case you mess up.

  1. Open the hosts file using Notepad or other plain text editor.
  2. Find the line localhost
  3. To block, for example, the website, add this text under localhost:
  4. Save and close the Hosts file.
  5. Reboot your computer to apply the changes (If required).
  6. Try to open into a browser.
Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.