How to Block Websites on Safari on Mac Featured Image

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

Written by

Reviewed by

Last updated: September 6, 2023

Expert verified

SVG Image

Are you finding yourself spending too much time scrolling through social media or endlessly browsing the web when you should be focusing on work or other important tasks? Well, you’re not alone.

The internet is full of distractions taking up your time and hindering productivity. Luckily, Mac allows you to block user websites on Safari and stay focused. In this article, I’ll show you how to block websites on Safari on Mac, so you can get things done.

Before We Begin

Browser extensions are convenient for blocking ads, but having an excessive amount of them can negatively impact your Mac’s performance. So, it’s better to disable unnecessary extensions with MacKeeper to avoid slowing down your device.

Why Do You Need to Block Websites on Safari?

You may need to block websites on Safari on Mac for various reasons. The most common reasons for website blocking include increasing productivity, improving security, and protection against inappropriate content.

  • 🚀 Productivity: Blocking websites can help individuals stay focused and productive by minimizing distractions from social media, news, and entertainment sites. It can be especially helpful for those working or studying on their Macs. Employers can block social media websites to prevent employees from wasting time during work hours.
  • 👨‍👩‍👧‍👦 Parental Control: Blocking websites can be a necessary step for parents who want to protect their children from accessing inappropriate content online. It can include adult content, gambling, or websites containing violence.
  • 🔒 Security: Blocking websites known for spreading malware, viruses, or phishing scams can protect individuals and their personal information from online threats.

Solutions to Block Websites on Safari on Mac

Several solutions are available for blocking websites on Safari, each with unique benefits. So, let’s explore some quick ways to block websites on Safari. 

1. Use Screen Time

Screen Time is a feature in macOS 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.

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 the System Settings window and select Content & Privacy.
click content privacy in the sidebar
  1. Click Content Restrictions.
click content restrictions
  1. A new window will appear. Click the drop-down icon next to Access to Web Content and select Limit Adult Websites.
click on limit adult websites to block adult content

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
  1. Click the Customise button that appears.
click customise
  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.

2. Change Router Settings

Blocking websites on Safari using router settings is a powerful way to prevent access to specific sites across all devices connected to your network. This method involves accessing your router’s settings and configuring it to block certain websites.

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. Map Domain Using Host Files/Terminal

Blocking websites on Safari using host files is another method to prevent access to specific websites on your Mac. Host files map domain names to IP addresses and can be edited to block specific domains or websites.

Here are the steps to follow:

  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
in the terminal window type the following command to open the hosts file sudo nano etc hosts
  1. You will be prompted to enter your admin password.
  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.
control o
  1. Press Control ^ + X to exit the editor.
control x
  1. To make the changes take effect, flush the DNS cache by typing the following command in the Terminal:
sudo dscacheutil -flushcache
  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 that 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.

Get the Most Out of Website Blocking With MacKeeper

MacKeeper does not offer a feature to block websites on Safari, but it offers a feature called 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.
open mackeeper and click on adware cleaner in the left sidebar
  1. Click Start Scan to scan your system for adware and potentially unwanted programs.
click scan to start scanning your system for adware and potentially
  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

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 Adware Cleaner, MacKeeper has plenty of other features that help enhance your Mac’s security. You can use it to run a virus scan on your Mac, keep your email ID protected against data breaches, and block ads on your Mac. Check out my MacKeeper review to learn about these features in detail. 

Block Unwanted Websites & Be More Productive While Using Safari

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

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

    Yes, you can unblock websites you’ve blocked on Safari on Mac by going back to Settings > Websites > Category > Website and clicking the website you want to unblock, then selecting Remove.

  2. 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, you can use a third-party app or software that offers this feature.

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

    No, blocking websites on Safari will only affect Safari on your Mac. If you want to access those websites on other devices, you can do it without any hurdle.

  4. 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.

Hashir Ibrahim

Author

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.

Ojash

Reviewer

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!

Total
0
Shares
Prev
Dock Disappeared on Mac? Try These 10 Fixes
Dock Disappeared on Mac Heres What to Do Featured Image

Dock Disappeared on Mac? Try These 10 Fixes

Written by Hashir Ibrahim Reviewed by Ojash Last updated: September 6, 2023

Next
No Sound in MacBook? Try These 8 Quick Fixes
No Sound in MacBook Try These 8 Quick Fixes Featured Image (1)

No Sound in MacBook? Try These 8 Quick Fixes

Written by Hashir Ibrahim Reviewed by Ojash Last updated: September 6, 2023

You May Also Like