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.
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.
- Navigate to Settings and Accounts within Windows 10.
- Select Family & other users and then Add a family member.
- 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.
- 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.
- Select the new user and select Settings next to Web browsing.
- Select Block inappropriate websites to enable SafeSearch.
- 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.
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.
- Visit the Firefox add-ons site using the browser and search for Parental Control.
- 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.
- 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.
- Navigate to C:\Windows\System32\drivers\etc.
- Right click your hosts file and select copy. Then paste it into the folder so you have a clean copy.
- Right click hosts and select edit.
- 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.
- Repeat for as many sites as you want to block.
- 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.