The Safari browser has unrestricted access to all websites by default. However, you can configure the Mac Settings to block websites using their web address URL. You need to add the address in the Content Restriction page to block a website. These restrictions will also apply to all the web browsers installed on the machine.
Apple Safari, as a web browser, does a great job of providing a superior browsing experience with great privacy. It also has great customization and personalization for making browsing user-friendly. We can access any website and URL unless ISP or the government restricts us.
However, it also has the feature to block websites you think are not worthy or time-wasting, like Facebook, YouTube, Twitter, etc. You need to configure the system settings on a Mac computer to block these sites.
Alternatively, you can edit the system hosts file to block the site access completely. You can also use browser extensions to block the sites available in App Store.
On this page, you can find and jump to:
Block Site Using System Settings
The Safari browser does not have a built-in site-blocking system in place. However, we have content restriction settings on the Mac system that can easily block the sites from accessing on Safari browser. You can follow these steps to block a website URL:
- Click on the Apple on the menubar.
- Select the System Settings menu.
It will open the system settings window.
- Switch to the Screen Time tab and select the Content & Privacy option to open.
- Toggle to turn on the Content & Privacy setting and select Content Restrictions within that page.
It will open a new Content Restriction settings page.
- Switch the drop-down to Limit Adult Websites under the Access to Web Content option.
- Click the
button and add the website URL under the Restricted field.
- Hit on to save the changes.
Now try accessing the website URL you’ve added to the Restricted list; it will be blocked on the Safari browser.
You can notice that Safari is blocking the YouTube website and mentions that it isn’t on the approved list in Screen Time. Similarly, you can also add several URLs to block access.
Block Access using Hosts File
The Hosts file is a system file; hence, to edit the Hosts file, your user account must have administrative permissions. Check the Users & Group page on the System Settings window to verify your permission level.
Here are the steps to block the website on Mac using the Host file:
- Open the Terminal window on Mac.
It’s under the Applications folder.
- Enter the command: sudo nano /etc/hosts and keypress the button.
- Enter the System Password you use for login and hit the enter button again.
It will open the ‘hosts’ file in the terminal with an editing option.
- Keypress the down button to reach the end of the file.
- Add the following code; ensure to add a Tab space between the last digit and the site URL:
- Now, keypress + button to exit the editor.
to save the changes, and then to exit the editor.
- Restart the system to make the changes active.
That’s it; after restarting the system, the website URL entered in the host’s file with the local host IP address will be blocked from internet access.
You cannot open the website on Safari or any other web browser installed on the system. It is a hard setup to block the website URL on the system.
We can easily block the website URL on the Safari browser using the System settings’ Content Restrictions. It will block the site completely and not allow access to the Safari browser.
A similar feature is also available on iPhone and iPad to block websites on the Safari browser. You can easily configure all the content-blocking settings per need.
Lastly, if you've any thoughts or feedback, then feel free to drop in below comment box. You can also report the outdated information.