The fastest way to block a site in Firefox
Mozilla Firefox does not have a built-in site blocker in its core settings. To block websites, you need to install an extension — a small program that adds blocking features to your browser. The most straightforward option is uBlock Origin, which blocks ads by default but can also prevent you from visiting specific sites you choose.
Install uBlock Origin from the Firefox Add-ons store, then click its icon in your toolbar and select the settings gear. Go to the "My filters" tab, and type ||example.com^ (replacing example.com with the site you want to block). Save the filter, and Firefox will refuse to load that site. You can add multiple sites this way, one per line.
If you want something simpler that focuses only on blocking without managing ads, LeechBlock NG is designed specifically for site blocking. It lets you create block lists, set times when sites are blocked, and even password-protect your settings so you cannot unblock a site on impulse.
Key Takeaways
- Firefox requires an extension to block websites — the browser itself has no built-in blocking feature.
- uBlock Origin is free, widely used, and can block specific sites by adding filter rules in its settings.
- LeechBlock NG is a dedicated blocking tool that lets you set schedules and password-protect your block list.
- You can block entire domains or specific pages, and most extensions let you add or remove blocks at any time.
Installing and setting up uBlock Origin
Go to addons.mozilla.org, search for "uBlock Origin," and click "Add to Firefox." Firefox will ask for permission; click "Add" to confirm. The extension icon appears in your toolbar — usually a red and white shield.
Click the uBlock Origin icon and select the gear icon in the bottom right of the popup. This opens the settings dashboard. Click the "My filters" tab at the top. In the text box, type the domain you want to block in this format: ||example.com^. Press Enter or click "Apply changes." The site is now blocked.
To block multiple sites, add each on a new line. To unblock a site later, return to "My filters," find the line with that domain, delete it, and click "Apply changes" again. You can also use more specific filters — for example, ||example.com/section^ blocks only a particular section of a site.
Using LeechBlock NG for scheduled blocking
LeechBlock NG works differently from uBlock Origin. Instead of filter rules, you create a list of sites and set times when they are blocked. This is useful if you want to prevent access to a site only during work hours or study time, then allow it outside those windows.
Install LeechBlock NG from the Firefox Add-ons store. Click its icon in your toolbar. In the "Sites" section, type the domain you want to block (for example, facebook.com). In the "Times" section below, set the hours when the block is active — for instance, 9 AM to 5 PM on weekdays. Click "Save" and the block takes effect immediately.
LeechBlock NG also lets you set a password to prevent yourself from disabling the block on impulse. Go to the "Options" tab, set a password, and confirm it. From then on, turning off the block or changing its settings requires that password.
Blocking sites for specific times or days
LeechBlock NG is the better choice if you want to block a site only during certain hours. For example, you might block social media from 9 AM to 6 PM on weekdays but allow it on weekends. Set up the site in the "Sites" section, then use the "Times" grid to select which days and hours the block applies.
The time grid shows days across the top and hours down the left side. Click the cells you want to block — they turn red. Leave cells blank if you want the site to be accessible during those times. This approach works well for productivity: block distracting sites during work or study hours, then unblock them automatically when those hours end.
If you need the same block schedule for multiple sites, LeechBlock NG lets you copy settings from one site to another. This saves time if you are blocking five social media platforms with identical schedules.
Blocking sites with parental controls in mind
If you are setting up Firefox for a child or young person, blocking sites with a password-protected extension prevents them from simply removing the block. LeechBlock NG's password feature is designed for this — once you set a password, the child cannot access settings without it.
Add the sites you want to block to LeechBlock NG's list, set the times, then set a password in the Options tab. The child can use Firefox normally, but attempting to visit a blocked site shows a message that the site is blocked, and they cannot bypass it without the password.
For a more comprehensive parental control setup, consider that Firefox also has a "Restricted Profiles" feature built into the browser itself. This limits what a profile can do at the browser level, though it is less flexible than an extension for blocking specific sites.
Removing blocks and managing your block list
In uBlock Origin, removing a block is straightforward: click the icon, go to "My filters," find the line with the domain you want to unblock, delete it, and click "Apply changes." The site is immediately accessible again.
In LeechBlock NG, click the icon and find the site in the "Sites" list. Click the trash icon next to it to remove the block entirely, or modify the times in the grid to allow access during certain hours. Changes take effect immediately.
Both extensions let you see your full block list at any time. This is useful if you have blocked many sites and need to remember what is restricted. You can also temporarily disable an extension entirely by clicking "Manage Extensions" in Firefox settings, though this removes all blocks at once rather than selectively.
Blocking sites without an extension
Firefox itself does not offer site blocking in its settings. However, you can use your operating system's hosts file to block sites at a deeper level — this works across all browsers, not just Firefox. On Windows, the hosts file is at C:\Windows\System32\drivers\etc\hosts. On Mac and Linux, it is at /etc/hosts.
Editing the hosts file requires administrator access and is more technical than using an extension. You add a line like 127.0.0.1 example.com to redirect the site to your own computer, making it unreachable. This method blocks a site for your entire device, not just Firefox, and the block persists even if you uninstall extensions.
For most people, an extension is simpler and more flexible. The hosts file approach is useful only if you want a permanent, system-wide block that cannot be easily removed.
Frequently Asked Questions
Can I block a site on Firefox without installing an extension?
Firefox's built-in settings do not include site blocking. You can edit your operating system's hosts file to block sites system-wide, but this requires technical knowledge and administrator access. An extension like uBlock Origin or LeechBlock NG is simpler for most people.
Will blocking a site in Firefox block it on my phone too?
No. Firefox extensions only work on the device where you install them. If you use Firefox on both a computer and a phone, you need to set up blocking separately on each device. Firefox on Android has fewer extensions available than the desktop version.
Can someone unblock a site if I have set a password in LeechBlock NG?
Not without the password. LeechBlock NG's password protection prevents access to the settings where blocks are managed. However, a determined person with technical knowledge could uninstall the extension entirely or access the browser's profile files directly. It is not foolproof, but it stops casual bypassing.
What happens if I block a site by mistake?
You can unblock it immediately by opening the extension settings and removing the block. In uBlock Origin, delete the filter line. In LeechBlock NG, click the trash icon next to the site name. The site becomes accessible again within seconds.
Do these extensions slow down Firefox?
uBlock Origin and LeechBlock NG use minimal resources. Most users notice no slowdown. uBlock Origin may actually speed up browsing slightly because it blocks ads and tracking scripts that would otherwise load. If you install many extensions, Firefox may slow down, but one or two blocking extensions have negligible impact.