Sometimes blocking a website on your computer becomes necessary. You may want to keep yourself away from distractions like Facebook, quora etc while working or to stop any software for checking/downloading its updated version. The task can be accomplished either manually blocking these websites or by using a portable software which you can carry with you in USB. I will explain both the methods in here.
How to Block any Website Manually in Windows
It may sound difficult to manually block any website on a computer but you will be surprised to know how easy the process is. All you need to do is locate hosts file in your operating system. Below is path that you should follow to locate Hosts file in your operating system
Path for Hosts file in Windows 8 ,Windows 7 and Vista and XP
Open this file with notepad and add the following lines
to block Facebook add
Note:- If you get any error regarding permissions then right click on the hosts file and go to properties and change permissions.
How to Block any Website Using Portable Software in Windows
If you don’t want to edit hosts manually then you can do this with Easy Website Blocker 2. It is a portable software with size less than 500 kb.
You will need to provide the path windows folder which is usually c:\windows
How does this work?
Hosts file lets you set rules for your system network. Before a URL is queried in browser, system will check if there are any rules set in hosts file.
By adding 127.0.0.1 in front of the website url in hosts file we tell the windows to not use internet connection for that specific url.
How to Bypass This Restriction?
If this restriction is forced on you then you should follow the following process to bypass it.
- Try to remove the url from hosts file. ( this may fail if you don’t have administrator privileges).
- If the above step doesn’t work then use proxy like http://kproxy.com. It will encode the url and then even hosts file can’t stop you from browsing that site.
Note: If your antivirus has real time protection then it may not allow to edit hosts file.