Despite continuous improvements in the world of browsers, there still lacks a built-in feature to block websites manually—Firefox is no exception. Thankfully, there are other ways you can block access to particular websites. Some methods don’t necessarily involve making any changes to Firefox directly.
For example, you can modify some data in the Hosts file inside your computer. Another way you can achieve the same result is by tweaking your router settings.
Edit Hosts File
In simple words, the Host file is the text file that acts as a repository of domain names referenced by the OS to identify and locate a host computer over the network. You can locate this file using this pathway
Any changes made to the host file will directly work not only on Firefox but any other browser as well.
But do note that you need elevated permission to modify this file.
- Go to the Start menu and search for the Notepad app. Right-click the app and click on Run as administrator. Then, click on Yes.
- On the Notepad app, go to File from the menu bar and select Open.
- Inside File Explorer, enter this path
%windir%\system32\drivers\etcand press Enter.
- You might see that the folder is empty, but this is because of the incompatibility with
.txtfiles. So, set it to All Files.
- Double-click on the hosts file to open it.
- You’ll notice the domain information at the bottom. You may ignore the data that starts with the ‘#’ symbol as they’re only comments.
- To ensure the data is in the same format, copy and paste the entry with the IP address “127.0.0.1” and the localhost.
- Then, replace the localhost with the website URL address you want to block. For example, we are blocking “reddit.com” here.
- Now, also enter other URLs of the website, like “www.reddit.com” and “m.reddit.com.”
- Go to File and select Save to save your modified file.
- Reload the website and check if it’s blocked.
If you’re looking for an easier alternative, you can get an extension that directly allows you to block any website. But Firefox has relatively fewer extensions in its arsenal, we recommend using a safe choice that’s Block Site. Here’s how you can add it:
- Open Firefox and click on the Application menu icon in the upper-right corner.
- Go to Add-Ons and Themes or use the keyboard shortcut CTRL + Shift + A.
- Click on Extensions from the left panel and click on Find more add-ons.
- In the Find more add-ons option, select the search bar and then enter Block Site and then select to open it.
- Click on the Add to Firefox option.
- A new pop-up will appear asking you to confirm if you want to add it to the browser. Click on Add.
- In another window, click on the option that says “Allow this extension to run in Private Windows” to use this extension even when browsing privately. Then, click on Okay.
- To block a website using this extension every single time, you’ll need to protect your changes using a master password. From the Extensions icon, right-click on the Block Site extension and go to Options.
- In the new page, add a URL you want to block in the text field below the Add a Rule section. Then, click on Add.
- Then, scroll down to the bottom of the page. In the Master Password option, enter a new password. You can create a short one or a long one as there are no restrictions.
- Next, click on Save Options on the left of the Master Password.
- Now, other users can’t remove restricted website access without your Master Password.
Adjust Router Settings
One final method to block websites on all browsers and devices using the same network is accessing and modifying your router settings. How you access your router’s admin settings also slightly varies based on the router’s brand.
If you haven’t yet changed your router’s credentials, you can always try the default one that’s “admin” for both username and password.
- Open a browser and then enter your gateway IP address in the URL address bar. It looks similar to 192.168.10.1. Then, press Enter.
- If you want to find your gateway IP address, refer to these easy steps:
- Press Win + R keys and enter
cmd. This opens Command Prompt.
- Then, enter
ipconfigand press Enter.
- Note the IP address next to Default Gateway.
- Press Win + R keys and enter
- This will now open your router page. Enter the credentials accordingly and log in.
- Check and select any settings related to Blocking or Security. Then, navigate to URL Blocking. Check if you can turn it on. Then, click Save or Apply Changes.
- Add one or multiple URLs of the websites you want to block.
- Finally, Save the changes.