How to Block Websites in Windows 8

Want to keep some sites away from your kid’s reach? Simply block them on your Windows 8 PC and they won’t be accessible until you unblock them. You can also block some sites at your office, so your employees don’t waste their time after browsing websites and not concentrating on work. Here’s how you can do that:

I. Before You Begin:

1. You need to be logged in as an Administrator.

II. Making the hosts file editable:

1. Go to the Start Screen by pressing the Windows Logo Key.

2. Search for windows defender and click on the first result that shows up.

Windows Defender
Click the First (and only) result

3. In Windows Defender, head to Settings and then click Excluded files and locations.

Excluded files and locations
Click Settings>>Excluded files and locations

4. Click on Browse and navigate to the following directory:

C:\Windows\System32\Drivers\etc

5. Click on hosts and hit OK.

hosts file
Select the hosts file and hit OK

6. Now click the Add button to exclude the selected file.

7. Finally hit Save changes.

III. Blocking Websites in Windows 8:

1. Press the Windows Logo key and you should be on Start Screen.

2. Search for Notepad and right-click on the first result that shows up and select Run as administrator.

Notepad as Administrator
Right-click on Notepad and select Run as administrator

3. In Notepad, click on File>>Open… and select hosts file from the following directory:

C:\Windows\System32\Drivers\etc

4. Once the file’s open, you can start editing it.

5. Say if you want to block yahoo.com on your PC, you’d add the following line at the end of the file:

127.0.0.1 yahoo.com

6. Similarly, you can block Facebook by just adding the following line:

127.0.0.1 facebook.com

7. The file will now look like following:

Edited Hosts File
Add the websites you want to block in this file

8. Save the changes once you’re done with adding websites.

9. Now open any browser on your PC and type in yahoo.com in the address bar and hit Enter. You’ll see that it’s not accessible.

10. You’re done!

Brilliant! With such nice feature of blocking websites, you can really keep your children away from the sites that aren’t useful for them!

19 thoughts on “How to Block Websites in Windows 8”

        1. i am using a virus scanner from Esset so automatic if u use a different
          security program windows defender is switched off and is this how to not
          working ,if u know a different way please let us know ,thanks

          1. i am using a virus scanner from Esset so automatic if u use a different
            security program windows defender is switched off and is this how to not
            working ,if u know a different way please let us know ,thank

          2. i am using a virus scanner from Esset so automatic if u use a different
            security program windows defender is switched off and is this how to not
            working ,if u know a different way please let us know ,thanks36

  1. i am using a virus scanner from Esset so automatic if u use a different security program windows defender is switched off and is this how to not working ,if u know a different way please let us know ,thanks

  2. It does not work. Hosts file looks changed, but i can still access facebook. I used ipconfig /flushdns command, but it’s still the same.

    1. Hello Shamil,

      Hmm…

      What I suggest you to do is:

      (1) Do the procedure above
      (2) Turn OFF your computer.
      (3) Turn it back ON.
      (4) Check the hosts file if it has the entries you added using the procedure above. If it has, close the file.
      (5) Now try opening the site you’ve blocked in the hosts file in any web browser. It won’t open.

      Hope it helps!

Leave a Reply

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