Tutorials

The easiest method to blocking websites

There are many ways to block a website - there are thousands of website filter software available these days, but the easiest way to block an unwanted website without installing any software is by editing hosts file. Yes, that's right. I only found that out after reading Block Unwanted Websites - by just editing host file blog post on Techie Portal website. I knew about hosts file and I knew how it worked before I discovered the post but it has never come across my mind to use it as a way to block unwanted websites on your computer. Ah the little things that you overlook.

Open HOSTS file which is located at C:/windows/system32/drivers/etc using notepad.

[Screenshot of HOSTS file]

Lets say you want to block www.hityou.com

Just add 127.0.0.1 www.hityou.com as shown in the image above. You may also add the site without the www. for added safety.

Thats it !!! Now when you try to open the website, your browser will be unalbe to connect to this website because the DNS for the website has been changed to 127.0.0.1 instead of the real DNS.

To find out more about how to block unwanted sites by editing hosts file, check out the original post.

[tags]blocking, hosts, websites, access[/tags]

6 thoughts on “The easiest method to blocking websites

  1. I tried your method but when I click save it says that it can’t and to make sure the path is correct. I can’t figure out how to get it to save my chances without that message coming up. Any thoughts on what’s wrong?

  2. Hey, i tryed doing this but only some websites get blocked not all of them! :(

  3. I’ve tried but it didn’t block any website, does it work on googlechrome and Firefox?
    I did just the way it’s explained here……….

    can you solve the prob please?

  4. Hi elai. This solution is not browser-dependant. However, as wojtekm said, you need to have administrator right on the computer to save the file. And please make sure the syntax is correct and you have entries for both with www and without.

  5. I see others have commented about having admin rights. One step I still see missing is after editing the hosts file you must close and reopen all your browser windows for the changes to take affect. I also make a point and click instructional video on how to complete the steps in this blog. The video can be found here.

    http://helpviavideo.com/watch.php?vidid=37

Comments are closed.

Twitter
LinkedIn
YouTube
Instagram