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.

Quick answer
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.
| App | Best for | Price | Website |
|---|---|---|---|
| Blocking YouTube only while you work | $9.99 once | Get Nudge | |
| A built-in Safari block | Free, built into macOS | Visit | |
| Free hard website blocks | Free | Visit | |
| Maximum friction | Free, Pro one-time | Visit | |
| Cross-device blocking | $8.99/mo or $99.50 lifetime | Visit | |
| Browser-extension blocking | See pricing | Visit |
Which tool should you pick?
Best for work sessions
Nudge
Blocks youtube.com in Safari and Chrome during a session, then lets it back. $9.99 once, 7 days free.
Built-in and free
Apple Screen Time
Restricts the site from System Settings. Apple documents it as a Safari restriction.
Free and strict
SelfControl
Mac-only website blocking that keeps running until the timer ends.
Hardest to undo
Cold Turkey
Strong blocking modes for users who need high friction.
Across devices
Freedom
Blocks distractions across Mac, phone and tablet.
The apps in detail
$9.99 once1. App and website sessions
Nudge
Best for: Blocking YouTube only while you work
- 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.
Free, built into macOS2. Usage limits
Apple Screen Time
Best for: A built-in Safari block
- 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.
Free3. Website blocking
SelfControl
Best for: Free hard website blocks
- 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.
Free, Pro one-time4. Website and app blocking
Cold Turkey
Best for: Maximum friction
- Choose it if
- You need strict blocks and hard-to-bypass modes.
- Skip it if
- You want a gentle session workflow.
$8.99/mo or $99.50 lifetime5. Website and app blocking
Freedom
Best for: Cross-device blocking
- Choose it if
- Your distraction loop moves across desktop and phone.
- Skip it if
- You want a Mac-local session tool only.

6. Browser blocking
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.
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.
| Method | Effort | Browsers | Easy to undo? |
|---|---|---|---|
| Screen Time web content | Low | Safari, per Apple's documentation | Easy to undo unless a Screen Time passcode is set |
| Hosts file | High (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 options | Medium | One browser or profile at a time | Easy: switch the setting or extension off |
| Nudge focus session | Low | Safari and Chrome | Blocks 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.
Choose Apple menu, then System Settings, then click Screen Time in the sidebar (you may need to scroll).
Click Content & Privacy and turn it on.
Click App Store, Media, Web & Games.
Under Safari, choose Limit Adult Websites, then click Customize.
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.
Open Terminal and run the command below. Enter your administrator password when asked.
sudo nano /etc/hostsMove 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.comPress Control-O, then Return to save, then Control-X to exit.
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.
- Safari: use the Screen Time method above. Safari's own Settings are for pop-ups, content blockers and per-site preferences. See how to block websites in Safari on a Mac.
- Chrome: use an extension from the Chrome Web Store, or block at the system level with the hosts file. Open YouTube in Chrome to confirm. See how to block websites in Chrome on a Mac.
- A browser extension is easy to switch off, and it does not follow you into another browser. For the general version of this topic, read how to block websites on a Mac.
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:
Open Nudge and create a preset, such as Deep Work.
Add youtube.com to the websites to block.
Start the preset from the menu bar, or use Quick Focus for a one-off block.
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.
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



