1

How To Block a Website in Firefox

Posted by Jamie on February 2, 2017

Firefox may be a little behind Chrome and Edge in terms of features and security but it is still my browser of choice. As the only browser of the three to not harvest and sell my data, it is also the browser of choice for many security professionals I know too. All that aside, Firefox offers a lot of control over browsing with one cool feature being the ability to block a website.

If you want to learn how to block a website in Firefox, read on!

Why would you want to block a website at all?

The internet is freedom right? The freedom to go where you please, say what you like and access information in any manner you choose, right? Yes and no. If you’re an adult, using your own computer, the internet should be open and free. But what about children? What about at work or at school or college? What about if you want to ensure security?

Most people know enough about the internet to be careful where they go and what they download. Most adults know there are places you just don’t go online. The same cannot be said for everyone though and if you have people to protect or productivity to maintain, blocking websites is a legitimate way to go about it.

So that’s the why, now to the how.

Block a website in Firefox

For most situations there are three ways to block a website in Firefox. You can use Windows parental controls, manually block websites in your host file or use a Firefox addon. Each gets the job done but vary in their ease of use. Addons work fastest, but involve downloading an addon and running it. Parental controls come next but aren’t foolproof. The hosts file is the most involved but is less obvious to someone wanting to circumvent your restrictions.

How to block a website in Firefox-2

Block a website in Firefox using Windows parental controls

Unfortunately, Firefox doesn’t come with parental controls built in so we have to use Windows instead. To make this work you will need to set up a child account within Windows 10. While it is referred to here as a child account, you can use it for any reason you like.

  1. Navigate to Settings and Accounts within Windows 10.
  2. Select Family & other users and then Add a family member.
  3. Select Add a child and enter their email address and click Next. All child accounts have to have Microsoft accounts for some reason. If you need to create one, follow the wizard that appears.
  4. Select Family & other users again and click the Manage family settings online link. This will open Edge and take you to the family settings page.
  5. Select the new user and select Settings next to Web browsing.
  6. Select Block inappropriate websites to enable SafeSearch.
  7. You can also allow or block specific websites as you see fit by adding their URL.

These settings work inherently with Edge but Firefox checks the settings each time it is loaded and abides by SafeSearch settings.

How to block a website in Firefox-3

Block a website in Firefox using addons

Firefox has a wide range of addons you can use to block specific websites. These may be more suitable for situations other than protecting children but can be circumvented if the user knows what they are doing.

  1. Visit the Firefox add-ons site using the browser and search for Parental Control.
  2. Select a suitable addon and install it. Follow the setup instructions as each differs by product. Make sure to set a difficult password to keep the add-on secure.
  3. Restart your browser if required and test.

There are dozens of addons that do a range of things as well as block a website in Firefox. Each differs in exactly what they do and how they do it so check reviews before trying.

Block a website in Firefox using your hosts file

The final way to block a website in Firefox is to edit your hosts file. A host file maps IP addresses with domain names and is checked by Windows before visiting a particular website. It is a good way to block specific sites without using parental controls or addons. The downside is that you will need to change the entry if you want to access a particular site as it blocks them permanently for every user.

  1. Navigate to C:\Windows\System32\drivers\etc.
  2. Right click your hosts file and select copy. Then paste it into the folder so you have a clean copy.
  3. Right click hosts and select edit.
  4. Type or paste ‘127.0.0.1 www.sitename.com’ and ‘127.0.0.1 sitename.com’ on separate lines. Where you see sitename, add the URL of the website you want to block. We cover both www. and sitename as websites tend to use both.
  5. Repeat for as many sites as you want to block.
  6. Save the hosts file and reboot your computer.

Now every time you attempt to access one of the websites you listed you should see the unable to connect page in Firefox. By directing a URL to 127.0.0.1, you are sending it to your computer’s loopback address. This means the browser will never reach the website in question.

The downside to using the hosts file is that you have to manually block each website. The upside is that most users won’t know how you did it.

One thought on “How To Block a Website in Firefox”

leo says:
what about linux settings please?
Reply

Leave a Reply

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


Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.