How to block unwanted sites in Windows7

Block unwanted sites

If you are a System admin and wants to put some restrictions on websites within the organization, so that the other employees wouldn't be able to visits social networking sites, adult sites or other harmful sites, then you need to block those sites. There are many methods of restricting websites. You can use any particular softwares available to do the restriction task, you can also set your browser to block any sites. Alternatively you can also edit your Windows hosts file to restric websites. Here I will show you a very easy method i.e. how to edit your hosts file to block sites in Windows 7 . You don't have to use any applications, because the feature is available inside the Windows 7 itself. Lets see how to restrict sites.

Step 1:

Go to start->All Programs->Accessories->Right click on Notepad and Run it as Administrator. This step is very important because you cannot make any changes to the Windows file if you don't open it in Administrator mode. Windows just cannot allow other users to edit Windows own file and this good for security reasons.

block unwanted sites
Block unwanted sites


Step 2:

You have your Notepad open now and its running in Administrator mode. Go to the File menu in Notepad and click Open.

block unwanted sites
Block unwanted sites


Step 3:

When you click Open in the above step, a new Window will open, select the Local Disk C here, then select Windows.

block unwanted sites
Block unwanted sites


Step 4:

Now select the System32 folder. Please see the image below.


Step 5:

After you click System32 folder in the above step, search for the derivers folder inside it and open it.


Step 6:

Now click on the folder etc to open it.


Step 7:

Inside the etc folder double click on the hosts file, it will open in Notepad. Please note that the type of file should be selected as All files otherwise you won't see any files inside the ets folder.  


Step 8:

See the image below of the hosts file. If you want to block any sites you need to give the name of the website at the bottom of the file. In this example I tried to block the social networking website Add the localhost IP then give space and the any website name you want to block. Try it. And when your done with the editing, save the file, try to open the blocked website by typing the URL on your web browser. You will be completely restricted to open that website.


That's it about how to block your website by hosts file in Windows 7.

Download Our Free eBook now

Linux and UNIX Shell scripting ebook

4 Comments on How to block unwanted sites in Windows7

Leave a Reply to Alex Cancel reply

Your email address will not be published.