All articles

How to block distracting websites on a Mac (and make it stick)

Every Mac already ships with a way to block distracting websites, and most people who try it give up within a week — not because it doesn't work, but because it quietly doesn't work in the browser they actually use. Here's what each method really covers, where each one leaks, and how to pick the one that matches how determined your distracted self is.

Start with Screen Time, because it's already there

Screen Time is macOS's built-in content filter, and for a lot of people it is enough. To block specific sites:

  1. Open System Settings → Screen Time.
  2. Click Content & Privacy and turn on Content & Privacy Restrictions.
  3. Open App Store, Media, Web & Games, then Web Content.
  4. Choose Limit Adult Websites, then click Customize and add the sites you want gone to the Restricted list.

The Restricted list has nothing to do with adult content specifically. It's just "never load this domain," so put news.ycombinator.com, reddit.com, or whatever your particular hole is into it.

One line down is a stricter setting: Allowed Websites Only, which flips the model to a whitelist — everything blocked except the handful of domains you name. It's brutal, and for a two-hour writing block it's the most effective free thing on this page.

Two things make it stickier than it looks. You can turn on a Screen Time passcode, so future-you has to type four digits to undo it, and with the same Apple Account everywhere the restrictions follow you to your iPhone.

The catch: Screen Time is really a Safari feature

This is the part that generic "block websites on Mac" guides skip, and it's why so many people conclude Screen Time is broken.

Apple gives Safari a level of integration with Screen Time that it does not give third-party browsers. In practice the Restricted list is reliable in Safari and inconsistent everywhere else — some people report Chrome, Firefox, and Arc honouring it, plenty report they don't, and the behaviour has shifted across macOS releases. So test your block before you trust it: add a site, then try to open it in the browser you actually use. If it doesn't hold, block the browser instead, or move the block below the browser entirely.

Block the browser, not the site

Screen Time's App Limits apply to any app, Apple's or not. Set a 1 minute daily limit on Chrome — or whichever browser is your problem — and it's effectively unusable for the rest of the day after sixty seconds. Downtime does the same on a schedule: pick your working hours, and anything not on the always-allowed list stops opening.

It's blunt — you lose the whole browser, not just the bad parts of it — but it's the most reliable thing Screen Time does on a Mac, because it never has to understand a URL. Keep Safari for the work browsing you legitimately need and the bluntness stops mattering.

The hosts file: one block, every browser

For a block that doesn't care which browser you open, edit your Mac's hosts file. It sits below the browser, at the name-resolution layer, so everything on the machine is subject to it.

sudo nano /etc/hosts

Add a line per domain, pointing it at your own machine so the request goes nowhere. Include both the bare domain and the www. version — they're different names, and blocking one doesn't block the other:

127.0.0.1 news.ycombinator.com
127.0.0.1 www.news.ycombinator.com

Save with ⌃O then , exit with ⌃X, and flush the DNS cache:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Two caveats. Browsers with DNS over HTTPS on can resolve names without consulting the system — Firefox has a long-standing bug report about exactly this on macOS — so if a block doesn't take, turn off secure DNS in that browser. And a hosts entry is undone in eight seconds by anyone who knows it exists, which is you. It stops the reflex, not a decision.

Which method should you use?

MethodCoversCostHard to undo?
Screen Time restricted listReliable in Safari, inconsistent elsewhereFreeWith a passcode, yes
Screen Time app limits / DowntimeAny app, including any browserFreeWith a passcode, yes
Hosts fileEvery browser and app on the MacFreeNo — a one-line edit
SelfControlSites you list, for a fixed timerFree, open sourceYes, genuinely
Cold Turkey, Freedom, etc.Sites and apps, scheduled sessionsPaid (trials available)Yes

When willpower is the actual bottleneck

If you've bypassed your own blocks more than once, the answer isn't a better filter — it's one you can't take back.

SelfControl is the classic free, open-source Mac answer: list your sites, set a timer, and the block stands until it expires. Quitting the app doesn't lift it. Deleting it doesn't lift it. Restarting doesn't lift it. That's the entire feature, and it's why the app has outlived most of its commercial competition.

Paid tools like Cold Turkey and Freedom add scheduled sessions, app blocking alongside site blocking, and — in Freedom's case — sessions that sync to your phone, closing the obvious loophole of putting the laptop down and picking the phone up. Their pricing and tiers change often enough that it's worth checking yourself rather than trusting a blog post.

The distraction no blocker catches

Once the websites are gone, the interruptions that remain are the ones your own Mac generates: notifications, and your own windows.

Notifications have a good built-in answer — Focus modes and a pass through your notification settings silence most of it, and trimming your login items stops the noise before it starts.

Windows are the one nobody names. Focused work is rarely one full-screen app — it's a draft beside a source, or an editor beside a terminal and a browser. Every reach for the trackpad to drag a window into place, or hunt through a stack for the one you need, is a context switch you chose to make. A few hundred a day is a real leak in exactly the attention you just spent an afternoon protecting.

The fix is the same shape as blocking a website: remove the decision. Let's Tile drops a visible grid over the window you're using so you place it in a couple of keystrokes instead of dragging it, and Let's Switch gets you to a specific window with Option-Tab rather than Cmd-Tab's app-by-app hunt. Both are free to use, pay-once if you want the extra mile, and neither phones home. The deep work setup guide puts the whole picture together.

Frequently asked questions

Does Screen Time block websites in Chrome on a Mac?

Not dependably. Apple gives Safari an integration with Screen Time that third-party browsers don't have, and reports of the Restricted list working in Chrome are mixed and vary by macOS version. Test it, and if it doesn't hold, set a one-minute App Limit on Chrome instead — app limits apply to every app.

How do I block a website on a Mac for free?

Screen Time's Restricted list costs nothing and takes a minute. For a block that covers every browser, edit /etc/hosts. For a block you can't undo on impulse, SelfControl is free and open source.

Can I block websites only during work hours?

Yes. Screen Time's Downtime runs on a schedule, and most dedicated blockers let you define recurring sessions. The hosts file has no concept of time — it's on until you remove it.

Will a Safari block also apply on my iPhone?

If you use the same Apple Account and have Screen Time sharing turned on across devices, restrictions apply across them. If not, set it up on each device separately — and remember that a Mac-only block just moves the habit to your phone.