Saturday, 14 June 2014

Block Websites from Windows Without Any Software


Do you need to block any websites accessing from your children’s PC or you need to block a specific website from office computers? There is a simple trick to do it without any software.
  • Open your Windows folder from Windows Explorer,  then open System32\Drivers\Etc folder. In most cases it will be C:\WINDOWS\system32\drivers\etc.     

 Select the file named hosts and open it with notepad, alternatively you can open the file by typing the following command in Run prompt “notepad c:\WINDOWS\system32\drivers\etc\hosts” without quotation marks.



  • Go to the last line of the file and hit Enter key, add 127.0.0.1 then type the domain you need to block as shown in the above screenshot (in my example I added facebook.com), save and close the file,
  • Try to access the website that you blocked from your web browser.
Now, the working behind the trick, it is simple, when we open any websites in Windows, it will check the HOSTS file for the IP Address belong to that website, if it is there, the browser will request the content to the IP address mentioned in HOSTS file. In our case we gave the IP Address of local host which don’t have any web server, so the web browser will show an error and the user never access the website that we blocked.
We can block any number of websites in this way. It is also very useful to block the spyware websites.
If you need to unblock it later, open the file and delete the unwanted entries