Block Website Using Hosts File Not Working – Fixed

Can’t block website using hosts file? In this blog post learn how to fix the issue.

Can't block website using hosts file

There are variety of reasons behind blocking website and fortunately there are lots of ways do that thing. You can either install Extensions or Add-ons and use third party programs.

The most reliable way to block websites on Chrome, Firefox, Edge and other modern browser is by editing the host’s files. The good thing about this method is that once you block website using host file, the same site will be blocked on all browser. So it acts like an all-in-one workaround.

You can check my blog post on how to block a website on Edge using a hosts file. The procedure is similar for all web browser. If you open and save the host file correctly, you will get success in blocking a website.

Can’t Block Website Using Hosts File – Fixed

Some users reporting on the internet that they are unable to block a website using a host file. Undoubtedly, the method still works. To help out those users we decided to cover this blog post providing possible ways to make this method work again.

1 . Edit Hosts File Correctly

If you don’t save the hosts file correctly, then chances are high that website will still open even if you have blocked it using host file.

Learn the right way to open the host file in Windows 10.

2. Use Different Local host

If you’re using this format “127.0.0.1 site.name” in the hosts file and you’re unable to block sites, then try this format “0.0.0.0 site.name”

For example, if you want to block Facebook then instead of using 127.0.0.1 facebook.com use 0.0.0.0 facebook.com

You can check this blog post to learn “What’s the difference between 127.0.0.1 and 0.0.0.0?”

3. Manage Preferences (For Firefox)

Some users reporting that after editing the hosts files, websites blocked succesfully on Chrome, Edge and other browser, but not in the Firefox.

Here’s how you can fix it:

Launch Firefox browser and in the address bar copy-paste:
about:config

Here, in the search bar copy-paste:browser.fixup.dns_first_for_single_words

With default settings, this preference is disabled, you need to double click on it to enable it. This will turn status from False to True.

After doing this, the host’s file will block site on Firefox browser too. Check this thread for detailed information.

So these are three ways on how to fix can’t block websites using host’s file. Find this blog post handy? Let us know your opinion in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.