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. 2
    Click the blue + Add to Firefox button. You can find this next to the add-on description.
    Advertisement
  3. 3
    Click Add on the pop-up warning. This adds the extension to Firefox.
  4. 4
    Check the box next to "Allow this extension to run in Private Windows". 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. 5
    Click the blue Okay, Got It button to confirm. The add-on is now ready to use.
  6. 6
    Click the puzzle piece icon. This is at the top-right corner of the window, next to the menu.
    • The Add-ons page will open.
  7. 7
    Click Extensions . This is in the left panel.
  8. 8
    Open Block Site's options page. Scroll down until you find the Block Site heading, click the three horizontal dots beside it, and then select Options .
  9. 9
    Type or paste the URL of a website you want to block. 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. 10
    Click Add to add the site to the block list. 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. 11
    Create a master password. 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. 12
    Click Save to save your changes. 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. 1
    Open the Command Prompt as an administrator. Open the Start menu and search for "cmd". Right-click the Command Prompt and select Run as administrator . [2]
  2. 2
    Type nslookup followed by the website URL. Press Enter when you're finished. This will retrieve the website's IP address.
    • Take note of the IP address.
  3. 3
    Open Windows Defender Firewall. You can type this into the Start menu or find it in the settings.
  4. 4
    Click Advanced settings . This is in the left panel.
    • A new window will open.
  5. 5
    Click New Rule… . This is underneath the Actions header in the right panel.
  6. 6
    Select Custom and click Next . This is the last option.
  7. 7
    Select All programs and click Next . This is the top option.
  8. 8
    Click Add… . This is in the bottom section, under Which remote IP addresses does this rule apply to? .
  9. 9
    Enter the IP address of the website and click OK . The window will close.
  10. 10
    Select Block the connection and click Next .
  11. 11
    Enter a name and click Finish . The website will now be blocked on Firefox and any other browser.
  12. Advertisement
Method 3
Method 3 of 6:

Blocking Cookies and Site Data

PDF download Download Article
  1. 1
    Open Firefox's settings. Click in the top-right corner and select Settings . A new window will open.
  2. 2
    Click Privacy & Security . This is in the left panel.
  3. 3
    Click Manage Exceptions… . You can find this under the Cookies and Site Data header; you may need to scroll down to find it.
  4. 4
    Type or paste the URL of a website. This goes in the Address of website field.
  5. 5
    Click Block . This will add the website to the list.
  6. 6
    Click Save Changes . 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. 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. 2
    Tap + Add to Firefox . A warning message will show you which permissions Leechblock NG needs to work.
  3. 3
    Review the warning and tap ADD . This installs the add-on.
  4. 4
    Tap the menu . It's the three vertical dots at the top-right corner of Firefox.
  5. 5
    Tap Add-ons on the menu. A list of installed add-ons will appear.
  6. 6
    Tap LeechBlock NG and select Options . 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. 7
    Enter a name for your block set. 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. 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. 9
    Choose when to block the site(s). 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. 10
    Tap Save Options at the bottom of the page. You can return to that tab any time you wish.
    • Feel free to create additional tabs for other times and dates now.
  11. 11
    Tap the General tab. This is where you can set a password so nobody can undo your settings.
  12. 12
    Select a password option under "Access Control." It's the first drop-down menu on the page. For best results, select Require the user to enter a password here.
  13. 13
    Enter a password you'll remember. It can be as many or as few letters as you'd like.
  14. 14
    Scroll down and tap Save Options & Close . 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. It's in the second group of settings.
  2. If you don’t see this option, Screen Time is already enabled and you can skip to step 6.
  3. This turns on Screen Time, a tool that allows you to monitor and regulate your iPhone or iPad usage.
  4. 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.
  5. This is towards the bottom of the page.
  6. 8
    Tap Store, Web, Siri & Game Center Content . It’s near the top of the menu.
  7. It’s under the WEB CONTENT header.
  8. This is the middle option.
  9. It’s the second instance of “Add Website” on the menu (at the bottom).
  10. 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.
  11. 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
      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 864,689 times.

      Is this article up to date?

      Advertisement