Home » How to block a website on Firefox

How to block a website on Firefox

by Online Tutorials Library

How to block a website on Firefox?

Sometimes when you browse on the internet through browsers like Mozilla Firefox or Chrome, you might suffer with the problem of unwanted pop-ups, notifications, and websites you do not want to access. Besides this, you want to restrict any website to be accessed in your browser to save from child-access.

Similarly asked questions –

  • How to block websites on Mozilla Firefox on Windows?
  • How to block websites on Mozilla Firefox on Android mobile?
  • How to block notification pop-ups on Mozilla Firefox?

Need to block a website

The users are intended to block a website when they get inappropriate content in terms of amount of data, malicious data. These sites interrupt between the work span and consume space as well.

Besides that, you need to block a website when you want to restrict the child-access on some websites, e.g., Facebook and Youtube. Therefore, you can block a website.

Note: When you block the website on any browser, it will stop running on it until you unblock it. It will show an error whenever you use it on the restricted browser.

How to block a website on Firefox

There are two methods discussed below to block a website on the Mozilla Firefox browser:

  1. Block a website using Add-on (extension)
  2. Block a website using hosts file in windows

See these different methods to block a website step by step:

Block the site on Mozilla Firefox using add-on

Mozilla Firefox browser offers some advanced tools to block the website, which restricts the users to access that website on Firefox. Here are the steps to block a website on Mozilla Firefox using the Block Site add-on:

Step 1: Open the Mozilla Firefox and click on the following link:

https://addons.mozilla.org/en-US/firefox/addon/block-website/

It is an add-on (like the Chrome extensions) called Block Site. It allows you to block a website whenever you needed.

Step 2: Here, click on the Add to Firefox button to add the extension to Firefox.

How to block a website on Firefox

Step 3: A pop-up window will show you asking for some permissions where click on the Add button to finalize the action.

How to block a website on Firefox

Step 4: If you want to allow that, the extension will also work in a private window, then mark the checkbox and click on the Okey, Got it.

How to block a website on Firefox

Step 5: Once the extension is added, you can manage the extension by clicking on the three-bar menu at the top-right corner in the browser and then select Add-ons.

How to block a website on Firefox

You can directly open it using the shortcut key Ctrl+Shift+A.

Step 6: This allows you to personalize the extension as needed. So, click on the Extensions at the left of the page.

How to block a website on Firefox

Step 7: Find the Block Site extension where you will get three dots along with the Block site tab. Here, click the Options tab resides inside the three dots to start blocking the websites.

You can enable or disable this extension anytime using the toggle button inside the Block Site tab.

How to block a website on Firefox

Step 8: Here, you have to provide the host to block the site and you can also schedule the day for blocking. Either you can block the site for all days of the week or set according to you.

In this example, we will block Instagram from running on Mozilla Firefox. See the further steps below:

Provide all the details one-by-one here:

a) First of all, enter the URL of the website in the Block a hostname textbox field that you want to block and then click on the Add button corresponding to it.

How to block a website on Firefox

b) In the next step, you can schedule the days for the website to be blocked.

How to block a website on Firefox

c) You can also provide the custom text for the website. It will display when someone tries to run this blocked website on the Mozilla Firefox browser.

How to block a website on Firefox

d) Set the time to display the blocked site message.

How to block a website on Firefox

e) Do not forget to click on Save to save all the changes you have made here.

How to block a website on Firefox

f) You can also set a master password, which will help later to unblock the site by entering this password.

How to block a website on Firefox

Step 9: Now, check and try to run the blocked website on Firefox and see the result. You will see that the website you blocked is not running on Mozilla Firefox and showing the custom message provided by you.

How to block a website on Firefox

This page will be automatically closed in a few seconds you have set. For example, we have provided 10 seconds.

Step 10: Enter the master password here and click on the Remove Blocking and unblock the site.

How to block a website on Firefox

Step 11: When you click on the Remove Blocking link after providing the correct password, the website will load automatically in front of you within a few seconds. See the screenshot below:

How to block a website on Firefox

Block the site using the hosts file in Windows

This method will restrict a site to access on all the browsers installed in your system. In this example, we will block Instagram to stop running on the Mozilla Firefox and all on the other browsers installed on your system.

Steps to block a website on all browsers

Following are the steps to block the website on Windows operating system:

For Windows:

Step 1: Press the Window Key and search for the Notepad in the search panel. In the search results, right-click on the Notepad and run it as Administrator.

How to block a website on Firefox

Before opening it, your system will ask for permission where you have to click on the Yes button.

Step 2: Navigate to the File menu where click on Open.

How to block a website on Firefox

Step 3: Now, go to the C:WindowsSystem32driversetc in your system, and change the file type to All Files to enable all files. Here you will see a text file named as hosts.

How to block a website on Firefox

Note: If files are not visible, change the type from txt file to All Files at the bottom right corner.

Step 2: Select the hosts file and click on Open to edit the file for blocking the site.

How to block a website on Firefox

Step 3: Go to the end of the file and place the address of the site along with an IP address 127.0.0.1 which you want to block in this file.

Copy and add the following lines at the end of the file to block Instagram on all browsers:

127.0.0.1 instagram.com
127.0.0.1 www.instagram.com
127.0.0.1 m.instagram.com

How to block a website on Firefox

Remember provide all the possible links of the website to open and does not use # at the start of the line.

Step 4: Now, save the updated file by pressing the Ctrl+S shortcut key and close the file.

Step 5: Before running the blocked website on the browser to check that the site is blocked successfully or not, clear the cache of the browser.

How to block a website on Firefox

Make sure you will run the blocked website after clearing the history of the browser.

Step 7: Steps to clear the Firefox cache

  • Click on the three-bars present at the top right corner of the Mozilla Firefox browser.
  • Click on Options, and then go to Privacy & Security at the left of the page.
  • Under the cookies and Site Data, click on the Clear Data.
  • From here, you can clear the cache of Firefox.

How to block a website on Firefox

Step 6: Run the website you blocked and see the result of different browsers. It will show the below error on running the blocked website on the browser.

On Mozilla Firefox

How to block a website on Firefox

On Google Chrome

How to block a website on Firefox

On Microsoft Edge

How to block a website on Firefox

Note: Notepad must be opened in administrator mode otherwise when you will save this file data, it will ask for administration permission or to save the file in Document folder (another location). Hence, this method will not work.

If this process does not work, then use Block Site add-on method to block a website from running on the Mozilla Firefox browser. The Block Site add-on method will work.

For MacOS:

Below are the steps to block the website on Mac operating system using the hosts file:

Step 1: On the Mac operating system, open the terminal. Make sure you must have the administrative password to use this method.

Step 2: Navigate to the etc/hosts file folder by typing the command sudo nano /etc/hosts and press Enter.

Step 3: A message will show you asking for the password to grant the administrative permission.

Step 4: Enter the password and press the Enter Key.

Note: On the Mac terminal, the password does not be visible to the use so no need to panic.

Step 5: A file will open up to you for editing. Use the bottom arrow key of the keyboard to move to the next new line in the file.

Step 6: Write the IP address 127.0.0.1 along with the website URL you want to block and press Enter.

E.g., 127.0.0.1 www.youtube.com

You can block any number of websites at once just provide their URLs in this file.

Step 7: Press the Ctrl+O key to save the file and press Ctrl+X to exit from the editor.

Step 8: Now, flush your Mac DNS cache.

Step 9: Finally, check the blocked website on the browser to run.

Need to block/turn off notification

Every time when you visit a new website, a small notification window pop-up having the Block or Allow notification button for that particular website. If you allow notification, then the notification pop-ups interrupt between the process and create disturbance in reading and the user loss his/her focus.

If you allow the notification here, the website will send you the notifications for all updates of that website to your id.

Step of block notifications on Mozilla Firefox

Following steps to block the notification of the particular website for new updates on the Mozilla Firefox browser:

Step 1: For example, we have opened the TutorAspire tutorial website on the Mozilla Firefox browser and it showed a notification window pop-up as shown in the below screenshot.

How to block a website on Firefox

Step 2: Here, click on the Never Allow button to block the notifications from the TutorAspire website. It is same for almost all browsers.

How to block a website on Firefox

Note the following points:

Note:

  • If you want to allow the notification for all updates from the website, click on the Allow Notifications.
  • If you don’t want to get notifications for all updates from the website, click on the Never Allow button.

You may also like