How to Block Websites on Safari on Mac Featured Image

How to Block Websites on Safari on Mac: 5 Best Ways

Surf safely by blocking harmful sites on Safari with ease.

Written by

Reviewed by

Last updated: July 27, 2024

Expert verified

SVG Image

TL;DR

To block websites on Safari on a Mac, use one of the following methods:

  1. Set up Screen Time in System Settings and choose Content & Privacy to limit adult websites or specify only allowed websites​​.
  2. Access your router’s settings via its IP address and use the Access Restrictions or Parental Controls to block specific websites​.
  3. Install a web blocker extension from the App Store.
  4. Download and use third-party web blocker apps.
  5. Use the sudo nano /etc/hosts command to edit the host file via Terminal to block specific websites.

I know how easy it is to get distracted online, especially when trying to work or study on a Mac. That’s why I put together this guide with simple, straight-to-the-point steps that I use myself to keep focused. These methods really work whether you’re aiming to stay focused, manage your online activities, or just streamline your browsing.

Before We Begin

Besides blocking websites on your Mac, you should also remove adware and unwanted programs. Download MacKeeper and use its Adware Cleaner to avoid annoying pop-ups that send you to websites you don’t want to visit.

How to Block a Website on Safari on Mac

Why You Can Trust MacBook Journal verify badge We always conduct first-hand research and verify every method or solution we present, ensuring you receive reliable and effective advice. Learn more about our process.

There are different solutions for blocking websites on Safari. Below, I’ve shared some quick ways to block websites on Safari.

1. Use Screen Time

Screen Time is a feature in macOS, iOS, and iPadOS that allows you to set limits on app usage, including Safari. You can use Screen Time to block specific websites or categories of websites during certain times of the day. You can also use it to block all websites and whitelist some specific ones.

For macOS 10.15 Catalina or Later

Here’s how to use Screen Time to block websites on Safari on your Mac:

  1. Open the Apple menu and click System Settings.
click the apple icon and select system settings
  1. Click Screen Time in System Settings and select Content & Privacy.
click screen time and select content and privacy
  1. Click Content Restrictions.
click content restrictions in content and privacy
  1. A new window will appear. Click the drop-down icon next to Access to Web Content and select Limit Adult Websites.
click limit adult websites to block adult content

If you want to manage your time on specific websites using Safari, you can do that with Screen Time. Here are the steps for setting a time limit for certain websites on Safari on a Mac:

  1. Click Screen Time in System Settings and select App Limits.
click screen time in system settings and select app limits
  1. In the App Limits section, toggle on the App Limits switch and click the Add Limit button to create a new restriction.
toggle on the app limits switch and click the add limit button
  1. Scroll down to the end of the list until you find the option for Websites.
find websites in the list to add a new app limit
  1. Click the dropdown arrow next to Websites to specify which websites you want to set time limits for.
  2. Select a website from the list or add a URL.
  3. In the Time section, specify the time you wish to allow for this site. This is the duration for which you can access the site each day.
  4. Once you have set the time limit, click Done.
select a website specify a time and click done

For iOS 12 or Later and iPadOS

Here’s how to use Screen Time to block websites on Safari on your iPhone or iPad:

  1. Open the Settings app on your iPhone.
  2. Tap Screen Time.
  3. If Screen Time isn’t already enabled, tap Turn On Screen Time, then tap Continue. If it’s for your iPhone, select This is My iPhone.
  4. Tap Content & Privacy Restrictions and toggle on the Content & Privacy Restrictions switch.
  5. Tap Content Restrictions and select Web Content.
  6. Select Limit Adult Websites.
  7. Tap Add Website in the Never Allow section.
  8. Type the website URL you want to restrict in the URL field and tap Done.

2. Change Router Settings

If you block websites through your router settings, it stops those sites on every device using your Wi-Fi. You just need to go into your router’s settings and choose the websites you want to block.

Here are the steps to block websites on Safari using router settings:

  1. Open your web browser and enter your router’s IP address in the address bar. You can usually find this information on the back of your router or in the manual.
  2. Enter your login credentials when prompted. The default username and password should be listed in your router’s manual if you need to change them.
  3. Look for the Access Restrictions or Parental Controls section in your router’s settings. It may be under the Advanced or Security tab.
  4. Choose the Website Blocking or Block Sites option.
  5. Enter the URL you want to block in the Website URL field. Some routers may also allow you to block websites based on keywords.
  6. Save the settings and exit the router’s interface.

3. Install A Web Blocker Extension

You can also add a browser extension to your web browser to do different things, including blocking websites. Safari doesn’t have a dedicated store for extensions, like Chrome. Instead, you have to download them from the App Store.

For Safari, I recommend a website-blocking extension called StayFree, a popular choice among Mac users.

For macOS 10.12 or Later

  1. Open Safari on your Mac.
  2. Click Safari in the menu bar and select Safari Extensions. This will open the App Store.
click safari and select safari extensions
  1. In the App Store, type StayFree in the search bar and click Get > Install next to the app name in the results.
search for an extension in the app store and click the install button
  1. Wait for the extension to install. Once it’s installed, you might get this notification in Safari. Click the Turn On Extensions button.
click the turn on extensions button in safari
  1. Close Safari and reopen it. You should now see the extension’s icon near the address bar.
click the extension icon in the safari toolbar
  1. To block a site, click the extension icon, and select Focus Mode Settings.
click stayfree extension icon and select focus mode settings
  1. It will open a new window. Click the Add Website button.
click the add website button in extension settings
  1. Type the website URL and click Save. It will block the website and you won’t be able to reload it until you remove it from the Blocked Website list.
add a website url and click save

For iOS 15 or Later and iPadOS 15 or Later

iOS 15 and iPadOS 15 support web extensions for Safari. To add a Safari website blocker extension to your iPhone or iPad, follow these steps:

  1. Open Settings on your iPhone or iPad.
  2. Navigate to Safari.
  3. Select Extensions > More Extensions. This directs you to the App Store, showing compatible Safari extensions.
  4. Pick a web blocker extension for screen time control, and download it.
  5. Activate the Safari extension by going to Settings > Safari > Extensions.
  6. Find the web blocker extension you’ve installed and turn it on.

4. Use Third-Party Web Blocker Apps

Third-party web blocker apps offer another effective solution for managing online content access on Mac. These apps work by letting you make a list of websites you want to block. This stops you from accessing these sites for certain times you choose or all the time.

Here are some third-party web blocker apps that you might consider using:

  1. Cisdem AppCrypt: Cisdem AppCrypt is not just a website blocker, it also locks apps with a password. For website blocking, you can create a blacklist or whitelist and set up a schedule to block sites during certain times.
  2. 1Focus: 1Focus lets you block distracting websites and apps. It’s simple to use and lets you set periods of focus during which specific sites and apps are inaccessible. You can also schedule recurring focus sessions, making it a handy tool for establishing a routine.
  3. Freedom: Freedom is a popular app for blocking distracting websites and apps across multiple devices. It lets you create blocklists and schedule distraction-free sessions, making it a great tool for improving focus and productivity.
  4. SelfControl: Specifically for macOS, SelfControl lets you block access to distracting websites, mail servers, or anything else on the Internet. Once you set a period to block for, not even restarting your Mac or deleting the app will disable the block.

5. Map Domain Using Host Files/Terminal

Blocking websites in Safari on your Mac can be done by using host files. These files connect website names to their internet addresses. You can change these files to stop your Mac from reaching certain websites.

Here are the steps to map domain using host files:

  1. Open the Terminal application on your Mac. You can do this by searching for Terminal using Spotlight or by navigating to Applications > Utilities > Terminal.
launch terminal from utilities
  1. In the Terminal window, type the following command to open the host’s file and press Enter:
sudo nano /etc/hosts
type sudo nano etc hosts in terminal
  1. You will be prompted to enter your admin password. Enter it.
  2. Use the arrow keys to navigate to the bottom of the host’s file.
  3. To block a website, add the following line to the bottom of the file, replacing example.com with the URL of the website you want to block:
127.0.0.1 example.com
  1. You can add as many websites as you want by creating a new line for each website.
  2. Press Control ^ + O to save the changes to the host’s file.
macbook pro control o
  1. Press Control ^ + X to exit the editor.
macbook pro control x
  1. To make the changes take effect, flush the DNS cache on Mac by typing the following command in the Terminal:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
type sudo dscacheutil flushcache sudo killall HUP mDNSResponder in terminal
  1. It will clear the cached DNS entries, forcing the Mac to use the updated host file.

Once you’ve completed these steps, Safari and other browsers on your Mac should no longer be able to access the websites you’ve blocked in the host file.

This method blocks the websites system-wide, so it will affect all users on your Mac. To unblock a website, remove the corresponding line from the host file and flush the DNS cache again.

How to Whitelist Specific Websites on Mac

Once you’ve set up Screen Time to limit websites, most adult websites will become inaccessible. But if you want to allow specific websites only, follow these steps:

  1. Follow the above steps from 1 to 3, and instead of Limit Adult Websites, select Allowed Websites Only in the Web Content window.
select allowed websites only next to access to web content
  1. Click the Customise button that appears.
click customise under access to web content
  1. In the new window, click the + button in the bottom left corner.
click the plus icon to add a website
  1. Type in the name and URL of the website you want to allow and tap Done.
add the webiste name and url and tap done
  1. The website you add will appear in the list.
your allowed website will appear in the list
  1. Click Done to close the window.

Avoid Distractions While Browsing With MacKeeper

MacKeeper does not offer a feature to block websites on Safari. But it offers an Adware Cleaner that can detect and remove adware and potentially unwanted programs causing unwanted pop-ups or redirects to certain websites. This can indirectly help with blocking certain websites.

To use the Adware Cleaner feature in MacKeeper:

  1. Download and install MacKeeper on your Mac.
  2. Open MacKeeper and click Adware Cleaner in the left sidebar.
click adware cleaner under security
  1. Click Open.
click open in adware cleaner
  1. Click Start Scan to scan your system for adware and potentially unwanted programs.
click start scan in adware cleaner
  1. Once the scan is complete, review the list of detected items and select the ones you want to remove.
  2. If there are no malicious files, you’ll get a No items found message on your screen. Click Rescan to run the scan again or close the program.
click rescan in adware cleaner

While this may not directly block websites on Safari, removing adware and potentially unwanted programs can prevent unwanted pop-ups or redirects to those websites. So, it’s worth a try.

What Else Can MacKeeper Do?

Besides removing adware on your Mac, MacKeeper can block ads on your Mac, disable pop-ups on Safari and other browsers, and remove browser extensions. Check out my MacKeeper review to learn about these features.

Why Would You Need to Block Websites on Safari?

Blocking websites on Safari can be necessary for several reasons:

  1. 🎯 Focus and Productivity: If you find yourself frequently distracted by certain websites while working or studying, blocking them can help maintain focus and boost productivity.
  2. 👪 Parental Controls: For parents, blocking websites is a way to ensure children don’t access inappropriate content or spend too much time on entertainment sites.
  3. 🔒 Online Safety: Blocking websites that are known for phishing, scams, or malicious content helps protect your personal information and your device’s security.
  4. 📶 Bandwidth Management: In some cases, especially in a workplace, blocking websites that consume a lot of bandwidth (like streaming services) can help maintain network performance.
  5. 💆 Digital Well-being: Sometimes, blocking websites can be a part of a digital detox strategy, helping reduce time spent on addictive sites and improving overall well-being.

In each case, the goal is to create a safer, more focused, and more productive online environment.

Block Unwanted Websites on Safari and Be More Productive

Now that you know how to block websites on Safari, you may want to take your productivity up a notch. Here are some more tips to make your Safari experience better.

Frequently Asked Questions

Can I unblock websites that I’ve blocked on Safari on Mac?

Yes, you can unblock websites previously blocked in Safari on your Mac. The method to unblock depends on how you blocked the site initially, whether through browser settings, a parental control app, or system files.

Can I password-protect the blocked websites?

No, you cannot password-protect the blocked websites using the built-in website-blocking feature on Safari. If you want to password-protect your blocked websites, use a third-party app or software that offers this feature.

Will blocking websites on Safari prevent me from accessing them on other devices?

No, blocking websites on Safari will not prevent you from accessing them on other devices. Blocking websites on Safari only affects your Safari browser on the device you set it up on. You can access those websites easily on other devices.

Can I block websites based on specific keywords?

No, you cannot block websites based on specific keywords using the built-in website blocking feature on Safari. However, some third-party apps or browser extensions allow blocking websites based on keywords or phrases.

Ojash

Author

Hi there! I'm Ojash, a tech journalist with over a decade of experience in the industry. I've had the privilege of contributing to some of the world's largest tech publications, making my mark as a respected Mac expert. My passion lies in exploring, using, and writing about MacBooks, and I enjoy sharing my expertise to help others make informed decisions and get the most out of their MacBook experience. Join me as we delve into the fascinating world of MacBooks together!

Hashir Ibrahim

Reviewer

I'm Hashir, a tech journalist with a decade of experience. My work has been featured in some of the top tech publications like MakeUseOf and MakeTechEasier. I have a bachelor's degree in IT, a master's in cybersecurity, and extensive knowledge of Apple hardware, specifically MacBooks. As the senior writer at MacBook Journal, I write in depth guides that help you solve any issues you have with your mac and unbiased reviews that help you make the right buying decisions.

Total
0
Shares
You May Also Like