How To Block Websites on a Windows Computer?

Hello readers, if you want to block some websites on a Windows computer be it social networking websites, porn sites, or any other website, you can do it by following the below steps:

Step 1: Navigate to 'C:\Windows\System32\drivers\etc'

Step 2: Open the 'hosts' file in any text editor which you have. The contents of your 'hosts' file will look like this:

Step 3: Now map the website's URL you want to block to an IP which you believe will always be unreachable and mention it in this file.

For Example,

As you can see I have added two entries for each website which I want to be blocked, one is including 'www' and the other is excluding 'www'. If the website you want to block has multiple domains, you need to mention them in separate entries.

After adding these entries to the 'hosts' file, it will look like:

Upon adding entries to the 'hosts' file, save it. You will be asked for administrative permissions to make changes to this file. Allow it when asked.

Step 4: Restart your computer.

Step 5: Now when you will try to open a blocked website you will be welcomed with an error.

I hope you liked this article and learned something new. Subscribe to this blog for similar articles like this.

Buy Me a Coffee -