Home > How To > How To Block Websites On Your PC Without Any Software

How To Block Websites On Your PC Without Any Software

Parents always worry about their kids, specially about what they access on the internet. You should have used many website blocking softwares to avoid access to specific websites. If you search on the internet, you will find thousands of such softwares. But installing a third party software on your PC is not safe always. You could be spammed. Luckily, there is a way using which you can “block websites without using any software”.

There is a file named as “hosts” in your PC, which controls the internet access to your computer. By making some changes to that file, you can block any website on your computer without using any third party software. You may need to take ownership of that “hosts” file before you start modifying it. You can click the link below to know how to take ownership of any file or folder

How To Take Ownership of any file or folder?

After taking ownership, you can modify this file and block websites. For example, we are going to block Facebook.com on our PC. First make sure you that you can access Facebook on your computer.

Now, let’s see the process of blocking websites without any software step by step

Step 1

First open “My Computer” or “This PC” and go to following path-

C:\Windows\System32\drivers\etc

You will find five files in that etc folder one of these will be hosts file. This hosts file is very useful for us as this will help us in “blocking the required website without any software”.

Step 2

Now, we need to take ownership of this “hosts” file. You can visit this tutorial for taking ownership of this file-

How To Take Ownership of Files and Folders?

After you have added “Take Ownership” option to the context menu, right-click on hosts file and select “Take Ownership“. We have to take ownership of this file because without taking ownership, it won’t allow us to make changes and without making changes to hosts file, we can’t block websites on computer without any software.

You may see UAC Prompt, click Yes to continue.

Command prompt will appear for some time, and will disappear automatically and ownership of this file will be transferred to current user.

Step 3

Now, open hosts file with notepad. To do that, right-click the hosts file and select “Open with”.

In Open with pop-up window, select Notepad and click OK.

hosts file will open in Notepad.

Step 4

After the very last line of the file, add one more line in following format-

127.0.0.1         www.facebook.com

Where 127.0.0.1 is loop-back address of your PC and www.facebook.com is the address of the website you want to block. If you want to block more websites, you can add more lines to the hosts file in the same format.

Loop-back Address: Loop-back address is the internal IP address of your Ethernet card. This IP address is used to test your Ethernet card. If you want to test your Ethernet(LAN) card, just ping 127.0.0.1. If ping is successful, then your card is working fine. And above line that we added to hosts file means that your PC will look for Facebook.com on your own computer and not on Facebook’s server.

After adding this line to hosts file, save this file and close Notepad.

Step 5

Now, you should reboot your PC for the changes to take effect.

After restart, open your internet browser and go to www.facebook.com

You see, browser is showing error page for the blocked website.

You have successfully blocked the Facebook on your computer. Similarly, you can block more websites on your PC just by adding a line to your hosts file. To revert the changes, just delete those lines from hosts file and your websites will be unblocked. Enjoy, have fun!

Leave a Reply

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