Sometimes we need to block certain websites from being accessed on our computer.Parents may need that their child does not have access to a particular website for certain reason.There are many software available for this purpose, but some of them won’t work and others are paid.
In my this post I will tell you an simple and easy method to block websites in windows 7 without use of any software.This method is tested on windows 7 but should also work fine on windows 8.Just follow the procedure given below:
- Go to C:WindowsSystem32driversetc.Here you will see a file with name hosts .Right click on it and select open.A new open with window will open and select Notepad and open it.
- Now you need to make simple changes to this hosts file.I recommend you to copy this hosts file to a secure place before making any changes to it so that you can revert back in case of any problem.
- In the last line of the hosts file add the line 127.0.0.1 www.sitename.com.Here sitename is the name of site you want to block.For example if you want to block facebook then it will work if u add like this: 127.0.0.1 www.facebook.com
- Then close the notepad and when you are prompted for saving it save it.If you want to block more than one website then you have to write as follows:
127.0.0.1 www.facebook.com
127.0.0.2 www.yahoo.com
127.0.0.3 www.twitter.com
Note that for each website the last digit of IP address should be different and then save it.
- If you are getting error while saving the Hosts file(in most cases) , then you need to take ownership .Just download the following small file and double click on install Take ownership .Click on yes.Now you will see another new option in the right context menu Take Ownership.
- Now go to C:WindowsSystem32drivers ,right click on folder etc and select Take ownership. Now edit the hosts file as explained above and save it.This time you will not get saving error.Now when you will try to open the blocked website in any browser it will show an error.
NOTE: You can remove ownership by clicking Remove Takeownership file included in the same downloaded file.If you face any problem let me know in comment section.