The simplest way to block a website in Firefox

Firefox does not have a built-in website blocker in its main settings. Instead, you block sites using an extension — a small program that adds features to your browser. The most straightforward option is an extension called LeechBlock NG, which you install from Firefox's add-on store and then tell which websites to block.

When you try to visit a blocked site, Firefox shows you a message instead of the webpage. The block stays in place until you remove it or disable the extension. This method works whether you want to block one site or dozens.

If you want to block sites only during certain hours — for example, to avoid social media during work — LeechBlock NG can do that too. You set the times, and the block turns on and off automatically.

Key Takeaways

  • Firefox requires an extension to block websites; the browser itself has no built-in blocking feature.
  • LeechBlock NG is a free extension that blocks sites you choose and can restrict access to specific hours of the day.
  • You install extensions from Firefox's official add-on store, and they work when ready after installation.
  • Blocking a site in Firefox only affects that browser on that device — it does not block the site on your phone or other computers.
  • If you forget your block password, you will need to uninstall and reinstall the extension to remove the block.

How to install LeechBlock NG

Open Firefox and go to the address bar. Type addons.mozilla.org and press Enter. In the search box at the top, type "LeechBlock NG" and click the result that appears. Click the blue "Add to Firefox" button.

Firefox will ask you to confirm. Click "Add" in the popup that appears. The extension installs in seconds, and a small icon appears in the top right corner of your browser window. That icon is how you access your block list.

You do not need to restart Firefox or change any settings. The extension is ready to use when ready.

Adding websites to your block list

Click the LeechBlock NG icon in the top right corner of Firefox. A menu appears with options. Click "Options" to open the settings page. You will see a list of websites you can block, organized by category (Social Networking, Video, News, and so on).

Find the category that matches the site you want to block, or scroll down to "Custom" to add any website. Type the website address — for example, reddit.com or youtube.com — into the text box. Click "Add" or press Enter. The site is now blocked.

If you want to block the site only during certain hours, click "Time restrictions" on the same page. Set the start and end times, and choose which days of the week the block should be active. Save your changes.

Setting a password so you cannot unblock sites by accident

On the LeechBlock NG options page, scroll down to "Password protection." Check the box that says "Password protect settings." Type a password you will remember, then type it again to confirm.

Now, if you try to change or remove a block, Firefox will ask for your password. This prevents you from disabling the extension in a moment of weakness. Write your password down somewhere safe — if you forget it, you will have to uninstall the extension entirely to remove the blocks.

You can change your password anytime by returning to the same settings page and entering your current password first.

Other extensions that block websites

Freedom is another option if you want more control. It blocks websites and apps across your entire device, not just Firefox. It costs money but works on Windows, Mac, iPhone, and Android. You set it up once, and the blocks follow you across all your devices.

Cold Turkey is stricter — once you set a block, you cannot disable it until the time you set expires, even if you restart your computer. This is useful if you need a block you cannot escape. It also costs money.

StayFocusd works only in Chrome, not Firefox, but it is worth knowing about if you use multiple browsers. Each extension has different features, so choose based on how much control you want and whether you need the block to work across devices.

Blocking a website without an extension

If you do not want to install an extension, you can use your operating system's hosts file to block websites. This method works on Windows, Mac, and Linux, but it is more technical and blocks the site in every browser, not just Firefox.

On Windows, you edit a file called hosts located at C:\Windows\System32\drivers\etc\hosts. On Mac or Linux, it is at /etc/hosts. You add a line that tells your computer to treat the website address as a fake address that does not exist. This requires administrator access and is not reversible without editing the file again.

Most people find an extension easier because you can turn the block on and off without technical steps. The hosts file method is better if you want a permanent block that affects all browsers.

What happens when you try to visit a blocked site

When you navigate to a blocked website, Firefox does not load the page. Instead, LeechBlock NG shows a message saying the site is blocked. The message includes the time the block will end (if you set a time restriction) or tells you the block is permanent.

Some extensions let you customize this message. You can add your own text to remind yourself why you blocked the site — for example, "You are supposed to be working" or "Check your to-do list first." This extra reminder can help you stick to your decision to avoid the site.

Frequently Asked Questions

Does blocking a website in Firefox block it on my phone too?

No. Firefox extensions only work in Firefox on the device where you installed them. If you want to block a site on your phone, you need to install a blocking app on that phone separately. Some paid services like Freedom sync blocks across devices, but the free Firefox extensions do not.

Can I block a website for only one person on my computer?

Not with LeechBlock NG. Extensions are tied to your Firefox profile, so if someone else uses Firefox on the same computer with a different profile, they will not see your blocks. If you share a profile, anyone with access to Firefox can see and potentially disable your blocks (unless you password-protect them).

What if I block a website and then forget why?

Open the LeechBlock NG options page and look at your block list. You can see every site you blocked. If you want to unblock one, click the X next to it (or enter your password if you set one). You can also edit the custom message to remind yourself of the reason next time you try to visit.

Does blocking a website slow down Firefox?

No. LeechBlock NG uses very little computer power. You will not notice any difference in how fast Firefox runs. The extension only checks the website address when you try to visit a site, so it has almost no impact on performance.

Can I block a website only on weekdays?

Yes. In LeechBlock NG options, click "Time restrictions" for the site you want to block. Check the boxes for Monday through Friday only, and set your hours. The block will be active only on those days. You can set different times for different days if you want.