You want to block a website with a simple method applicable to all browsers, simply, you need to do a few changes in your hosts file. Hosts file is a simple file in Windows operating system which maintained securely helps a lot to keep your computer free from malicious website attacks. But, mostly, we leave this task to our security software like Avira Antivirus (Freeware and Shareware) locks Hosts file by default so no changes can be made in Hosts file. In my two previous articles we talked about Editing Hosts file in Windows 8 and before that Editing Hosts file in Windows 7.
To do changes in Hosts file, you need Administrative rights. Here I will tell you how you can block any website through Hosts file. This website block method is applicable to Windows 8, Windows 7, Windows Vista and Windows XP. If you block any website through Hosts file, no browser can open that website.
Some of you may remember, this same method was the part of crack released for Adobe software from checking the license validation. Adobe software were forced to redirect to localhost whenever it tried to check for license validation.
Open any text editor e.g. Notepad or Notepad++ as administrator. Navigate to Hosts file which you can find her:
Hosts file will look like this as show below.
Scroll down to last entry in Hosts file, which will be either ‘# 127.0.0.1 localhost’ or ‘# ::1 localhost’.
Place cursor at the end of last entry and press enter to create a new line. Let’s suppose you want to block Facebook and Twitter. You need to type numbers and letter. First type 127.0.0.1 and then put a space by pressing spacebar. Then type www.facebook.com on the same line. Now if you want to block more than one website, just again press enter to create new line. Again need to type 127.0.0.1 and then www. twitter.com.
The 127.0.0.1 is same for all entries. Just website address is changed. You can add as many websites as you want to be blocked. There is no limit. The only limit is your time. I have highlighted the new entries which you can see in the following image.
Now save the hosts file. If you receive any warning, just dismiss it.
Check the blocked website into your browser, it should not open.