BlogFocus

How to block distracting websites on a Mac with built-in tools

How to block distracting websites on a Mac with nothing extra to install: Screen Time limits, Content & Privacy, Downtime and a Safari Focus filter.

To block distracting websites on a Mac without installing anything, use Screen Time in System Settings. Give a site a daily allowance under App Limits, block it outright under Content & Privacy, or use Downtime to switch off everything but your work apps for set hours.

Each of those works a little differently, and none of them is a locked door while you hold the key. Below they run from gentlest to strictest, with two extras: a Safari Focus filter, and the hosts file for people happy in Terminal.

Which built-in tool should you use?

ToolWhat it doesBest for
App LimitsA daily allowance for a site, then a block pageSites you want a little of, not all day
Content & PrivacyBlocks a site at all times, or allows only a short listSites you never need for work
DowntimeOnly your Always Allowed apps work, on a scheduleWhole mornings or evenings
Safari Focus filterSwitches Safari to a work Tab Group or profile during a FocusKeeping work and personal browsing apart
The hosts fileBlocks a site in most browsers and apps on the MacSites you want gone for good

All the Screen Time options live in System Settings > Screen Time. If you have never used it, turn on App & Website Activity first and let it collect a few days of data, so you block the sites that actually take your time rather than the ones you feel guilty about. The guide to Screen Time on a Mac covers that pane in full.

One caveat before you start. Screen Time's website settings are built around Safari. Other browsers may not respect them in the same way, so test in the browser you actually use. If yours ignores them, put an App Limit on that browser as a whole, or use the hosts file further down.

How do you put a time limit on a website?

An App Limit gives a site a daily allowance. When it runs out, the page is replaced with a notice that you have reached your limit.

  1. Open System Settings > Screen Time > App Limits, and turn App Limits on if it is off.
  2. Click Add Limit.
  3. Find Websites at the bottom of the list and expand it. Pick a site you have visited, or use Add Website to type one in.
  4. Set the time. Choose a custom schedule if weekdays and weekends should differ.
  5. Click Done.

Limits reset every day at midnight, and macOS warns you shortly before one runs out. When you reach it, the block page offers Ignore Limit, with choices such as One More Minute, Remind Me in 15 Minutes and Ignore Limit For Today.

That makes a limit a speed bump rather than a wall, and for many people that is enough. The pause breaks the trance, and you get to decide on purpose instead of by habit. A limit of ten or fifteen minutes on a news site still lets you read the headlines. It just stops the third and fourth visit of the afternoon.

How do you block a website completely?

For a site you never need at work, block it at all times. Screen Time can do it for Safari, and the hosts file can do it for nearly everything else.

With Screen Time

  1. In System Settings > Screen Time, click Content & Privacy and turn it on.
  2. Open Content Restrictions. On some Macs this section is called App Store, Media, Web, & Games.
  3. Set web content to Limit Adult Websites. Note that this also turns on Apple's adult content filter, which you may or may not want.
  4. Click Customize, and add each site you want blocked to the restricted list.

The strict alternative is Allowed Websites Only, which blocks every site except a short list you choose. It is too tight for most jobs, but it suits a writing morning when all you need is your document and one reference site.

Unlike a limit, a restricted site stays blocked until you take it off the list. Pick the sites carefully: a block on something you need twice a week turns into a chore, and chores get switched off.

With the hosts file

Every Mac has a short text file that matches site names to addresses before it asks the internet. Point a site at an address that goes nowhere and it stops loading in most browsers and apps. This takes Terminal and an administrator password.

  1. Open Terminal, type sudo nano /etc/hosts and press Return, then enter your password.
  2. Go to the bottom of the file and add two lines for each site, one with www and one without: 0.0.0.0 example.com and 0.0.0.0 www.example.com.
  3. Press Control and O, then Return, to save. Press Control and X to close.
  4. Clear the Mac's cache of addresses with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder, then quit and reopen your browser.

To undo it, delete your lines and repeat step 4. Leave the lines that were already in the file alone. The hosts file has no schedule and no allowance, and it is easy to forget it is there when a site mysteriously won't load months later.

Block whole hours with Downtime

Downtime takes the opposite approach. Instead of naming the bad sites, you name the good apps, and for the hours you choose everything else stops working.

  1. Open System Settings > Screen Time > Downtime.
  2. Set a schedule: the same hours every day, or custom hours for each day.
  3. Back on the main Screen Time page, open Always Allowed and keep only what the work needs, such as your editor, Mail and Calendar.

macOS warns you five minutes before Downtime begins. In recent versions you can also turn Downtime on without a schedule, and it stays on until midnight. That is handy for a day when you know you are fragile.

Downtime is a blunt tool. It suits a fixed block of deep work, or the evening, better than the middle of a busy day with lots of small jobs, because it blocks far more than the one site that was the problem.

Keep work tabs apart with a Safari Focus filter

A Focus filter doesn't block anything. It changes what Safari shows while a Focus is on, which is often all you need.

  1. Open System Settings > Focus and click your Work Focus, or add one.
  2. Under Focus Filters, click Add Filter, then choose Safari.
  3. Pick a Tab Group, or in recent versions a Safari profile, to use during this Focus.
  4. If you want links from Mail and chat to open there too, turn on the option to open external links in your Focus Tab Group.

When the Focus turns on, Safari switches to the work group, and the tabs you drift to are out of sight. A profile works even better: in a work profile you are simply not signed in to the feeds, and having to sign in is a natural moment to ask whether you meant to. Focus modes on Mac shows how to turn a Focus on automatically at set hours.

How do you stop yourself turning the block off?

Every tool above can be undone by whoever set it up. If you keep pressing Ignore Limit, add a passcode.

  • At the bottom of System Settings > Screen Time, turn on Lock Screen Time Settings (called Use Screen Time Passcode in older versions). From then on, ignoring a limit or changing a setting needs the passcode.
  • If your account is an administrator, macOS recommends turning it into a standard account and creating a new administrator account to manage the Mac. You can keep your account as it is instead.
  • With the passcode on, Downtime settings may offer a Block at Downtime switch, which makes the schedule hold instead of just warning you.
  • The trick that makes it work: let someone you trust type the passcode, and don't watch.

Where blocking falls short

Blocking is useful, and it has real limits.

  • The urge moves. Block the site and you may find yourself in the phone, or in the desktop app of the same service, within a minute.
  • It can block work. Plenty of jobs need the same sites that distract. A time limit is often better than a ban.
  • It treats access, not the reason. Many visits start at a moment of friction: a hard paragraph, a slow build, a reply you dread. Doomscrolling at work covers how to spot those triggers.

That last point is where Notchpals fits, next to the blocks rather than instead of them. It blocks nothing. What it adds is a nudge at the moment you drift. Bolt, the robot in its Focus area, keeps an eye on a fixed list of apps that includes Discord, Telegram, WhatsApp and Messenger, and once you have spent 20 unbroken minutes in one of them, comes down from the notch to say so. Browsers aren't on the list and you can't add to it, so a site in Safari stays Screen Time's job.

Bolt also runs focus sessions of 25 or 50 minutes, started from the Notchpals menu bar. While one runs, the rest of your crew mostly keeps quiet.

BoltSingle-task protocol active. Other tabs, stand down. That means you.

Bolt, Focus: Focus session, when you start a focus session

That is bluster: Bolt can't close a tab, and your tabs stay exactly where they were. Start the session alongside a website limit or a Safari Focus filter, and let Screen Time do the blocking while Bolt marks the start and the end.