Safari remains one of the best web browsers on Mac for a good reason. It offers impressive performance and a range of features that enable you to integrate your workflow with the Apple ecosystem. One option you can try is blocking websites for easier access and parental controls, for example. In this guide, I’ll show you how to block websites in the Safari browser, as well as the various methods for it on Mac and iPhone.
Reasons to Block Websites on Safari
Let’s first look at some common reasons why you may want to block websites on Safari.
- Blocking websites on Safari helps you improve your productivity and cognitive control. By removing distracting websites from the equation, you can focus on the tasks that matter.
- It is also a great step in terms of Privacy and Protection because you don’t get to access problematic websites in the first place. Therefore, there is no risk of downloading something problematic.

- Blocking certain websites and network connections can also help you reduce ads and bandwidth consumption. This might come in handy when you are looking for maximum performance.
- Parental control is another common reason for blocking websites on Safari. This tip ensures that your kids are not exposed to anything they should not be on the internet.
- You may also have to comply with specific policies from your employer or workspace. Blocking such sites on Safari ensures that you don’t access these websites in the first place.
Blocking Websites on Safari for Mac
As you can guess, there are a few ways in which you can block websites on Safari on a Mac. While some of these options work at the system level, others work at the WiFi router or network level.
Therefore, depending on the features you are looking for and the level of control you need in this process, you can choose any of the three methods for your Mac.
#1 Using Screen Time
If you are unaware, Screen Time is a feature built into macOS that helps you control how your Mac is being used. This feature is also available on iPhone and iPad, but we’ll discuss it later.
So, because this feature allows you to control what can be done on your Mac, you can also restrict someone, or yourself, from accessing something. In this instance, we will utilize Screen Time to ensure that a website remains inaccessible or blocked.
You can follow the steps below to access Screen Time and block a website.
- Go to the Apple menu and choose System Settings.
- Choose Screen Time from the sidebar menu.
- Navigate to Content & Privacy > App Store, Media, Web & Games.

- Against the option titled “Access to Web Content,” choose Limit Adult Websites from the dropdown menu.

- Now, click on the Customize button that appears below the dropdown menu.
- In the upcoming interface, use the + button to add a restricted website.

- Click Done, and the website will remain blocked on the Safari browser.
Voila. You have successfully blocked a website on Safari. This method should work fine as long as you are running the latest version of macOS and Safari. Since the solution does not require any third-party apps, it should work effectively and efficiently, without consuming a lot of resources.
Note: Please keep in mind that we are utilizing an option called ‘Limit Adult Websites‘ to enable this feature. As part of this, Safari will automatically limit access to many commonly used adult websites. However, you may choose to allow certain websites or add additional websites to the restricted list.
#2 Using Terminal
Sometimes, you do not want to use the Screen Time functionality to block a website. Similarly, you may want to block a website across multiple web browsers. So, even if you manage to open another browser, you won’t be able to access that website. In these instances, you can use the macOS terminal to block websites on Safari and elsewhere on your Mac.
Compared to the previous method I mentioned, this process takes a bit of time and some level of expertise. However, I have outlined all the steps as clearly as possible, so even if you haven’t used a terminal before, you should be able to complete this task with ease.
- Open macOS Terminal using Spotlight Search.
- Enter the following command. You can copy the text and paste it into the Terminal.
sudo nano /etc/hosts
- Press the Enter key, and the Hosts file for your Mac should open. You may be asked to enter the Mac password.

- Use the arrow keys to scroll to the bottom line on the page. As you can see in the screenshot, your Mac already maintains a table of IP addresses and URLs.
- Now, use your keyboard to enter the following:
127.0.0.1 website.com
- You must replace website.com with the URL of the website you want to block. For instance, if you’d like to block Reddit on Safari, the entry would be as follows:
127.0.0.1 reddit.com
- Once this is done, press Ctrl+O to save the settings. Press Enter to confirm the action.
- You can now press Ctrl+X to close the Hosts file interface as well.
- To activate the settings right away, type the following command in Terminal and press Enter:
sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder
This command will clear the DNS cache. That is, even if you had opened Reddit.com before, that history will not affect how your Mac behaves.
If you have followed these steps correctly, your Mac will have blocked the website permanently.
#3 Through Wi-fi Router
If you want to stop everyone using your network from accessing a particular website, you might want to use this method to block the website.
These days, almost every Wi-Fi router is packed with additional features for parental control and quality of service. As a result, you can easily find an option that lets you block websites across the network. Even if your Mac, iPhone, or Android smartphone attempts to open the site, the router will block the connection. There is no need to worry about installing the system or an application on separate devices.
Here are the steps you need.
- Locate the default IP address of your router.
- Open the URL using the default browser and log in using the default credentials.
- Once you enter the dashboard, navigate to Settings and Advanced Settings, where you can find Parental Control options.
- Here you will have the option to add specific websites to the blocked list.
- Once you have added the settings, save them and restart the router.
Please note that the exact steps may vary depending on the router model and the firmware being used. However, you should be able to make these changes from the Parental Control section.
These days, most Wi-Fi routers also have a companion application for iOS and Android. If you have one of these applications, you can block websites and easily manage profiles using the apps themselves.
Blocking Websites on Mobile Devices
You may also want to blog from specific websites on your mobile devices. You can use either of the two following methods to get this done.
Using Screen Time
The screen time functionality on iOS remains one of the best options for blocking websites on your iPhone, including Safari and other web browsers you may use. You can follow the steps outlined below to complete this task.
- Open the Settings app on your iPhone and navigate to Screen Time.
- From the menu that appears, select the option titled “Content & Privacy Restrictions” and go to “App Store, Media, Web, and Games.”
- On the next page, select the option labeled ‘Limit Adult Websites‘.
- Now, an interface will appear below, where you can add a website to the ‘Never Allow’ list.
- You can now go back, and this website should be blocked on your iPhone.
Please note that the website will remain inaccessible regardless of the browser you use.
Using App Limits
App Limits is another helpful feature that allows you to block websites on your iPhone. This option is more recommended if you are planning to log a website to keep it from distracting you. You can follow the steps given below to achieve this:
- Open the Settings app and navigate to Screen Time from the given options
- Choose App Limits
- Now, when you see the App Limits page, tap on App Limits and choose Websites
- Click the “Add Website” button and select the time limit for this website.
If you want to keep it nearly locked, you should choose 1 minute, which is the minimum time you can set. Please note that this time will reset every 24 hours. However, you can use the website for only 1 minute, meaning that you essentially can’t use it.
Top Tips For Effective Website Blocking
The following tips will help you set up the most effective website blocking systems.
Understanding the Requirement
It is crucial to understand why you are blocking the website in the first place. If you are looking forward to getting rid of distractions, any kind of blocking is acceptable as long as you have the free will to do so.
However, if policy compliance is your objective, you should develop innovative and foolproof methods for blocking a website. Something as simple as changing the hosts file will not be enough. Instead, you will have to enforce network-level rules.
Device or Network-level Blocking
You should also choose between device-level or network-level blocking. As I have shown, there are a few ways to set up a website blocking system, and network-level blocking is the easiest option for obvious reasons. However, sometimes you may just want to stop a particular device from accessing the website, and in those cases, you will need to use something like Screen Time or Parental Controls.
Category-based Blocking
You should also consider whether category-based blocking systems are available. For instance, when you want to prevent your kids from accessing problematic content on the internet, adding single websites to the list is a tedious affair. Therefore, you should see if the browser or the protection system allows you to select categories instead of individual websites.
Wrapping Up
I hope this guide has provided you with a clear understanding of locking websites in Safari, as well as on iPhone and other devices. We have only covered native options; however, there are also numerous third-party websites to consider.
