Pages - Menu

Friday, July 19, 2013

How to block a website in windows without using any software (windows 2000, xp, vista, 7, 8)

Due to so many reasons we want to restrict some sites in our computer . Some usual reasons are to prevent children from accessing adult or gambling sites. Blocking a site can be done either by using a software or by making some little changes in your computer. 
In this post we will learn how to block access to a website in your computer  without using any software. For this you have to make changes in HOSTS file saved in your computer. Here are the steps.

According to your operating system find the HOSTS file.
Path for Window XP, Vista, 7, 8 : C:\Windows\System32\drivers\etc\hosts
For windows 2000: C:\WINNT\System32\drivers\etc\hosts

NOTE: Before doing any changes to hosts file make a backup file (Just by coping the hosts file to an another location)

*Some times your computer will not allow you to make changes in hosts file in that case save file to another location make the following changes to that and then copy and replace file to etc folder. 

1. Open the Hosts file by using any text editor for example Notepad.
It will looks like above image (maybe differnt for your system)
2. Now find the line 127.0.0.1 localhost
3. To block a website add the following line just below the 127.0.0.1 localhost line
for example to block youtube.com add 127.0.0.1 facebooke.com
it will looks like
127.0.0.1 localhost

127.0.0.1 facebook.com

4. Now exit the file by saving it and try to open the blocked site in any browser. (You may need to reboot your computer for first time)

No comments:

Post a Comment