BLOCKING SELECTED WEBSITES USING THE WINDOWS HOST FILE



Blocking selected websites using the host file
In this tutorial, we are going to learn how to block sites on a windows pc using the windows host file. This post may appear a little clumsy, but I pray it can help you get what you want.
So follow these steps to block any site that you do not want other users to access from your computer

STEP ONE:

Log in to your computer as an administrator.

STEP TWO:

Navigate to your OS drive (the drive mounted by your operating system for example local disk c) and locate the folder saved as windows. Then locate system32, then locate drivers, then head to etc. you will then see a file saved as hosts with the extension “file”.

STEP THREE:
Open the file using notepad and scroll to the bottom of it.
Now type 127.0.0.1 then followed by the web address that you want to block. For example:
127.0.0.1 www.facebook.com
So type the list with each entry below another.

STEP FOUR:

When you are done with the entry, press ctrl plus s to save the file. In the dialogue box, change the file type to all files and add the text “.file” to the text “host”. So it should read “hosts.file”. Then navigate to the save button and save the file. You will receive a warning saying you cannot save in that directory and windows will ask you to save the file in documents instead, choose yes and save the file.
Now open documents and copy the file hosts and paste it in the directory “etc”. When prompted to replace the file in the destination, choose replace and when prompted to continue with automatic administrator rights, please do. Enter your administrator password and press enter...

Step five:
Now launch any browser and test the site by typing the address in to your address bar. You should be redirected to a blank page or your browser should say “it cannot establish a connection to the server”.

This can be a very useful tool if you are in a school setting and you want to restrict the learners from accessing some sites. And the cool thing is that the restriction will apply to all browsers rather than browser add-ons which will restrict the targeted site from that particular browser only.
Please enter your comments in the comment section and let me know anything.





13

Comments