To get distracted is human. When you use your Mac for work or study, there are always things that prevent you from focusing. You just can’t stop watching YouTube videos or browsing social media. Blocking distracting websites can help you become more focused and productive.
With a Mac and an Internet connection, anyone can easily and unrestrictedly access any website, including inappropriate ones. Blocking certain websites can help protect you or your children from bad web content.
This article shows you how to block websites on Mac in several ways. It covers all web browsers and all macOS versions. Different methods are suitable for different situations and I’ll help you choose the one that is best for you.
Free Download macOS 10.12 or later Free Download Windows 11/10/8/7
Applies to: macOS 10.12 or later
If you are looking for a tool to block distracting, time-wasting websites on your Mac, or want to keep your kids away from harmful sites, Cisdem AppCrypt is your best choice – it’s a website blocker and app locker rolled into one. It lets you block websites in all popular web browsers on your Mac, and password protects the blocking settings to prevent anyone from bypassing it.
AppCrypt offers multiple options for you to block sites on Mac based on your needs, such as block specific websites, block categories of sites, and whitelist a website. With it, you can set the time periods during which the site should be blocked, or block the website permanently.
Follow the steps below to effortlessly block unwanted websites on your Mac.
1. Download and install AppCrypt.
Free Download macOS 10.12 or later
2. When you first open it, set a password. (It’s recommended to select the Launch at System Startup checkbox.)
3. Click the lock icon in the menu bar and choose Open Main Window.
4. Enter the password to access the main window of AppCrypt.
5. In the main window, click the Web Block tab.
6. Do any or all of the following things.
Now the websites are blocked on all the supported browsers (like Chrome and Safari) on your Mac.
Now the specified websites are blocked on all the supported browsers (like Chrome and Safari) on your Mac. And the blocking applies to both normal browsing mode and incognito/private browsing mode.
There are four ways to unblock a website temporarily or permanently, such as quitting AppCrypt or removing the site from the block list. But any of the four ways requires the password. Therefore, the blocking is hard to bypass.
Tip 1. Ask someone else to set the password if needed
If you need to block websites for yourself (instead of for a child), you can ask someone else, like a family member, to set the password for you in step 2. Without knowing the password, you can’t unblock websites.
Tip 2. Block certain websites only at certain times
By default, any website on the block list will be blocked permanently as long as AppCrypt is running. However, you probably don’t want to make certain websites (like YouTube) inaccessible on your Mac forever.
Here’s the solution. Under the Web Block tab, click the website of your choice. Click the clock icon that appears, which will bring up the Custom Schedule dialog. In the dialog, turn on Custom Schedule first. Click the existing (default) schedule to edit it. Specify the times of the day (e.g. work hours) and days of the week (e.g. workweek). You can add schedules if needed.
Applies to: macOS Catalina 10.15 or later
Screen Time is a set of features included in macOS Catalina or later. Two of its features (Limit Adult Websites and App Limits) can help you to block websites on Safari for free. But after my testing, the blocking is not working on some websites. So, after configuring the settings, you'd better visit the site on Safari again to make sure it is indeed blocked.
(In macOS Mojave 10.14 or earlier, Screen Time is not available, but a similar set of features called Parental Controls is available.)
Note: Screen Time allows you to set a 4-digit passcode. This passcode can prevent your children or any other users of the Mac from altering your screen time settings. When you use it to block a website on Safari on Mac, it offers an “Add this website to your approved list” or “Ask For More Time” option on the blocked page. Then you just need to enter your passcode to continue accessing the site. Therefore, this method may not be an effective way to prevent yourself from accessing certain websites.
Below is how to use the two features respectively.
If you want to completely block certain websites and let your Mac automatically limit access to some adult websites, use this feature.
1. Go to System Settings. Go to System Preferences if your Mac is running macOS Monterey 12 or earlier.
2. Click Screen Time. Turn it on.
3. This step is optional. If you are allowed to set a passcode, turn on Use Screen Time Passcode and set a passcode.
4. Click Content & Privacy. Turn it on.
5. Click Content Restrictions.
6. In Web Content, click the pop-up menu and choose Limit Adult Websites.
7. Click the Customize button that appears.
8. Click the Add button in the Restricted section.
9. Enter the specific website that you want to block. Click Done.
10. Repeat steps 8 and 9 to add other unwanted sites to the Restricted list.
11. Click Done.
The websites added to the Restricted list will be blocked all the time on Safari on this Mac as long as you don’t change the Screen Time settings that can affect the blocking. In addition, Safari will automatically block many inappropriate websites. Also, the private browsing mode in Safari will become unavailable.
Additionally, in step 6, there’s an option called Allowed Websites Only. If you choose this option and add websites to the Allowed list, Safari will only allow you to access sites on the Allowed list and block all the rest.
If you only want to limit the amount of time you child can spend on certain websites, use this feature.
1. In Screen Time, click App Limits. Turn in on.
2. Click Add Limit.
3. In the Create a new app limit window that appears, scroll down until you see Websites.
4. Click Websites. Click the Add button that appears.
5. Enter a website. Select the checkbox next to it.
6. Select Every Day or Custom and set the time limit.
If the time limit on a website is reached, Safari will block access to the site for the rest of the day.
It’s worth mentioning that it’s easy to unblock websites if there isn’t a passcode.
Applies to: All macOS versions
The hosts file is an operating system file, which is used to map hostnames to IP addresses. When you try to access a website, the Mac first check the hosts file to see if there is a mapping for the domain name. To block a website on Mac for free, just edit the hosts file to map the domain name to an invalid IP address.
Included in macOS, Terminal is an app that allows you to use a command line interface to perform different tasks. This method requires you to use it to edit the hosts file on your Mac.
The setup process is a bit cumbersome and time-consuming. This method is not suitable for non-technical users. But one advantage is that it blocks at the operating system level. So it works on all browsers on your Mac.
Below are the steps.
1. Open Finder on your Mac. Go to Applications > Utilities.
2. In the Utilities folder, double-click Terminal to open it.
3. Enter “sudo nano /etc/hosts”. Press the Return key.
4. Enter your administrator password. Press the Return key.
5. Use the Down Arrow key to go down. Now you can add a website to block. Suppose you want to block YouTube. In a new line, enter “127.0.0.1 youtube.com”. In the next line, enter “127.0.0.1 www.youtube.com”.
6. Continue adding other unwanted websites.
7. Once you finish adding, press Control-O and then press the Return key to save your editing.
8. Press Control-X to exit.
9. Enter “sudo dscacheutil –flushcatch” to remove the existing catch on the host database.
How do you unblock a website that is blocked by using this method? If you want to make a specific website accessible again, there are two ways. In Terminal, get the hosts file ready for editing, and then insert a number sign # respectively in front of the two lines containing the site. Or, just delete the two lines. If your children are tech-savvy, they may know how to get around the blocked sites.
Applies to: All macOS versions
Another way to block websites on Mac is to install extensions. Unlike Terminal on Mac and other built-in tools for blocking websites, a website blocker extension works on a web browser, but not the computer. Almost all popular browsers support extensions, such as Chrome, Safari, Firefox, Brave and Opera. You need to find the suitable site blocker extensions for different browsers on your Mac and set them up one by one.
Usually, extensions can be easily removed from browsers. Therefore, it is more suitable for users with a certain level of self-control. Likewise, you can easily unblock the website by removing the extension.
BlockSite is an extension that lets you block up to 3 website on your browser for free. It is available for Chrome and Firefox browser. Below is how to install and set up it on Chrome on Mac. If you choose a different extension, you can still find the steps below helpful.
1. Go to Chrome Web Store.
2. Use the search field to find BlockSite.
3. Click Add to Chrome. Click Add extension in the message that appears.
4. Go to the extension’s options page.
5. In the sidebar on the left, click Block Sites.
6. Click Add to Block List. Do any or all of the following things.
7. Go to chrome://extensions/. Find BlockSite. Click Details. Turn on Allow in incognito.
This extension provides a Password Protection feature, which allows you to set a password to prevent websites from being removed from the block list. However, the password can’t prevent the extension itself to be removed.
Tip: You can open the Opera extensions page by clicking on the cube icon towards the bottom of the sidebar. For Opera browser, SiteBlock by codehemuofficial is a good choice. If use Brave, you can install Adblocker and create a custom block list. Such extensions are available for Safari, but they don’t do a better job than Screen Time. Therefore I’d recommend Screen Time rather than a Safari extension.
Applies to: All macOS versions
We can also configure router settings to block websites on Mac. Some routers come with content filtering, web filtering, or parental controls feature. If you administer the Wi-Fi network (like your home network) your Mac is connected to, you can log in the router using your username and password to see if this feature is available.
Router-level website blocking applies to all devices connected to the router, including the Macs, iPhones, PCs, etc. in your home. You can't have it block sites on just a specific device. So if, for example, you want to block distracting sites on your Mac to increase productivity, but your family doesn't need to do the same. This method isn't suitable.
Different routers can have different settings. It’s impossible to cover all routers in this article. In the steps below, I use the TP-Link BE19000 Tri-Band Wi-Fi 7 router. The steps can give you a general clue of how to do the configuration.
1. On your Mac, open a web browser.
2. Visit http://192.168.0.1 or http://tplinkwifi.net.
3. Log in with the username and password or password alone. Now you have access to the router settings.
4. Click HomeShield at the top of the page.
5. On the left, click Parental Controls.
6. Click Add to add a profile.
7. In the Create Profile dialog that appears, click the Basic Info tab. Do the following two things and then click Next.
8. Click the Content Filter tab. Do any or all of the following things.
9. After you finish configuring, click Next and then click Save.
When your Mac is connected to this network, the websites you’ve specified will be blocked on all browsers on your Mac.
Yes, Mac’s Screen Time feature supports setting website limits for different accounts. If you share a Mac with your child and want to block certain inappropriate websites when he uses the Mac, but not restrict your use. Then you can create a separate Mac account for him. Log in to his account. Follow the steps in method 2 to set up the blocking settings using Screen Time. Make sure your child can only log in to his own account. This way the blocking will only work on his account.
Using a website blocking tool with built-in password protection is the most effective way to prevent other users of your Mac from making changes to your settings. Most third-party apps offers this feature. And Mac’s Screen Time also allows you to set a passcode.
If you block websites on your Mac by modifying the hosts file, using a VPN may make the blocking ineffective. It can bypass your settings by changing your IP address and DNS servers. But if you use third-party tools such as Cisdem AppCrypt to block websites, it will not be affected.
If you are a parent with a child or teen who owns a MacBook or iMac, you can restrict access to non-age-appropriate websites and websites with potential dangers on his or her device. If you spend too much time on certain websites or are addicted to online gambling or porn, blocking access to such websites can help with the situation.
This article talks about how to block websites on Mac in five different ways, providing step-by-step instructions and possibly useful details. I hope it’s helpful.
Norah Hayes likes to share her tips on how to improve focus and stay motivated at work. She believes it is essential to eliminate all online distractions during work hours.
monkey
Only Safari respects Screen Time blocks.
Martin Keiper
Although mac has its built in features to block sites, i think they're time-consuming. I choose to use third-party tool directly. It saved me lots of time and is easy to use. The app recommended in this post is very effective at cutting down the screen time on my mac. Thanks!
Richard Bright
What I dislike about Parental Controls is that you can't set them up for an administrator account. Screen Time is much better in that regard. But Screen Time's Limit Adult Websites blocks certain normal sites and pages that I need. The first method is better. It does no automatic blocking.
Darren
I loved your post!!! exactly what I wanted. This will be useful to help my son get rid of the addiction from Internet. My son can't inadvertently click on any of these sites now.
William
Hello, thank you for posting this, it's been really helpful so far! I was just wondering, does anyone know of a way to block specific google searches and not google entirely?
Susan
There is no way to block specific google searches I think.
Gina
With these methods recommended in this article, I can block any websites I want to be blocked, and the app recommended to lock apps is really wonderful