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:\Windows\System32\drivers\etc.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:
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:\Windows\System32\drivers ,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.