Although Firefox doesn’t have a built-in website blocking feature, you can install extensions to detect and block adult or restricted content. For a more comprehensive approach, you can modify the host file to block websites across multiple browsers. If you need to block access on multiple devices within a network, using a service like OpenDNS is the most effective method.
Steps
Using BlockSite

Launch Firefox on your computer. You can install various extensions on Firefox to block websites. These extensions are only supported on the desktop version. This method focuses on the popular BlockSite extension, which allows you to block specified websites.
- Firefox extensions can be bypassed relatively easily and only work within Firefox. If you want to block access to a website across all browsers, consider exploring other methods mentioned in this article.

Click on the Menu button (☰) and select "Add-ons". This action opens a new tab displaying your installed plugins.

Click on the "Get Add-ons" tab on the left side of the screen. You will see a variety of additional extensions available for Firefox.

Click on "See more add-ons" at the bottom of the page. This action opens a new tab showcasing the add-ons store.

Search for "BlockSite." The screen will display the BlockSite extension, which allows you to block websites quickly.
- There are numerous extensions with website blocking and filtering features. If BlockSite doesn’t meet your needs, try searching for keywords like "site block" or "parental control" to find alternatives.

Click on the "Add to Firefox" button and then "Install". This action installs BlockSite into Firefox.

Restart Firefox. You will be prompted to restart Firefox after installing the extension.

Click on "I don't want to help" in the new tab. This option prevents your browsing data from being sent to BlockSite.

Open BlockSite settings. Return to the Add-ons tab and click on "Extensions." From there, click on "Options" next to "Block site."

Set a password. Check the box for "Enable authentication" to set a password. Enter your desired password in the corresponding field. Anyone using Firefox will need to enter this password to access BlockSite settings.

Choose between "Blacklist" and "Whitelist". When using a blacklist, any added websites will be blocked. With a whitelist, all websites are blocked except those added. A whitelist is more effective if you want to restrict access to only a few safe websites.

Add a website to the list. Click the "Add" button and type or paste the website address into the corresponding field. This action adds the website to either the blacklist or whitelist, depending on your settings.
- You can use wildcards to block multiple related websites. For example, to block all sites with the word "drugs" in the address, enter *drugs*.
Edit the hosts file

Open the hosts file. This file allows you to redirect traffic from specific websites to a local address, effectively blocking them. This method affects all users on the computer. Editing the hosts file is most effective when blocking a small number of sites.
- Windows - Navigate to C:\Windows\System32\drivers\etc and double-click the hosts file. If prompted to choose a program, select "Notepad."
- macOS - Open Terminal from the Utilities folder. Type sudo nano /etc/hosts and enter your password when prompted. This opens the file in a text editor.

Add a new line at the end of the file. Enter the website you want to block on a new line at the bottom of the file.

Type 127.0.0.1 <site>. For example, to block Facebook, type 127.0.0.1 www.facebook.com.

Add additional websites on new lines. You can continue adding new lines to the file, with each website on a separate line. Remember to include 127.0.0.1 at the beginning of each line.
- Make sure to block the mobile version of the website as well. For example, if blocking Facebook, also block m.facebook.com.

Save the file when done. After editing the file, save your changes:
- Windows - Press Ctrl+S or select "Save" from the File menu.
- macOS - Press Ctrl+X and select "Yes" when prompted to save. Use the same filename to overwrite the original file.

Test the changes. After modifying the hosts file, try accessing the website on any browser. It should redirect to a blank page. This method affects all users on the computer, including private browsing sessions.
Using OpenDNS

Visit the OpenDNS website. OpenDNS is a DNS service that redirects adult or restricted content websites. This method allows you to block websites for all users on the same network, regardless of their browser or device. OpenDNS is a free service.
- Go to opendns.com in your browser.

Select "Personal" on the OpenDNS website. You will see various personal-use packages available.

Choose "OpenDNS Family Shield". This is a pre-configured filter designed to block adult or inappropriate content on your home network.
Select "Home routers". This option provides setup instructions for many popular router models.

Find your router in the list. If you don’t know your router model or can’t find it in the list, choose "FamilyShield Router Configuration Instructions."

Open your router’s configuration page. The process varies depending on your router and network setup. Refer to the article Accessing Your Router for detailed instructions.
- Typically, you enter your router’s IP address into a web browser, log in with your username and password, and access the configuration page.

Open the "Internet" or "WAN" section. This area contains the DNS settings for your router.

Disable automatic DNS. Many routers enable automatic DNS by default. You’ll need to disable this before manually entering DNS servers.

Enter the following two DNS servers. Input the addresses below into the corresponding DNS fields:
- 208.67.222.123
- 208.67.220.123

Click "Apply" or "Save Changes". This action applies the new settings and restarts the router. You may need to wait a minute for the network to reconnect.

Test the setup. The DNS servers will automatically redirect attempts to access blocked sites. Try entering an adult content website to ensure the method is working effectively.
