How to block websites and apps on Mac

The internet is a world of knowledge, yet kids (and even some adults) can sometimes come across inappropriate sites. Not to mention, dangerous websites and programs can cause problems for your Macbook.  


You might be wondering how to restrict websites on Mac. The good news is there are multiple ways to block sites on Mac. We’ve compiled the best ways to do it. Continue reading this article to find out how.




Sick of seeing annoying ads and banners? MacKeeper’s StopAd tool gives you the freedom to browse sites without annoying banners, providing you with more time and less hassle.


Here’s how to block annoying ads and banners with MacKeeper’s StopAd tool:

  1. Download MacKeeper
  2. Open MacKeeper and select StopAd
  3. Click Open
  4. Enable StopAd on your internet browser of choice. In your browser preferences, check all boxes next to the StopAd tab
  5. Return to the StopAd page and click Turn on next to your browser.

Block websites and apps with Screen Time

Please note: This method applies to macOS 10.15 Catalina or later. Continue to the next step for macOS Mojave 10.14 or earlier.


Screen Time is our first option. The solution aids Mac users with their usage, allowing you to block and filter adult content, online games, betting sites, etc.  


No matter why you need to block apps on Mac, it’s an easy fix with Screen Time. This method applies to all internet browsers: Google Chrome, Safari, etc.


Follow this process to block websites and apps with Screen Time:

  1. Open System Preferences > Screen Time
System Preferences User Interface

2. Select Add Limits, and then click the + (plus) sign

App Limit User Interface

3. Now you can choose what apps/websites you want to filter your usage. Check the box next to your desired category, or select the drop-down menu to check a certain website/app

App Limit Interface

4. If you scroll to the bottom, you’ll find Websites. Click the drop-down menu to select specific sites


5. When you check a specific app/website, you'll have the option to make your usage limit the same daily. Or you can choose Custom to set a different limit for each day


6. To customize your usage according to each day of the week, click Custom > Edit > Select your usage for each day > Done

App Limit User Interface

7. In the Content & Privacy tab, you can filter your web content, such as adult websites.

Parental Controls - Content & Privacy User Interface

That was pretty easy, don’t you think? Now we’re going to cover how to block apps and websites with Parental Controls.

Block websites and apps with Parental Controls

It’s safe to say that without Parental Controls, it would be trickier to protect your child's online usage. It helps you prevent your little ones from seeing anything inappropriate with ease.


Bear in mind that this option will only restrict websites and apps for your child's account, and won’t support the administration account. Thus, you won't be able to block yourself from websites.


Here’s how you can block websites and apps with Parental Controls:

  1. Open System Preferences
  2. Select Parental Controls
  3. Click the lock button to enter your password, then select Unlock
  4. Select the user from the left and enable them if you haven’t done so already
  5. Now, click the Web tab
  6. Here, you’ll see three options. To block a specific website by URL, select the middle option called Try to limit access to adult websites
  7. Select Customize
  8. Under the section named Never allow these websites, select the + (plus) sign and type the URL of the site you want to block
  9. When completed, click OK.

Now you know how to block websites and apps with Parental Controls. We’re going to dive into how to block websites using Terminal.

Block website by using Terminal

If you want to add extra protection, Terminal may be the best option for you. Your child is a lot less likely to reverse the restriction this way. Although it may seem more complicated than Screen Time and Parental Controls, it’s much easier than you think.  


To block websites by using Terminal, follow these instructions:

  1. Open Terminal from your dock with Applications > Utilities > Terminal. Or use Finder and select Go > Utilities > Terminal
  2. Now, you’ll be backing up the host's file. This way, you'll be able to restore to the original file if you encounter any problems. Do this by entering the following code into Terminal, and once completed, hit Enter: sudo /bin/cp /etc/hosts /etc/hosts-original
  3. Enter your administrator password and hit the Return key
  4. After that’s complete, copy the command below and then press Return: sudo nano -e /etc/hosts
  5. Scroll down with the arrow keys to the bottom line. Then enter with the name of the URL you wish to block. For instance, if you wanted to restrict Instagram, you’d type the following command:
Terminal User Interface

6. Enter each URL line by line. After you’ve entered all the websites, select Control + 0 > Enter. This will save the file. Use Control + X to exit the file


7. To implement changes across all browsers, you have to flush the cache. Enter the command below, then hit Return: sudo dscacheutil -flushcach


8. Now, this process is complete. When you try to access a restricted website, you’ll see a message that says you can't connect. A specific website can be made available again per you wish—use the Terminal on Mac to change the permissions.

Restricting content on Mac is a breeze, right?

How easy was that? You’ll now be able to restrict specific sites and block applications on Mac, or reverse them too.  


Also, you know how to block websites on Mac, so don’t forget to hide your browsing history with MacKeeper’s StopAd. Whilst using this Mac ad blocker, you can forget about unknown parties accessing your data.  


Now, decide which method works best for you. For extra protection, you can go with Terminal. If you want to restrict content on your children's account and not your own, Parental Controls should be your first pick. And if you want to block sites and customize daily usage, Screen Time is most suited.


P.S. If you want to know how to block websites in Safari or how to block a website in Chrome, we’ve got you covered.

Use your Mac to the fullest! Sign up and get:
Effective tips on how to fix Mac issues
Reliable advice on how to stay safe online
Mac-world news and updates

Thank you!

You’ll love exploring your Mac with us.

Oops, something went wrong.

Try again or reload a page.

Here’s another sign you need to upgrade your macOS ASAP:

30% off your MacKeeper subscription

Сopy the code now and use it in the MacKeeper checkout after the upgrade.

Copy Code

Please be aware that this code cannot be combined with any other discounts, offers, or promotions.



Tired of pop ups? Block annoying ads and banners with the StopAd tool

Try now

MacKeeper - your all-in-one solution for more space and maximum security.

Try Now

Read more

Stealth Mode in Mac
Stealth Mode in Mac
Do Macs need antivirus?
Do Macs need antivirus?

Run Application


Click Continue


Click Install


Your macOS version is lower than OS 10.11. We’d like to offer you MacKeeper 4 to solve the cleaning, privacy, and security issues of your macOS.