Safari

Effective Ways to Block Websites on Safari

Learn different ways you can effectively block websites on the Safari browser.

techlockdown logo
Tech Lockdown Team
|
Updated May 13, 2024

If you're trying to control what websites are accessed on your Apple devices, then you may have wondered how you can block specific websites on Safari. Fortunately, there are a few different ways that you can do this on both MacOS and iOS.

There are a few ways to block websites in Safari. Consider combining these methods together if you are trying to prevent websites from easily being unblocked.

  1. Point your Apple device to a DNS Content Policy, which will allow you to block websites comprehensively in Safari.
  2. On MacOS, the hosts file is a reliable way to block websites on Safari.
  3. Adding to these methods, Apple's Screen Time web content filter can be used to specify website blocklists, which will block websites in Safari on a Mac or iOS device.

Configure a DNS Content Policy to Block Websites on Safari

The best way to block websites on Safari or other browsers is to set a DNS Content Policy . A Content Policy allows you to control what kinds of content your Apple devices can access in Safari, who can access it, and when it can be accessed.

You can specify domains that you want to block with a DNS Content Policy.

Furthermore, you can specific apps to block . For example. instead of blocking the facebook.com domain to block Facebook in Safari, you would update your DNS Content Policy to block the facebook app.

An ideal approach to blocking websites in Safari with a content policy is to block entire categories, which saves you from having to manually add tons of websites to a blocklist.

Sometimes, you don't want to block a website all the time. You can instead, block the website according to a schedule that you've set.

You can also invite people to  share your Content Policy , then apply different schedules for each person separately.

Want to prevent changes to your Content Policy? Lock your profile to prevent easily changing your own settings.

You can still make your content policy more restrictive, but will have to unlock your profile if you want to make it less restrictive. 

Get Powerful DNS Filtering
Get Powerful DNS Filtering
Create and enforce a Content Policy on all your devices.

Block Websites on Safari Using Apple's Web Content Filter

You can access a useful web content filter through Apple parental controls . Screen Time can do more than just keep track of how much you use apps on your iPhone or Mac. It includes some basic website blocking features, that while easy to reset, can be used in certain situations.

Screen Time can be used on both Mac and iPad/iPhone devices. The first step is to find these settings.

On Mac, you should be able to use Spotlight to search for and open "Screen Time". You should be able to access a Content & Privacy section like this:

On iPhones, you need to open your device's Settings, then scroll down to Screen Time. The menu should look like this:

The instructions between iPhone and Mac are going to be slightly different.

Configuring the Web Content Filter to Block Websites in Safari on MacOS

First, open the Screen Time menu. You can do this by using Spotlight to search for and open "Screen Time".

From the main overview screen, click on the Content & Privacy Restrictions option from the side menu.

From here, you want to find Web Content entry (this should be under the Content tab). You can choose to set this to Limit Adult Websites.

To block specific websites that you manually specify, you'll need to click the Customize button at the bottom of the Web Content entry.

From here, you should see two options:

  1. Always Allow: Allow a website always.
  2. Never Allow: Blocks a website you choose.

Any websites that you want to block should be added to the Never Allow list.

Configuring the Web Content Filter to Block Websites in Safari on iPhone/iPad

If your main goal is to block websites on iPhone , using Screen Time is going to be one of your best friends. 

On iOS, scroll down from Screen Time's main menu. Tap Content & Privacy Restrictions:

Make sure that you enable the checkbox near the top of the screen first.

From the Content & Privacy Restrictions menu, tap Content Restrictions.

From this new menu, you will see several options. The one we're interested in is Web Content:

From here, you will three options:

  1. Unrestricted Access: The default option. This doesn't impose any kind of restrictions.
  2. Limit Adult Websites: Limits most adult websites. With this option enabled, you gain the ability to enforce a simple whitelist and blacklist.
  3. Allowed Websites Only: A severely restrictive option that blocks all website but the ones you've specifically allowed. This can cause issues on some websites, so we don't recommend this unless you know what you're doing.

If you want to block a specific website, you will need to choose either Limit Adult Websites or Allowed Websites Only. We strongly recommend choosing Limit Adult Websites, since Allowed Websites Only requires a much more advanced setup.

You may have noticed that the screenshot above has Limit Adult Websites already selected. This won't be the default option, but once you've selected it, you will see two other options appear near the bottom of the menu:

  1. Always Allow: This allows a website to be visited, regardless of other restrictions you've set up.
  2. Never Allow: This lets you block websites you choose. 

If you want to block a website, add it to the Never Allow list

How do I delete entries I've added?
To delete an entry to either the Never Allow or Always Allow lists, simply swipe left on the entry to delete it.

Screen Time is a good place to start, however, if you're interested in creating the simplest setup possible, we have a guide that explains all of the different ways to create your own dumb iPhone .

Get Powerful DNS Filtering
Get Powerful DNS Filtering
Create and enforce a Content Policy on all your devices.

Block Websites in Safari Using the Hosts File

An even better option to block website than Screen Time is by editing the Hosts file . Unfortunately, this option is only available on MacOS and can't be used on iOS.

The Hosts File is a special file on your computer that blocks websites at the network level. You will have to find its location on your system, then add entries to it manually. However, the added benefit over Screen Time is two-fold:

  1. The Hosts file is harder to find and edit than Screen Time. This means that it's less likely (and more difficult) for websites to be unblocked later on. You might consider this approach if bypass prevention is your focus.
  2. The Hosts file blocking technique works will block websites in other browsers as well, not just Safari.

However, before you begin changing your Hosts file, it's important to keep in mind a few limitations:

  1. The Hosts file can be modified by any account with admin access. Determined users can still re-enable websites you've blocked.
  2. Unless you know what you're doing, modifying the Hosts file can cause issues that are difficult to troubleshoot. You should carefully follow our instructions.
  3. Adding to many entries to your Hosts file can slow down your Mac computer, so limit the number of websites block to less than 1000.

Adding entries to your Hosts file is a bit more complicated than we can get into with this article, so check out our free guide on how to block websites with the Hosts file  to learn more!

Block Websites

How to use the hosts file to Block Adult Websites

Quickly block thousands of websites for free using the computers hosts file. This is one of the easiest and free ways to block porn on PC.

Read More

Limit the Safari Browser on Mac

If you configure a managed MacOS device, you can significantly limit the functionality of the Safari browser - turning it into a "dumb browser."

Using managed mode on MacOS, you have a large list of configuration options available to you. In Safari, you can choose to:

  1. Disable Private Browsing.
  2. Hide images on webpages.
  3. Disable JavaScript.
  4. Block cookies
Get the Guide to Managing MacOS Devices at Home
Get the Guide to Managing MacOS Devices at Home
Become a Tech Lockdown member to access step-by-step guides.

Frequently Asked Questions

What's the best way to block websites in Safari?

You might try using Screen Time to block websites. You can go a step further and block the website on your Hosts file. However, there are a few problems with relying on these methods alone:

  1. Screen Time can be powerful, but it's also too easy to disable.
  2. The Hosts file can be tricky to navigate and make changes to in the future.
  3. In either case, if you want to block thousands of websites (or entire categories of websites), it's not feasible with either method.

Using a DNS Content Policy to block websites solves for these issues since you can block entire categories or specific apps in addition to specifying website domains. A DNS Content Policy lets you block in a more comprehensive way and is harder to bypass compared to the other methods.

How do I block entire website categories?

If you want to block entire categories of websites instead of managing your own lists, Apple Screen Time allows you to limit Adult Websites, which automatically selects a large list of websites to block.

Additionally, a DNS Content Policy allows you to choose from hundreds of different website categories so you can pick almost any category or app that you can think of.

How do I Disable Safari Entirely?

Some people opt to get rid of the Safari browser entirely since it has limited options for enforcing settings or using browser extensions that work on Chrome.

Another option you can consider is to hide or disable the safari browser  on your device. You can then use another browser to enforce other restrictions, or just not use Safari on that device.

Disable Safari

How to Block the Safari Browser on Apple Devices

Blocking Safari is not straightforward. However, there are a few effective ways to disable or limit Safari on Apples devices like Mac and iPhone.

Read More
Open chat