How to block a website in Safari on a Mac (2026)
How to block a website in Safari on a Mac or MacBook Pro: Screen Time for macOS 26 and 27, the hosts file and Nudge sessions that block it while you work.

Quick answer
To block a website in Safari on a Mac, use Screen Time: on macOS 26 and macOS 27, open System Settings > Screen Time > Content & Privacy > App Store, Media, Web, & Games, choose Limit Adult Websites under Safari, click Customize and add the site to the Restricted list. That works on any MacBook Pro, MacBook Air or desktop Mac and has no timer. To block sites only while you work, use Nudge: pick the sites and apps, start from the menu bar, and Safari keeps working for everything else. Safari's own Websites settings only quiet pop-ups, auto-play and notifications.
How do these apps compare?
Pick the right way to block websites in Safari on a Mac, and know which methods block access and which only reduce noise.
| App | Best for | Price | Website |
|---|---|---|---|
| Repeatable Safari focus sessions on a Mac | $9.99 once | Get Nudge | |
| Built-in web restrictions in Safari | Free, built into macOS | Visit | |
| Free hard website blocks | Free | Visit | |
| Maximum friction | Free, Pro $45 once | Visit | |
| Blocking across Mac and iPhone | $8.99/mo or $99.50 lifetime (Oct deal) | Visit | |
| Mac-native blocking | Free, Pro $9.99/yr | Visit |
Which tool should you pick?
Best for work sessions
Nudge
Blocks the websites and apps you pick for the length of a session, and Safari keeps working for everything else.
Best built-in and free
Apple Screen Time
Limit Adult Websites, add restricted sites or allow only approved sites in Safari.
Best free and strict
SelfControl
A free timed website block that stays on until the timer ends.
Hardest to undo
Cold Turkey
Locked blocking modes for people who need high friction.
Best across devices
Freedom
The same blocklists on Mac and iPhone.
The apps in detail
$9.99 once1. App and website sessions
Nudge
Best for: Repeatable Safari focus sessions on a Mac
- Choose it if
- Safari is needed for work and you want specific sites and apps blocked while a session runs.
- Skip it if
- You need blocking on iPhone Safari: Nudge is a Mac app, so look at Freedom, Opal or Session.
Free, built into macOS2. Usage limits
Apple Screen Time
Best for: Built-in web restrictions in Safari
- Choose it if
- You want broad rules with no extra install.
- Skip it if
- You need rules that change by task, or blocking in browsers other than Safari.
Free3. Website blocking
SelfControl
Best for: Free hard website blocks
- Choose it if
- You want a free timed block that is difficult to undo.
- Skip it if
- You need app blocking, presets or schedules.
Free, Pro $45 once4. Website and app blocking
Cold Turkey
Best for: Maximum friction
- Choose it if
- You want strict, hard-to-bypass blocking modes.
- Skip it if
- You want a gentle session workflow.
$8.99/mo or $99.50 lifetime (Oct deal)5. Cross-device blocking
Freedom
Best for: Blocking across Mac and iPhone
- Choose it if
- The same sites distract you on your phone.
- Skip it if
- You only need a Mac-local session tool.
Free, Pro $9.99/yr6. Website and app blocking
1Focus
Best for: Mac-native blocking
- Choose it if
- You want a straightforward Mac blocker with schedules.
- Skip it if
- You need cross-device control.
How can you block websites in Safari?
Safari gives you useful controls, but most of them are not true blocking. Separate noise reduction from access blocking before choosing a method. The table compares the five methods in this guide.
For the whole-Mac version of this guide, see how to block websites on a Mac. If you also use Chrome, see how to block websites in Chrome on a Mac. Chrome has no built-in per-site block of its own.
| Method | Effort | Which browsers | Easy to undo? |
|---|---|---|---|
| Nudge session | Low | Safari and Chrome on the Mac | Blocked for the length of the session |
| Safari Websites settings | Low | Safari only; reduces site behavior, does not fully block access | Yes |
| Screen Time web restrictions | Medium | Safari only | Yes, from System Settings |
| Content blockers | Medium | Safari only; removes ads and unwanted content, not focus-session blocking | Yes |
| Hosts file | High | Safari and other browsers on this Mac; may not apply with iCloud Private Relay | No, needs a manual edit and a DNS flush to undo |
How do you block distracting websites in Safari with Nudge?
Safari often belongs in a focus session. You may need it for research, docs, web apps, reading, billing or writing tools. The problem is not Safari itself. The problem is that the same browser also contains news, feeds, forums, video and shopping.
Nudge is a Mac app (macOS 13+) that blocks the apps and websites you pick during a focus session. Websites are blocked in Safari and Chrome. It starts from the menu bar with presets or Quick Focus. This keeps the browser useful while narrowing the web to what the work actually needs.
Create a Nudge preset for the task.
Leave Safari off the block list if the session needs browser access.
Add the distracting websites to the blocked list.
Keep only the Mac apps that belong in the work block.
Start the session from the menu bar.
What can Safari's Websites settings do?
Safari Websites settings let you manage per-site behavior such as Reader, Content Blockers, Auto-Play, Pop-up Windows and Notifications. This is useful for reducing friction and noise on sites you still need to visit.
Use this for noise control. Do not rely on it as your main focus blocker if the goal is to stop visiting a distracting site entirely.
Open Safari.
Choose Safari, then Settings.
Open the Websites tab.
Select a setting on the left, such as Pop-up Windows, Content Blockers, Auto-Play or Notifications.
Choose the behavior for the current site, configured sites, or websites you have not configured yet.
Do pop-up, content and notification settings block a site?
No. Safari can block pop-up windows for a single website or all websites. It can also use content blockers to stop ads and other unwanted content where a content blocker is installed. Auto-Play settings can stop videos from starting automatically, and notification settings can deny a site's ability to send alerts.
These are valuable cleanup steps. A site with fewer pop-ups, autoplay videos and notifications is less distracting. But the site is still available, which means the habit loop may still survive.
How do you block a website in Safari with Screen Time?
Screen Time Content & Privacy settings include Safari web content levels: Unrestricted Access, Limit Adult Websites (with Allowed and Restricted lists you can customize) and Allowed Websites Only (only the sites on its list open). These rules apply to Safari only. Version note: Apple's macOS 26 and macOS 27 guides give the same path for website restrictions: Screen Time, Content & Privacy, App Store, Media, Web, & Games, then the Safari setting. The macOS 27 Schedule and Time Allowances settings are described for apps and app categories, so they are not how you block a single website.
The steps below are the same on a MacBook Pro, a MacBook Air and any other Mac. The block has no timer: it stays until you remove the entry (select the site in the list and click Remove). That is stronger than ordinary Safari settings, but less flexible than a work-session preset when your rules change between writing, research, admin and deep work.
Choose Apple menu > System Settings, then click Screen Time in the sidebar. You may need to scroll.
Turn Screen Time on if needed, then click Content & Privacy and make sure it is on.
Click App Store, Media, Web, & Games.
Under Safari, choose Limit Adult Websites, then click Customize.
Click the Add button below the Restricted list, enter the website URL, and click Done. For a much stricter setup, choose Allowed Websites Only instead and add only the sites you want to open.
Open the site in Safari to confirm it is blocked.
How do you block a website with the hosts file?
The Mac hosts file can block domains by pointing them back to your own machine. It is a system-level change, so it is not limited to Safari. The downside is maintenance: editing system files, remembering subdomains, flushing DNS, and undoing changes when the block should end.
Safari has one extra caveat. If iCloud Private Relay is on, a local hosts entry may not apply in Safari, so turn Private Relay off if the block does not work.
Use the hosts file if you are technical and want a static system-level block. Use Nudge if the rules need to change by task.
Open Terminal and edit the hosts file with administrator rights.
sudo nano /etc/hostsAdd a line for each domain, pointing it at your own machine, and include the www version.
127.0.0.1 example.com www.example.comSave the file (Control-O, then Return) and exit (Control-X).
Flush the DNS cache so the change applies.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderRestart Safari. To undo the block, delete the line and flush DNS again.
How do you block websites on iPhone Safari too?
Nudge is a Mac app, so it does not block iPhone Safari. On the iPhone, the built-in route is Screen Time web content restrictions. If the same sites pull you away on your phone, a cross-device blocker such as Freedom keeps one blocklist on Mac and iPhone.
Which method should you use for Safari?
Use Safari settings to quiet websites. Use Screen Time to create broader built-in restrictions. Use the hosts file if you want manual system-level blocking and are comfortable maintaining it.
Use Nudge when Safari is needed for work but specific websites should be blocked during the session. Pick the apps and sites to block, start from the menu bar, and schedules can run presets on the days and hours you choose. For blocking installed apps as well, see how to block apps on a Mac, and for silencing notifications see how to use Focus mode on a Mac. Nudge costs $9.99 once for Lifetime Access, with a 7-day free trial and no card to start. If you want a timer first, there is also a free web timer at the Pomodoro timer.
FAQ
What is the easiest way to block websites on Safari for Mac?
The easiest repeatable method is Nudge: create a preset, add distracting websites and apps to block, and start the session from the Mac menu bar.
Can Safari block websites by itself?
Safari can block pop-ups, manage content blockers, control auto-play, deny notifications, and customize settings per website. For actual access blocking, use Screen Time, Nudge, or a system-level method.
Can Screen Time block websites in Safari?
Yes. On macOS 26 and macOS 27, Screen Time Content & Privacy settings can limit adult websites, add restricted websites, or allow only approved websites. These rules apply to Safari only, and there is no timer.
Does iCloud Private Relay affect a hosts-file block?
It can. With iCloud Private Relay on, a local hosts entry may not apply in Safari, so turn Private Relay off if a hosts-file block does not apply in Safari.
Can Nudge block distracting Safari sites while Safari keeps working?
Yes. Nudge blocks the distracting domains during the focus session, and Safari keeps working for everything else.
How do I block a website on Safari on a MacBook Pro?
Open System Settings > Screen Time > Content & Privacy > App Store, Media, Web, & Games, choose Limit Adult Websites under Safari, click Customize and add the site to the Restricted list. The steps are the same on a MacBook Pro, a MacBook Air and other Macs, on macOS 26 and macOS 27.
How do I block a website in Safari for a set time?
Screen Time has no one-off timer for a website. Use a Nudge focus session from the menu bar, which blocks the sites you pick until the session ends, or a free timer app such as SelfControl.
Nudge for Mac
Turn the guide into a focus session
Pick the apps and websites that pull you away and start the session from the menu bar. They stay blocked until it ends. $9.99 once after 7 days free, no card to start.
Download for macOS







