Skip to content

How to Block Websites on Mac, Step by Step

Summarize with: ChatGPT · Perplexity · Claude · Grok

To block a website on a Mac, open System Settings › Screen Time › Content & Privacy, then add the site to the Restricted list. Apple documents that setting for Safari only. To block a site in every browser, add it to the hosts file or switch the Mac to a filtering DNS service.

One rule matters more than the method. The person being blocked needs a standard (non-admin) account. With the administrator password, every method on this page comes off in about a minute.

Which method should you use?

Pick by browser and by who the block is for.

MethodBrowsers it coversWho can undo itMain limit
Screen TimeSafari (per Apple)Anyone who knows the Screen Time passcode, or everyone if none is setNot documented for Chrome, Firefox or Edge
Hosts fileEvery browser and app on that MacAnyone with the admin passwordNo wildcards: each subdomain is a separate line
DNS filter (NextDNS, OpenDNS and others)Every browser on the Mac, and other devices if set on the routerWhoever can change network settingsBrowser-level encrypted DNS and iCloud Private Relay can skip it
Blocking app (SelfControl, Cold Turkey, Freedom, Focus)Every browser, depending on the appNobody while a locked session runsFree or paid, see below

How do you block a website with Screen Time?

  1. Click the Apple menu › System Settings, then Screen Time in the sidebar. You may need to scroll down.
  2. Click Content & Privacy. If it is off, turn it on first.
  3. Click App Store, Media, Web, & Games.
  4. Under Safari, choose Limit Adult Websites, then click Customize.
  5. Under Restricted, click +, type the site’s address (for example reddit.com), then click Done.
Apple's Mac User Guide page describing the Safari web content setting in Screen Time: Unrestricted Access, Limit Adult Websites and Allowed Websites Only
Apple's Mac User Guide, "Change App Store, Media, Web, & Games settings in Screen Time on Mac". Screenshot of 02/11/2026. Source: support.apple.com.

Apple lists this option under the Safari heading and does not mention other browsers, so test it in Chrome before you rely on it. Screen Time also doesn’t stop you from changing your mind: unless a passcode is set (Screen Time › Lock Screen Time Settings), you can remove the site yourself in seconds.

How do you block a website in every browser with the hosts file?

The hosts file maps names to addresses before any network request is made. Point a site to 127.0.0.1 (your own Mac) and it fails to load in Safari, Chrome, Firefox and any app that uses the system’s name lookup. Firefox lists domains in /etc/hosts as never resolved through its encrypted DNS, so the block holds there too.

  1. Open Terminal (Spotlight: Terminal).
  2. Run sudo nano /etc/hosts and enter your admin password.
  3. Go to the end of the file and add one line per name, with both the bare domain and the www version:
    127.0.0.1    reddit.com
    127.0.0.1    www.reddit.com
  4. Press Ctrl+O, Enter to save, then Ctrl+X to leave.
  5. Flush the cache: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  6. Quit and reopen the browser, then load the site. It should fail to connect.

There are no wildcards. If a site still loads, it is using another name, such as m.reddit.com or old.reddit.com: open the browser’s address bar on the working page and add that exact host.

Can a DNS filter block sites on the whole Mac?

Yes. A filtering DNS service refuses to resolve the names you list. NextDNS has a free plan with 300,000 queries a month and a Pro plan at €1.99 a month or €19.90 a year (checked 02/11/2026). Family filters such as CleanBrowsing and OpenDNS FamilyShield block categories such as adult content instead of single sites.

In System Settings › Network, choose your connection, click Details › DNS, and add the provider’s server addresses. Set it on the router instead to cover every device on your Wi-Fi.

Two things get around it:

  • Browser DNS. Chrome’s Secure DNS encrypts the lookup of a site’s address and is on in automatic mode by default; it is not available on managed devices. Chromium’s documentation notes that secure DNS requests don’t go through the system resolver. If a site loads in Chrome but not in Safari, check Chrome’s Settings › Privacy and security › Security › Use secure DNS.
  • iCloud Private Relay. Apple describes it as routing Safari traffic through relays with encrypted DNS lookups, which skips a network filter. DNS providers such as Control D block the relay’s domains by default for this reason.

How do you block sites so you can’t undo it in a minute?

Screen Time, the hosts file and DNS filters all depend on a setting you can change. If you’re blocking yourself, the useful feature is a block that stays on until a timer ends or a password you don’t know is entered.

ToolCostBlocks appsLocked modeLimit
SelfControlFree, open sourceNoA running block can’t be ended early, even by deleting the app or restartingNo scheduling, no app blocking
Cold Turkey BlockerFree plan; Pro is a one-time purchase, €39 on 02/11/2026 as shown from EuropeProPro, “all locking features”Needs browser extensions
FreedomFree plan; Premium $3.33 a month billed yearly, $8.99 monthly, or $99.50 lifetime (on sale)YesPremiumSubscription for most features
Focus$49 (one year of updates) or $129 lifetimeYesYes, with password optionMac only
Browwwser$99 a year or $199 once, 7-day trialYesLock mode with a recovery password you chooseMac and Windows 10/11; blocks sites only inside Browwwser, other browsers have to be blocked as apps

Browwwser is a Chromium-based browser for macOS that blocks sites inside the browser, so there is no extension to switch off. Lock mode hides the unlock button and has no timer. It fits if you are willing to use it as your browser; if you want Safari or Chrome covered, pick one of the system-wide tools above. For a ranking of these tools see the best website blockers, or if you’re starting from the browser, the best browser with a website blocker on Mac.

How do you block a website for a child?

Use a standard account, Screen Time with a passcode only you know, and a DNS filter with a category filter. Do all three, because each leaves a gap the others cover. If the child uses Chrome, add the Chrome steps in how to block websites on Chrome.

How do you unblock a website?

Reverse the method. In Screen Time, remove the address from the Restricted list. In the hosts file, delete the lines, save, and flush the cache again. For a DNS filter, remove the site from the denylist or switch the DNS servers back to Automatic.

Frequently asked questions

Does Screen Time block websites in Chrome?

Apple's current Mac guide lists the website setting under Safari and says nothing about other browsers, so don't count on it. To block a site in Chrome or Firefox, use the hosts file, a DNS filter or a blocking app.

How do I block a website on a Mac without Screen Time?

Add the site to the hosts file with `sudo nano /etc/hosts` and flush the DNS cache, or use a filtering DNS service. Both work without Screen Time and cover every browser on that Mac.

Can someone get around a hosts file block?

Anyone with the administrator password can remove it in a minute. A VPN does not bypass it, because the hosts file is read before any network request, but a subdomain you did not list will still load.

How do I unblock a website on a Mac?

Reverse the method you used. Remove the site from Screen Time's Restricted list, delete its lines from /etc/hosts and flush the DNS cache, or remove it from your DNS filter's denylist.

Does Browwwser block websites in Safari or Chrome?

No. Its website blocking only applies inside Browwwser, so it helps only if Browwwser is the browser you use. Its Other Browsers preset can close Safari or Chrome while blocking is on.

A Mac browser that blocks distractions,
built for deep work.

A macOS browser that blocks distracting sites in its engine and closes distracting apps.

Try it free for 7 days