How to block a website on a Mac (2026)

How to block a website on a Mac or MacBook: Screen Time for macOS 26 and 27, the hosts file, SelfControl and Nudge, plus how to block a site for a set time.

App icons of Nudge, Apple Screen Time, SelfControl, Cold Turkey, Freedom

To block a website on a Mac, the built-in route is 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 and add the site to the Restricted list. Apple describes that setting for Safari only. To block a site in Chrome too, or only for a set period such as a 90-minute work session, use Nudge (started from the menu bar, blocks in Safari and Chrome) or SelfControl (a free timer). The hosts file also works, but it is manual, per hostname and needs an admin password.

How do these apps compare?

Pick the lightest way to block websites on a Mac that holds up for the length of a work session.

AppBest forPriceWebsite
NudgeTop pickRepeatable focus sessions$9.99 onceGet Nudge
Apple Screen TimeBuilt-in limitsFree, built into macOSVisit
SelfControlFree strict website timersFreeVisit
Cold TurkeyMaximum frictionFree, Pro $45 onceVisit
FreedomBlocking across Mac and phone$8.99/mo or $99.50 lifetime (Oct deal)Visit
1FocusLow-cost Mac blockingFree, Pro $9.99/yrVisit

Which tool should you pick?

Nudge

Saved presets with blocked apps and websites for coding, writing, study or admin, started from the menu bar.

Apple Screen Time

Basic app and website limits, plus a Safari website restriction, with nothing to install.

SelfControl

A free timer that keeps websites blocked until it ends, even after a restart.

Cold Turkey

Strict locked modes for people who need high friction.

Freedom

The same blocklists on Mac and phone.

The apps in detail

  1. Nudge

    Best for: Repeatable focus sessions

    $9.99 once
    Choose it if
    You want distracting apps and websites blocked in Safari and Chrome for a session, started from the menu bar with a preset.
    Skip it if
    You need to block sites on your phone as well: Nudge is a Mac app, so look at Freedom, Opal or Session.
    Download Nudge for macOS
  2. Apple Screen Time

    Best for: Built-in limits

    Free, built into macOS
    Choose it if
    You want app and website limits, or a Safari website restriction, without installing anything.
    Skip it if
    You need task-specific presets or a block that covers Chrome.
    Visit Apple Screen Time
  3. SelfControl

    Best for: Free strict website timers

    Free
    Choose it if
    You want a free timer that keeps sites blocked until it ends.
    Skip it if
    You need app blocking, presets, a menu bar workflow or analytics.
    Visit SelfControl
  4. Cold Turkey

    Best for: Maximum friction

    Free, Pro $45 once
    Choose it if
    You want strict locked blocks that are hard to undo.
    Skip it if
    You want a gentle daily session workflow.
    Visit Cold Turkey
  5. Freedom

    Best for: Blocking across Mac and phone

    $8.99/mo or $99.50 lifetime (Oct deal)
    Choose it if
    The same sites pull you away on your Mac and your phone.
    Skip it if
    You only work on a Mac and do not want a subscription.
    Visit Freedom
  6. 1Focus

    Best for: Low-cost Mac blocking

    Free, Pro $9.99/yr
    Choose it if
    You want a Mac-only blocker with a free tier.
    Skip it if
    You need blocking on other devices.
    Visit 1Focus

How can you block websites on a Mac?

You can block websites on a Mac with Screen Time, the hosts file, a strict website timer such as SelfControl, or a focus app such as Nudge. The right method depends on whether you need a one-off block or a repeatable work-session system.

Start with the lightest method that can actually hold your focus block. A strict method is not always better if it is too annoying to use every day.

MethodEffortWhich browsersEasy to undo?
NudgeLowSafari and Chrome.Stays blocked for the length of the session you set.
Screen Time limitsMediumApp Limits on macOS 26 and earlier; Time Allowances and Schedule on macOS 27, set by app category. A baseline, not built around task presets.Yes, from System Settings.
Screen Time web content restrictionsMediumApple describes this setting for Safari only. Open the site in each browser to confirm.Yes, remove the site from the Restricted list.
/etc/hosts fileHighBrowsers on this Mac that use the system resolver or Chrome's own resolver, including Chrome. Safari too, unless iCloud Private Relay is on.Delete the lines and flush DNS again.
SelfControlLowFree strict website timers. No app blocking, presets, menu bar workflow or analytics.No, it runs until the timer ends.

How do you block websites on a Mac with Nudge?

Nudge is the easiest option when website blocking is part of a broader work session. Instead of only blocking a list of domains, you create a preset for the work you want to do. Distracting apps and websites are blocked, and the session starts from the menu bar.

This is the best fit for people who do not just want to block one website. They want the Mac environment to match the task.

  1. Open Nudge and create a preset, such as Writing, Deep Work, Study or Admin.

  2. Add the Mac apps that pull you away during the session.

  3. Add distracting websites that should be blocked in the browser.

  4. Start the preset from the menu bar when the work block begins.

  5. Reuse the preset next time instead of rebuilding the blocklist.

How do you limit apps and websites with Screen Time on macOS 26 and macOS 27?

Screen Time is the built-in baseline. Apple reorganized it in macOS 27, so the steps depend on your version.

On macOS 26 and earlier, App Limits can cap time on an app, a category or a website, and Block at end of limit blocks it when the time is used up. On macOS 27, Apple's guide describes Schedule (time windows, with the app categories you allow in each) and Time Allowances (daily limits by app category). Apple's macOS 27 guide does not describe website limits in Time Allowances, so on macOS 27 use the Content & Privacy method in the next section for a specific website.

Limits suit reducing usage, not task-specific work sessions. If you need different rules for writing, coding and admin, presets are easier.

  1. On macOS 26 and earlier: open System Settings, click Screen Time, then click App Limits and turn it on if needed.

  2. On macOS 26 and earlier: click Add Limit, click the arrow next to Websites at the bottom of the list, then select the site or click Add Website and enter its URL.

  3. On macOS 26 and earlier: choose Every Day or Custom, enter a time, select Block at end of limit and click Done.

  4. On macOS 27: open System Settings, click Screen Time and turn on Schedule. Click Add New Schedule, choose the days and click Done, then click Add Time Window, name it, set the start and stop times and pick which app categories stay allowed.

  5. On macOS 27, for daily limits: click Time Allowances, click Manage Categories, then Add, and choose a category such as Entertainment, Games or Social Media.

How do you block a website on a Mac with Screen Time Content & Privacy?

This is the built-in way to block a named website. 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.

Under Safari you pick Unrestricted Access, Limit Adult Websites or Allowed Websites Only. With Limit Adult Websites, add the site to the Restricted list. Apple describes this setting for Safari only, so do not assume it covers Chrome or other browsers. Chrome has no built-in per-site block of its own.

To remove a site, select it in the Restricted list and click the Remove button. Allowed Websites Only is stricter: only the sites on its list open. There is no timer, so the block stays until you remove the entry, which is too blunt if the goal is a 90-minute focus block.

  1. Choose Apple menu > System Settings, then click Screen Time in the sidebar. You may need to scroll.

  2. Turn Screen Time on if needed, then click Content & Privacy and make sure it is on.

  3. Click App Store, Media, Web, & Games.

  4. Under Safari, choose Limit Adult Websites, then click Customize.

  5. Click the Add button below the Restricted list, enter the website URL, and click Done. Open the site in each browser you use to confirm.

How do you block a website with the Mac hosts file?

This is an advanced manual method. Use it only if you are comfortable editing system files. The hosts file adds a line so a site's address points nowhere. It applies to browsers on this Mac that use the system resolver or Chrome's own resolver, and it needs an admin password. It works per hostname only, with no wildcards, so it is manual and easy to manage badly.

A proxy or VPN that resolves names remotely does not read this Mac's hosts file. Open tabs, connections and DNS caches can keep a site loading until the cache is flushed and the browser is restarted.

With iCloud Private Relay on, Safari sends its web requests through Apple's relays, so a hosts entry may not apply there. Turn Private Relay off for Safari, then open the site to confirm it is blocked.

This method is not a friendly daily workflow. It does not know what task you are doing, it does not give you presets, and to undo it you delete the lines and flush again.

  1. Open the hosts file in Terminal with an admin password.

    sudo nano /etc/hosts
  2. Add the root domain and every subdomain you use, such as www. Using 127.0.0.1 instead of 0.0.0.0 also works.

    0.0.0.0 example.com
    0.0.0.0 www.example.com
  3. Save the file, then flush DNS.

    sudo dscacheutil -flushcache
    sudo killall -HUP mDNSResponder
  4. Quit and reopen the browser, then open the site to confirm it is blocked.

How do you block a website on a Mac for a period of time?

Two tools run a block for a set length and then end it. Nudge blocks the websites and apps you pick for the length of a focus session you start from the menu bar, in Safari and Chrome, and everything opens again afterwards. SelfControl is a free timer: you add the sites, set a duration and start, and the block runs until the timer ends.

Apple Screen Time has no one-off timer for a website. On macOS 26 and earlier, App Limits can use a short daily limit with Block at end of limit. On macOS 27, a Schedule time window sets hours for app categories. The Content & Privacy Restricted list has no timer: it stays until you remove the entry.

If you work in timed rounds, the free web Pomodoro timer pairs with either tool, and the 52/17 rule is one rhythm to try.

Can Safari settings block websites?

Not on their own. Safari has per-website settings, pop-up controls and content blocker support. These help reduce unwanted interruptions, but they should not be confused with a durable focus-session website blocker. Use them to reduce noise, then use Screen Time, Nudge, SelfControl or hosts file rules for actual website blocking.

  1. Open Safari.

  2. Choose Safari, then Settings.

  3. Open the Websites tab.

  4. Review settings such as Pop-up Windows, Content Blockers, Auto-Play and Reader.

Is SelfControl a good free way to block websites?

SelfControl is free and open-source. You add sites or mail servers, set a timer, and start. The block continues until the timer expires, even if you restart the Mac or delete the app.

That strictness is useful for one-off blocks. It is less useful when you need app blocking, reusable work presets, menu bar starts or session history. Compare the two here: Nudge vs SelfControl. More options are in SelfControl alternatives for Mac.

How do you block one specific site on a Mac?

Add that site to a Nudge preset and it stays blocked in Safari and Chrome for the length of a session. These articles cover the sites people block most:

How do you block websites without blocking your work?

Block the sites that pull you away, not the browser you need. A setup that survives a real workday takes four steps.

  1. Make two lists: sites the work needs, such as docs, GitHub, Notion, Figma, dashboards, banking and search, and sites that pull you into loops, such as feeds, video, shopping, forums and news.

  2. Turn them into task presets. A coding preset keeps GitHub, docs and package registries. A writing preset keeps notes, sources and a dictionary. An admin preset keeps mail, calendar, invoices and banking.

  3. Test every browser you use, including private windows and other profiles, before a deadline depends on the setup.

  4. Decide exceptions before the session starts. A site you need often belongs in the preset. If every session needs an emergency exception, the preset is too strict.

How do you block websites on an iPhone too?

The Mac methods above do not cover your phone. Nudge is a Mac app, and the hosts file and SelfControl only apply to the Mac they are set up on. Screen Time can limit websites on iPhone and iPad as well, and a cross-device blocker such as Freedom keeps the same blocklists on Mac and phone. If your phone is where the distraction actually happens, plan for a separate block there.

What should you use to block websites during work sessions?

Use Screen Time if you want a built-in usage cap. Use Content & Privacy restrictions if you want Safari website restrictions. Use the hosts file if you are technical and want a manual per-hostname block. Use SelfControl if you want a free strict timer.

Use Nudge if the real job is repeatable focus (for apps as well as websites, see how to block apps on a Mac, and for notifications how to use Focus mode on a Mac): distracting apps and websites stay blocked, and the preset is easy to start again tomorrow. It runs on macOS 13 or later, includes a 7-day free trial with no card to start, and costs $9.99 once for Lifetime Access. If you also want a timer, there is a free web Pomodoro timer.

FAQ

What is the easiest way to block websites on Mac?

The easiest repeatable method is a focus app like Nudge: create a preset, add distracting websites and apps, and start the session from the menu bar.

Can I block websites on Mac without installing an app?

Yes. Use Screen Time (on macOS 26 and 27, System Settings > Screen Time > Content & Privacy > App Store, Media, Web, & Games, then the Safari setting) or the Mac hosts file. Those methods work best as baselines, not flexible work-session presets.

Can Safari block websites by itself?

Safari has website settings, pop-up controls and content blocker support, but it is not a complete focus-session website blocker by itself. Use Screen Time, a blocker app or the hosts file for stronger blocking.

Is the hosts file a good way to block websites?

The hosts file can block named domains in browsers on this Mac that use the system resolver or Chrome's own resolver, including Chrome, and Safari with iCloud Private Relay off. It works per hostname, needs an admin password, and is manual. It is better for advanced users than for daily focus sessions.

Can Nudge block apps and websites at the same time?

Yes. Nudge is built around Mac focus sessions with distracting apps and websites blocked during the session. Websites are blocked in Safari and Chrome.

How do I block a website on a Mac for a set period of time?

Start a Nudge focus session from the menu bar: the websites and apps in your preset stay blocked in Safari and Chrome until the session ends. SelfControl is a free alternative that blocks sites until a timer you set runs out. Screen Time has no one-off website timer.

How do I block a website on a MacBook?

The steps are the same on any MacBook, including MacBook Air and 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. That covers Safari. For Chrome too, use Nudge, SelfControl or the hosts file.

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
Nudge preset with its app list and blocked websites

Sources

Website blockingWebsite blocker for Mac: the best website and app blockers in 2026How-toHow to block apps on a Mac (2026)Blocking strategyApp blocker vs website blocker for Mac: which do you need?Website blockingCold Turkey alternatives for Mac in 2026: free and one-time options