How to block YouTube on a Mac (2026)

Four ways to block YouTube on a Mac: Screen Time, the hosts file, browser-level options, and a focus app with sessions and schedules. Steps, browsers covered, and what is easy to undo.

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

The fastest block that covers Chrome and other browsers on this Mac is the hosts file: two lines in /etc/hosts and a DNS flush. If you use Safari, Screen Time does it from System Settings with no Terminal. If you only want YouTube gone while you work, a focus session in Nudge blocks it in Safari and Chrome and lets it back when the session ends.

How do these apps compare?

Block YouTube on a Mac with the method that fits your browser and how strict you want it to be.

AppBest forPriceWebsite
NudgeTop pickBlocking YouTube only while you work$9.99 onceGet Nudge
Apple Screen TimeA built-in Safari blockFree, built into macOSVisit
SelfControlFree hard website blocksFreeVisit
Cold TurkeyMaximum frictionFree, Pro one-timeVisit
FreedomCross-device blocking$8.99/mo or $99.50 lifetimeVisit
BlockSiteBrowser-extension blockingSee pricingVisit

Which tool should you pick?

Nudge

Blocks youtube.com in Safari and Chrome during a session, then lets it back. $9.99 once, 7 days free.

Apple Screen Time

Restricts the site from System Settings. Apple documents it as a Safari restriction.

SelfControl

Mac-only website blocking that keeps running until the timer ends.

Cold Turkey

Strong blocking modes for users who need high friction.

Freedom

Blocks distractions across Mac, phone and tablet.

The apps in detail

  1. Nudge

    Best for: Blocking YouTube only while you work

    $9.99 once
    Choose it if
    You want youtube.com blocked in Safari and Chrome during a session or on a schedule, and open again afterward.
    Skip it if
    You need the block on your phone, or you want YouTube gone around the clock.
    Download Nudge for macOS
  2. Apple Screen Time

    Best for: A built-in Safari block

    Free, built into macOS
    Choose it if
    You use Safari and want a block from System Settings with no Terminal and no extra app.
    Skip it if
    You use Chrome. Apple documents the web content settings as Safari restrictions.
    Visit Apple Screen Time
  3. SelfControl

    Best for: Free hard website blocks

    Free
    Choose it if
    You want a simple Mac-only timer that is difficult to bypass.
    Skip it if
    You need app blocking, sync, or flexible exceptions.
    Visit SelfControl
  4. Cold Turkey

    Best for: Maximum friction

    Free, Pro one-time
    Choose it if
    You need strict blocks and hard-to-bypass modes.
    Skip it if
    You want a gentle session workflow.
    Visit Cold Turkey
  5. Freedom

    Best for: Cross-device blocking

    $8.99/mo or $99.50 lifetime
    Choose it if
    Your distraction loop moves across desktop and phone.
    Skip it if
    You want a Mac-local session tool only.
    Visit Freedom
  6. BlockSite

    Best for: Browser-extension blocking

    Choose it if
    You want lightweight browser-based controls.
    Skip it if
    You need system-level Mac app blocking.
    Visit BlockSite

Which method should you use to block YouTube?

Start with the browser you actually use. A block that covers Safari does nothing if you open YouTube in Chrome. Every method here can be reversed by you, which is the point if you are blocking YouTube for yourself. If someone else needs to be unable to undo it, a Screen Time passcode is the built-in option.

MethodEffortBrowsersEasy to undo?
Screen Time web contentLowSafari, per Apple's documentationEasy to undo unless a Screen Time passcode is set
Hosts fileHigh (Terminal, administrator password)Chrome and other browsers on this Mac that use the system resolver. Safari too, unless iCloud Private Relay is on.Easy: delete the two lines again
Browser-level optionsMediumOne browser or profile at a timeEasy: switch the setting or extension off
Nudge focus sessionLowSafari and ChromeBlocks last for the session; sessions and schedules are yours to set

Can you block YouTube with Screen Time?

Yes, for Safari. It is built into macOS and needs no Terminal. Screen Time can restrict specific websites through its web content settings. Apple documents these settings as Safari restrictions, so treat this as a Safari block. Menu names can shift slightly between macOS versions, so if a label differs, look for Content & Privacy inside Screen Time.

  1. Choose Apple menu, then System Settings, then click Screen Time in the sidebar (you may need to scroll).

  2. Click Content & Privacy and turn it on.

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

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

  5. Click the + button under the Restricted list, enter youtube.com, then click Done.

How do you check or undo the Screen Time block?

Open YouTube in each browser you use to confirm. Apple describes this setting for Safari only, so Chrome will still load it.

To undo it, select youtube.com in the Restricted list and click the minus button. A Screen Time passcode is optional and makes the list harder to change.

How do you block YouTube with the hosts file?

The hosts file points a domain at your own Mac, so the browser cannot reach the real site. It applies to Chrome and other browsers on this Mac that use the system resolver, and to Safari too, unless iCloud Private Relay is on. It needs Terminal and an administrator password.

  1. Open Terminal and run the command below. Enter your administrator password when asked.

    sudo nano /etc/hosts
  2. Move to the end of the file with the arrow keys and add these two lines:

    127.0.0.1 youtube.com
    127.0.0.1 www.youtube.com
  3. Press Control-O, then Return to save, then Control-X to exit.

  4. Flush the DNS cache so the change applies now:

    sudo dscacheutil -flushcache
    sudo killall -HUP mDNSResponder

How do you check, undo and troubleshoot the hosts file block?

Reload YouTube. It should fail to load. If it still opens, quit and reopen the browser. To unblock, open the file again, delete the two lines, save, and flush DNS again.

  • 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.
  • The file works per hostname with no wildcards, so list every address you use, such as the mobile address m.youtube.com.
  • Open tabs and cached lookups can keep the site loading until you flush DNS and restart the browser, and a proxy or VPN that resolves names remotely does not read this Mac's hosts file.
  • It is a manual toggle: nothing turns it back off at 6 pm.

Can you block YouTube inside Safari or Chrome?

In Safari, use Screen Time. Chrome has no built-in per-site block on a personal Mac, so it needs an extension or a system-level block. Browser-level options protect one browser, so you repeat the setup for every browser and profile you use.

How do you block YouTube only while you work?

Use a focus session. YouTube stays blocked during the session and opens normally afterward.

Nudge is a Mac app (macOS 13 or later) that blocks the apps and websites you pick during a focus session. Websites are blocked in Safari and Chrome. You start a session from the menu bar, either with a preset or with Quick Focus.

Nudge costs $9.99 once for Lifetime Access, with no subscription. Every Mac gets a 7-day free trial, and you do not need an email, password or card to start.

If you installed YouTube as a web app from your browser, it appears as its own app on your Mac. Nudge also blocks the apps you pick, so check that app separately.

How do you keep YouTube out of your work sessions with Nudge?

To block YouTube only while you work, set up a preset:

  1. Open Nudge and create a preset, such as Deep Work.

  2. Add youtube.com to the websites to block.

  3. Start the preset from the menu bar, or use Quick Focus for a one-off block.

  4. To make it automatic, add a schedule that runs the preset on the days and hours you choose.

What else pairs well with a YouTube block?

If you also want timed work intervals, the free Pomodoro timer works alongside it. For other options, see the best website blocker apps for Mac.

How do you block YouTube on your iPhone too?

Use Screen Time on iPhone, or another phone app. Nudge works on the Mac only, so a Mac block does not carry over to your phone.

On iPhone, go to Settings, then Screen Time, then Content & Privacy Restrictions (switch it on), then App Store, Media, Web, & Games, then Web Content, then Limit Adult Websites. Under Never Allow, tap Add Website and enter youtube.com. Apple describes the setup in its iPhone User Guide (listed under Sources).

FAQ

Can I block YouTube on a Mac without installing anything?

Yes. Screen Time (for Safari) and the hosts file (through Terminal) are both built into macOS. Neither needs an app.

Does Screen Time block YouTube in Chrome?

Apple documents the web content settings in Screen Time as Safari restrictions. Chrome has no built-in setting for blocking a specific site on a personal Mac, so use the hosts file, an extension from the Chrome Web Store, or a focus app that blocks websites in Chrome. Open YouTube in Chrome afterwards to confirm it is blocked.

Will blocking youtube.com also block the YouTube app on my Mac?

YouTube is a website on a Mac. If you installed it as a web app from your browser, it opens as its own app, so check it separately after you set up a block.

How do I unblock YouTube after editing the hosts file?

Open the file again with sudo nano /etc/hosts, delete the lines you added, save, and run the two DNS flush commands again.

Can I block YouTube only during work hours?

Yes. A focus app like Nudge blocks the websites you pick only while a session runs, and schedules start a preset on the days and hours you choose. Outside the session, YouTube works as normal.

Can I block YouTube on my iPhone too?

Yes, with Screen Time on iPhone or another phone app. Nudge is a Mac app and does not block on phones.

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 blockingBest website & app blockers for Mac in 2026Blocking strategyApp blocker vs website blocker for Mac: which do you need?PomodoroPomodoro timer with website blocking: a Mac setup that actually helpsWebsite blockingCold Turkey alternatives for Mac in 2026