Available in macOS and iOS, Apple’s Safari is one of the most popular web browsers, offering a great way for Apple users to browse websites. Websites can be entertaining, or informational, or distracting (when you want to get work done), or harmful (if they deliver inappropriate content). This article will show you how to block websites on Safari easily on desktop and mobile.
Blocking access to certain websites on Safari can help reduce distractions or keep children away from bad content online.
Applies to: macOS 10.12 Sierra or later
The best way to block access to websites on a Mac is to use Cisdem AppCrypt, the best websites blocker and app locker for macOS. It’s very useful and easy to use. Below are the steps to blocking websites.
1. Download the Safari website blocker app. Install it.
2. When you first open the app, set a password.
3. From the menu bar at the top of your screen, click its icon and choose Open Main Window. Enter the password.
4. In the main window, click Web Block.
5. Enter a website such as youtube.com and click the Add button. Continue adding more unwanted websites to block. Or, you can block websites by category such as Video Sites.
Now the websites are blocked and not available on Safari, Google Chrome and Opera etc. on your Mac. When you try to open a blocked website, it won’t open, and you will see the message shown below.
How to unblock websites on Safari?
Click the padlock icon in the top menu bar. Choose Open Main Window and then enter the password. Under the Web Block tab, select the website(s) that you want to unblock and press the Delete key. Now the websites are unblocked and can be opened by Safari and other browsers.
Or, if you only want to temporarily unblock websites, just choose Disable Web Block and then enter the password. You can enable the blocking at any time.
Tip 1. Block websites on Safari for a period of time
If you want to block a website on your MacBook, iMac or Mac mini for a period of time instead of permanently, you can use AppCrypt’s Schedule feature. Under the Web Block tab, select the website and then click the clock icon that appears.
Turn on Custom Schedule. Click Add Schedule and create one or multiple schedules to block a website during certain hours of every day or of certain days of the week.
If needed, you can create a general schedule, which will apply to all blocked sites.
Tip 2. Block all websites except one
Sometimes, you may want to block access to all websites except a few. For this purpose, you can turn on the Block all websites option and then add the allowed websites to the Always Allow list in Exceptions. For example, you can allow only child-friendly websites to make Safari child-safe.
Applies to: macOS 10.15 Catalina or later
Apple’s Screen Time is a set of tools to help with productivity and parental controls. If your Mac is running macOS Catalina or macOS Big Sur or later, then you can use Screen Time to restrict website access on Safari.
1. In the top left corner of your Mac’s screen, click the Apple icon. Choose System Preferences.
2. Choose Screen Time.
3. In the Screen Time window, click Options in the bottom left corner.
4. Click Turn On to enable Screen Time on your computer.
5. Click Content & Privacy in the sidebar. Click Turn On to turn on the restrictions.
6. Under the Content tab, choose Limit Adult Websites.
7. Click the Customize button that appears.
8. Go to the Restricted section. Click the plus icon (+) and add a specific website that you want to block on Safari for Mac. Add other unwanted websites. Click OK.
9. Click Options. Enable Use Screen Time Passcode. Set a passcode.
Note: This method makes use of the “Limit Adult Websites” tool in Screen Time. In addition to the websites you add, it automatically blocks many adult websites on Safari, which is useful. But sometimes it may go too far and make some normal websites inaccessible, which can cause inconvenience.
Also, Screen Time allows you to block all websites except approved ones. Just choose “Allowed Websites Only” under the Content tab and then add the sites you approve.
Applies to: macOS 10.14 Mojave or earlier
If your device is running macOS Mojave or earlier, Screen Time is not available. But there is an equivalent. It’s called Parental Controls. In Parental Controls, there is a tool that can help block website access.
Note: Unlike the two methods above (which can be applied to an administrator and other user accounts), this method doesn’t support an administrator account.
1. In the top left corner of your Mac’s screen, click the Apple icon and choose System Preferences.
2. Choose Parental Controls.
3. Click the lock icon in the bottom left corner. Enter the password of the administrator and click Unlock.
4. Select a user account to turn on parental controls.
5. Go to the Web tab. Select Try to limit access to adult websites. Then click the Customize tab.
6. Go to Never allow these websites section. Click the plus icon (+) then enter the website that you want to block on Safari on Mac.
As with Screen Time, in Parental Controls, there is a way to whitelist a website on Safari, with all other websites being blocked. Just choose “Allow access to only these websites” under the Web tab.
Of course, you can do the blocking without using Parental Controls, because there are better website blockers to choose from.
Applies to: macOS
The Terminal app is a terminal emulator coming with macOS. It provides a command line interface to access the operating system. With Terminal, you can edit the hosts file, an operating system file. By editing the hosts file, you can block individual websites on Safari (and other browsers).
This method can be complex. If you are not familiar or confident with the command line, then ignore it.
Note: The blocking can be bypassed by using a VPN.
1. Open Terminal from Launchpad or the Finder.
2. Enter the command “sudo nano /etc/hosts” and then press the Return key.
3. Enter your admin password when you are asked for it. Press the Return key.
4. Use the Down Arrow key to go down to find space for the content you are going to add.
5. To block a specific website such as Twitter, enter “127.0.0.1” and then enter “twitter.com”. On a new line, enter “127.0.0.1” and then “www.twitter.com”. You can continue blocking more.
6. Perform the keyboard shortcut Control-O and then press the Return key, which is to add the changes to the hosts file.
Now the websites should be blocked. Try to open a blocked site on Safari, and you will see the “Safari Can’t Open the Page” message.
How to unblock websites?
If you block specific websites on Safari by editing the hosts file, you can unblock them by editing the file again. You can remove the lines that you add to the file. Or, you can type the number sign # in front of each line.
Applies to: macOS 10.12 or later
A browser extension is a small tool that can be added to a web browser. There are a variety of extensions. Some of them can help users block sites. Most browsers support extensions. The desktop version of Safari is one of them. As far as I know, there is only one website blocking extension available for Safari. It’s called “about:blank”.
Note: As with any browser extension, there is a problem. One can effortlessly bypass the blocking by uninstalling the extension.
1. On your Mac, open Safari.
2. Go to the top menu bar. Choose Safari > Safari Extensions, which will open the App Store app.
3. Sort the listed Safari extensions by Name. Choose the website blocker extension for Safari called about:blank. Install it.
4. When the installation is complete. Quit Safari and open it again. Now you should find the extension icon next to the address bar.
5. To block a website on Safari, open the website, click the extension icon and then click the plus icon (+) in the window that pops up.
Now the website is blocked. If you reload it, you will receive the “The URL was blocked by a content blocker” message. The blocking applies to both Safari’s normal and private browsing modes.
Applies to: iOS 12 or later; iPadOS
Screen Time is also available on iPhone and iPad. Therefore, there is a built-in way to restrict websites on the mobile version of Safari.
1. Open Settings. Tap Screen Time.
2. Tap Turn On Screen Time.
3. Tap Use Screen Time Passcode. Set a passcode.
4. Tap Content & Privacy Restrictions. Turn it on.
5. Tap Content Restrictions and then tap Web Content.
6. Tap Limit Adult Websites.
7. In the Never Allow section, tap Add Website.
8. Enter the website that you want to restrict in the URL field and tap done.
In addition to the built-in solution, there are third-party solutions. You can find them in the App Store.
Limiting access to certain websites is a great way to improve productivity, put parental controls, reduce screen time and help keep kids safe online. This article shows you how to block websites on Safari on Mac and iPhone in different ways, with or without Screen Time. I hope it is helpful.
Connie has been writing for Mac productivity and utility apps since 2009. Each review and solution is based on her practical tests, she is aways energetic and trustworthy in this field.