How To'sHow to block websites on MAC browser

How to block websites on MAC browser

There are many ways to blocks unwanted websites on Mac OS X. The first that comes into your mind might be the Mac built-in parental controls, which is perfectly easy to be done. Likewise, there are many methods to bypass the built-in parental controls. Only making use of built-in parental controls is not far enough for your tech-savvy child. Here, I will introduce several other free ways to block unwanted content on a Mac OS X.

How to Block Websites on Firefox for Mac

There is no in-built options to bock websites in Firefox for Mac. However, Firefox does have a large selection of extensions and add-ons to block the websites that you want.

    • Block Websites on Firefox for Mac
      Block Websites on Firefox for Mac

      Open Firefox browser, go to “Tools”―”Add-ons”.

    • In this Add-ons page, search for “BlockSite”. Click “Install” to continue the installation. It will look like below:

      Addon Firefox
      Addon Firefox
    • Click “Restart now” to finalize the installation process.
    • Go to “My Add-ons” and click “Preferences” to load the options.
    • In the “Enable functions” options, check the function options that you want to enable. If you want to set a password for the BlockSite, Check “Enable authentication” and then type a password in the “New password” box.
  • Click “Add” and then type in a website URL. Repeat this process with all websites that you want to block in Firefox. Then click “OK” to save changes. If you set up a password, you will be prompted to enter it every time you try to change the “BlockSite” details.

How to Block Websites on Google Chrome for Mac

Chrome Nanny is an extension for Google Chrome which can be used to block websites on OS X Chrome. You can set up white-lists, black-lists and more. It provides all the flexibility that you need so as to effectively use your time online and can be also disabled or uninstalled with a click.

    • Right-click the “ADD TO CHROME” button, and click “Add” to install.
    • If you install it successfully, a small window will pop up, saying “Nanny for Google Chrome (TM) has been added to Chrome.” You can see it below.
    • Right-click the “Customize and control Google Chrome” button which looks like bold ““. Go to “Tools”―”Extensions”.
    • Right-click “Extensions” to load the extensions page.
    • Check “Enabled”, then click Options. Now it will look like below:
  • Add the URLs and names of the websites that you want to block in the “Blocked URLs” box, and then click “Save URL”.

There are many options in Chrome Nanny. You can set it according to your own choices.

Notice: Browser like Firefox or Google Chrome has its own add-ons or extensions to block sites. However, no one works with Safari or the whole Mac system.

Mac OS X has a host file just like Windows. We can also edit Hosts via Terminal on a Mac to block specific websites that you don’t want to be accessed. Not only does it work in Safari, but also it works with the whole Mac system.

Use Terminal to Block Websites on Mac

    • Click the “Finder,” select “Applications,” choose the “Utilities” folder and click “Terminal.”
    • Type “cp /etc/hosts ~/Desktop/hosts.txt” (without the quotes) to copy your current hosts.txt file to the desktop as backup.
    • Type “sudo pico /etc/hosts”.
    • Enter your Macintosh administrator password and press “Enter.”
  • Use the arrow key to move the block cursor down to the bottom of the file and enter the IP address “” followed by the domain name you want to block. This tells the computer that the address for that domain is now that IP number, which is your local Macintosh, and the browser won’t be able to resolve that domain to a Web page.
    • Press “Ctrl-X” to exit after you have entered all the domains you wish to block. The domains need to be on separate lines. You will be prompted to save. Press “Y” for Yes.
  • Please run the following command in Terminal to take the changes take into effect:
      1. If you are using Mac OS 10.4.X, please type the following and press Enter:
        lookup –flushcache
    1. For Mac OS 10.5.X and later, it can be done by entering the following and press Enter:
      sudo dscacheutil –flushcache
    • Click the Terminal menu and select Quit Terminal to exit.
  • Open Safari and type in the domains you blocked in the host’s file. All other browsers on your machine will be blocked from accessing that domain as well.
  • You can enter as many domains as you want into the hosts’ file, but put each command on a new line and remember this action blocks them from all users of the computer, including you.

We can block any sites we don’t allow to on Mac by modifying the host file. However, we do not recommend this way if you are not proficient at Mac.
Most of the ways above can only block the site one by one.

If you want to block porn content in a large scales, such as blocking sites by keywords, you may need a professional filter, like the Mac website blocker. It has more options then freeways and It is quite easy to use.

Daniel Odoh
Daniel Odoh
A technology writer and smartphone enthusiast with over 9 years of experience. With a deep understanding of the latest advancements in mobile technology, I deliver informative and engaging content on smartphone features, trends, and optimization. My expertise extends beyond smartphones to include software, hardware, and emerging technologies like AI and IoT, making me a versatile contributor to any tech-related publication.

Popular Posts

Related Articles


Please enter your comment!
Please enter your name here