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 -
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:
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:
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.
Step 3: A pop-up window will show you asking for some permissions where click on the Add button to finalize the action.
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.
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.
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.
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.
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.
b) In the next step, you can schedule the days for the website to be blocked.
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.
d) Set the time to display the blocked site message.
e) Do not forget to click on Save to save all the changes you have made here.
f) You can also set a master password, which will help later to unblock the site by entering this password.
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.
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.
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:
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:
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.
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.
Step 3: Now, go to the C:\Windows\System32\drivers\etc 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.
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.
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:
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.
Make sure you will run the blocked website after clearing the history of the browser.
Step 7: Steps to clear the Firefox cache
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
On Google Chrome
On Microsoft Edge
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.
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 javatpoint tutorial website on the Mozilla Firefox browser and it showed a notification window pop-up as shown in the below screenshot.
Step 2: Here, click on the Never Allow button to block the notifications from the javatpoint website. It is same for almost all browsers.
Note the following points: