Block Websites on Firefox

While Firefox cannot block sites on its own, you can install extensions that will detect and block sites with adult or restricted content. If you need a more comprehensive method, you can edit the hosts file to ensure that the sites remain blocked regardless of the browser a person is using. If you need to block sites on multiple devices on your network, using a service like OpenDNS will be the most effective.

Steps

Using BlockSite

  1. Start Firefox on your computer. You can install various extensions for Firefox that allow you to block sites. These are only available for the desktop version of Firefox. This method will focus on a popular extension called BlockSite, which will allow you to block specific websites.
    • Firefox extensions are fairly easy to bypass, and only affect Firefox. If you're trying to completely prevent access to certain sites no matter which browser you're using, you may want to try a different method in this article.
  2. Click the Menu button (☰) and select "Add-ons." This will open a new tab with displaying your installed plugins.
  3. Click the "Get Add-ons" tab on the left side of the screen. This will display some featured add-ons for Firefox.
  4. Click "See more add-ons" at the bottom of the page. This will open another new tab with the add-ons market.
  5. Search for "BlockSite." This will display the BlockSite extension, which allows you quickly block specific websites.
    • There are lots of different extensions that can block and filter websites. If you're not satisfied with BlockSite, try a search for "site block" and "parental control" to find other extensions.
  6. Click the "Add to Firefox" button and then "Install." This will add BlockSite to your Firefox installation.
  7. Restart Firefox. You'll be prompted to restart after installing the extension.
  8. Click "I don't want to help" in the new tab. This will prevent your browsing data from being sent to BlockSite.
  9. Open the settings for BlockSite. Return to the Add-ons tab and click the "Extensions" section. From there, click the "Options" button next to "Block site."
  10. Set up a password. Check the "Enable authentication" box to setup a password. Type the password you want to use into the field. Anyone using Firefox will be prompted for this password when attempting to access the BlockSite settings.
  11. Select between "Blacklist" and "Whitelist." When using a blacklist, any website you add will be blocked. When you're using a whitelist, all websites are blocked except the one's you are adding. Whitelists are more effective for children when you want to limit them to just a few safe websites.
  12. Add sites to the list. Click the "Add" button and then type or paste the site address into the field. This will add it to your blacklist or whitelist, depending on your settings.
    • you can use wildcards to block lots of sites that match. For example, to block every site with "drugs" in the address, enter *drugs*.

Editing the hosts File

  1. Open the hosts file. This file allows you to reroute certain websites to a local address, effectively blocking them. This will affect all users on the computer. Editing the hosts file is only really effective when there are just a few sites you want to block.
    • Windows - Navigate to C:\Windows\System32\drivers\etc and double-click the hosts file. If prompted to select a program to open it in, select "Notepad."
    • macOS - Open the Terminal program from the Utilities folder. Type sudo nano /etc/hosts and enter your password when prompted. This will open it in an editor.
  2. Add a new line to the bottom of the file. You'll be adding websites you want to block to new lines at the end of the file.
  3. Type 127.0.0.1 . For example, if you want to block Facebook, type 127.0.0.1 www.facebook.com.
  4. Add additional sites to new lines. You can continue adding new lines to the file, each with a new site to block. Make sure to include 127.0.0.1 for each line.
    • You'll want to block the mobile versions of sites too. For example, if you blocked Facebook earlier, you'll also want to block m.facebook.com.
  5. Save the file when you're finished. Once you're finished editing the file, you'll need to save the 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.
  6. Test out the block. After changing the hosts file, you can try loading the website in any browser and it will redirect to a blank page. This will work for all users on that computer, and will also work in Private Browsing.[1]

Using OpenDNS

  1. Visit the OpenDNS website. OpenDNS is a DNS service that will reroute websites that contain adult or restricted content. This allows you to block websites for everyone on your network, regardless of what device or browser they're using. OpenDNS web filtering is a free service.
    • Visit opendns.com in your browser to get started.
  2. Select the "Personal" option on the OpenDNS website. This will display the different personal use packages.
  3. Select "OpenDNS Family Shield." This is a preconfigured filter that will block adult sites and other questionable content on your home network.
  4. Select "Home routers." This will list many popular routers with specific setup instructions.
  5. Find your router in the list. If you don't know your router, or can't find it on the list, select "FamilyShield Router Configuration Instructions."
  6. Open your router's configuration page. The process for this will vary depending on your router and home network setup. See Access a Router for detailed instructions.
    • Generally, you'll be entering the router's IP address into your web browser, logging in with the router admin username and password, and then accessing the settings pages.
  7. Open the "Internet" or "WAN" section. This section contains the DNS settings for your router.
  8. Disable automatic DNS. Many routers will have automatic DNS enabled. You'll likely need to disable this before you can enter your own DNS servers.
  9. Enter the following two DNS servers. Enter the following addresses into the first and second DNS server fields:
    • 208.67.222.123
    • 208.67.220.123
  10. Click "Apply" or "Save Changes." This will apply your new settings, which will restart your router. It may take a minute or so for it to come back online.
  11. Test out the blocking. The new DNS servers will automatically reroute traffic to blocked websites. Enter in an adult website to ensure that the blocking is working correctly.[2]



Related Articles

Sources and Citations