PDF download Download Article
Block a single specific website in Mozilla Firefox
PDF download Download Article

To block a certain website in Firefox, you can use the "Block Site" browser add-on. You can also create a new rule in Windows Defender, or edit your host files on Mac. Here's how to block websites on Firefox using your Windows or Mac computer, iPhone, iPad, or Android.

Blocking Specific Websites on Firefox

  • Download the Block Site add-on to Firefox. Open Block Site's options, enter the URL you want to block and click Add .
  • Create a new rule in Windows Firewall Defender. Add the website's IP address and select Block the connection .
  • Download and use LeechBlock NG to block websites on the Firefox mobile app for Android.
Method 1
Method 1 of 6:

Using an Add-On

PDF download Download Article
  1. Go to https://addons.mozilla.org/en-US/firefox/addon/block-website . This add-on, called Block Site (by Ray), lets you block individual websites in Firefox. It also lets you set up a private password so you'll be the only person who can remove sites from the block list.
    • This Firefox add-on is a part of Firefox's Recommended Extensions program, which means Firefox staff has vetted its functionality and security. [1] Still, research add-ons before installing them.
  2. You can find this next to the add-on description.
    Advertisement
  3. This adds the extension to Firefox.
  4. This appears in the top-right corner of the browser on the "Block Site has been added to Firefox" window. Checking this option ensures that websites you block will remain blocked when someone tries to open a private browsing window.
  5. The add-on is now ready to use.
  6. This is at the top-right corner of the window, next to the menu.
    • The Add-ons page will open.
  7. This is in the left panel.
  8. Scroll down until you find the Block Site heading, click the three horizontal dots beside it, and then select Options .
  9. This address goes into the "Block a new hostname" field at the top of the page.
    • For example, if you wanted to block X (Twitter), you would type www.x.com into this text box.
  10. The site you entered will now appear under "Existing Rules" at the top of the page.
    • You can remove sites from this list at any time by clicking Remove next to its entry.
    • If you want blocked sites to redirect to a specific page (e.g., Google), click the "Redirect to" text box and type an address. If you skip this step, Block Site will simply redirect people who attempt to go to the site to a page that says "Restricted Access".
    • Add additional sites to the block list by entering their addresses into the "Block a new hostname" field and clicking Add .
  11. Scroll down to the "Master password" text box at the bottom of the page and type a password you'll remember. This password will be required to make changes to the blocked site list.
  12. It's at the bottom of the page. Once your settings are saved, the sites you entered will be blocked to everyone who uses Firefox. When you want to edit your settings, return to the Options area of Block Site , enter the master password, and make your changes.
  13. Advertisement
Method 2
Method 2 of 6:

Using Windows Firewall Defender

PDF download Download Article
  1. Open the Start menu and search for "cmd". Right-click the Command Prompt and select Run as administrator . [2]
  2. Press Enter when you're finished. This will retrieve the website's IP address.
    • Take note of the IP address.
  3. You can type this into the Start menu or find it in the settings.
  4. This is in the left panel.
    • A new window will open.
  5. This is underneath the Actions header in the right panel.
  6. This is the last option.
  7. This is the top option.
  8. This is in the bottom section, under Which remote IP addresses does this rule apply to? .
  9. The window will close.
  10. The website will now be blocked on Firefox and any other browser.
  11. Advertisement
Method 3
Method 3 of 6:

Blocking Cookies and Site Data

PDF download Download Article
  1. Click in the top-right corner and select Settings . A new window will open.
  2. This is in the left panel.
  3. You can find this under the Cookies and Site Data header; you may need to scroll down to find it.
  4. This goes in the Address of website field.
  5. This will add the website to the list.
  6. This is the blue button at the bottom of the window.
  7. Advertisement
Method 4
Method 4 of 6:

Using the Hosts File on macOS

PDF download Download Article
  1. To do this on your Mac, click the magnifying glass at the top-right corner of the screen to open Spotlight, type terminal into the search bar, and then press Return .
    • This method will block a specific website from all browsers, not just Firefox.
    • You must have your administrator password to use this method.
  2. A password prompt will appear.
  3. You won't see the characters you type, but that's by design. This opens the file for editing.
  4. You can stop moving downward once the mouse cursor is on its own new line. There should be no other characters on the line you'll be typing on.
  5. For example, if you want to block YouTube, type www.youtube.com . Don't include the "https://" or anything after the domain name.
    • To block another site, press the Return key to open a new line, type 127.0.0.1 , press the Tab key, and then enter the next address.
  6. This saves the file.
  7. This exits the editor.
  8. To do this on macOS Sierra and later, type sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache at the prompt and press the Return key. [3] This resets your computer’s DNS cache, allowing the blocking to begin.
    • If you're using macOS El Capitan, use sudo killall -HUP mDNSResponder instead.
  9. Advertisement
Method 5
Method 5 of 6:

Using Android

PDF download Download Article
  1. Visit https://addons.mozilla.org/en-US/android/addon/leechblock-ng in Firefox. Leechblock NG is a free Firefox add-on that lets you block websites in the browser. You can even choose to block the site only during certain time periods and set a password so nobody else can edit the block list.
    • Leechblock NG has nearly all positive ratings on the Firefox Add-ons site and is updated regularly. Still, make sure to research add-ons before installing them.
    • This will only work for Firefox, not other browsers on your Android.
  2. A warning message will show you which permissions Leechblock NG needs to work.
  3. This installs the add-on.
  4. It's the three vertical dots at the top-right corner of Firefox.
  5. A list of installed add-ons will appear.
  6. This opens the settings page for LeechBlock.
    • You'll see several tabs called Block Set 1, Block Set 2, etc. You can designate a tab for specific blocking settings. For example, if you want to block certain sites 100% of the time, you could add those to one tab. If you only wanted to block certain sites between midnight and 6 AM, you could add those to a separate tab.
  7. You could call it "Block List" or something similar.
    • If you want to create separate block lists, feel free to enter a name that's more reflective of the sites/settings you'll be using on this tab.
  8. Enter the site(s) you want to block. Each blocked site should appear on its own line. Don't worry about adding the "https://" at the beginning.
    • For example, if you wanted to block X, you could just enter www.x.com or x.com .
    • To add another site, press the Enter key on your keyboard and type the next address.
  9. You can choose times and dates if you'd like.
    • If you want to block the site(s) all the time, tap the All Day button. Otherwise, enter your desired times.
    • To block sites every day of the week, check the boxes next to all 7 days.
  10. You can return to that tab any time you wish.
    • Feel free to create additional tabs for other times and dates now.
  11. This is where you can set a password so nobody can undo your settings.
  12. It's the first drop-down menu on the page. For best results, select Require the user to enter a password here.
  13. It can be as many or as few letters as you'd like.
  14. Now that your options are saved, anyone who attempts to visit the selected sites in Firefox will be unable to do so. If they attempt to change the app settings, they won't be able to without your password.
  15. Advertisement
Method 6
Method 6 of 6:

Using iPhone or iPad

PDF download Download Article
  1. This resembles a set of gears on a grey background.
    • This method will also restrict websites in other web browsers on your iPhone or iPad, including Chrome and Safari.
  2. It's in the second group of settings.
  3. If you don’t see this option, Screen Time is already enabled and you can skip to step 6.
  4. This turns on Screen Time, a tool that allows you to monitor and regulate your iPhone or iPad usage.
  5. If you’re using your child’s iPhone, you can tap This is my Child’s iPhone instead, giving you other options for regulating your child’s time on this device.
  6. This is towards the bottom of the page.
  7. The switch will turn green.
  8. It’s near the top of the menu.
  9. It’s under the WEB CONTENT header.
  10. This is the middle option.
  11. It’s the second instance of “Add Website” on the menu (at the bottom).
  12. This adds the website to the block list and begins blocking it immediately.
    • For example, if you wanted to block Google, you would type in www.google.com here.
  13. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Is it possible to put a custom message on the blocked site?
    Community Answer
    Not without a serious amount of effort and, more importantly, considerable risk to your privacy and security. You can have a local file containing a custom layout and message displayed, but the method to achieve this overrides browser security protocols, which is not a good idea. In any case, it won't be possible for the whole network using OpenDNS, but only for single PCs or mobile devices, manipulating host files and browser configurations on each of them. I don't recommend it, as you'd leave your machines wide open to attack.
  • Question
    Is this part of Firefox or another third party program?
    Community Answer
    This is a third party program. However, reputable Firefox addons are almost always safe to install and use.
  • Question
    How do I unblock a site on Firefox that was blocked by mistake?
    Tom Smith
    Community Answer
    Press Ctrl+Shift+A to open the add-ons and go to extensions. Find the "Block Site" add-on and open the menu by pressing the "---". Click "Options". This will open the page of options for the add-on. Find the blocked website under "Existing Rules" and click the word "Remove". Scroll down and click "Save". It is now unblocked!
See more answers
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Article Summary X

      1. Go to https://addons.mozilla.org/en-US/firefox/addon/block-website .
      2. Click + Add to Firefox .
      3. Click Add .
      4. Check the box and click OK, Got It .
      5. Open the menu and select Add-ons > Extensions .
      6. Click the Block Site menu button and select Options .
      7. Enter a web address and click Add .
      8. Create a password and click Save .

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 882,094 times.

      Reader Success Stories

      • Grace A.

        Dec 30, 2017

        "I'm trying to block my children from getting distracted on YouTube when they are supposed to be using the ..." more
        Rated this article:
      Share your story

      Is this article up to date?

      Advertisement