How to block a website from all browsers on the computer

  1. Open the Hosts file:
    • Windows

      1. Press the Windows Key + R.
      2. Type notepad C:/Windows/System32/drivers/etc/hosts and press Enter.
    • Mac

      1. Click the Finder icon in the Dock.
      2. On the top menu, click Go, then Go to Folder…
      3. Type /etc and press Enter.
      4. In the folder that appears, open the file named “hosts”.
  2. Find the line that says 127.0.0.1 localhost.
  3. To block a website (i.e. test.com), then type the following lines underneath:
    127.0.0.1 test.com
    127.0.0.1 www.test.com
  4. Add as many sites as you like by putting 127.0.0.1 followed by the website; preferably with and without the www.
  5. Click File, then Save.

Leave a comment

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