Focus Berry

How to block YouTube on MacBook

To block YouTube on MacBook, add youtube.com to the restricted list in Screen Time, install a Chrome extension, or point youtube.com at your own Mac in the hosts file. Each blocks the site until you undo it. Or lock your MacBook to your work tab with Focus Berry, and YouTube is out of reach until the timer ends.

Updated

How do I block YouTube on MacBook with Screen Time?

Screen Time is built into macOS, and its restricted list can hold youtube.com.

  1. Open Screen Time.System SettingsScreen Time
  2. Open the web content settings.System SettingsScreen TimeContent & PrivacyApp Store, Media, Web, & Games
    Older macOS versionsEarlier versions:System SettingsScreen TimeContent & PrivacyStore, Web, Siri & Game Center Content
  3. Select Limit Adult Websites.
  4. Click Customize.
  5. Click the Add button below the Restricted list and enter youtube.com.
  6. Click Done.
  7. Turn on Lock Screen Time Settings so the list needs a passcode to change.System SettingsScreen TimePasscode & Management

If Screen Time is off, turn it on. You may need to scroll down the sidebar to find it.

Apple’s page doesn’t say which browsers the setting covers. After you add YouTube, open it in the browser you use.

How do I block YouTube on Mac in Safari and Chrome?

Safari has no YouTube setting of its own, so in Safari the Screen Time list above is the built-in answer. Chrome has no site blocker either: people add a blocking extension from the Chrome Web Store. An extension covers Chrome only, so YouTube still opens in any other browser, and you can switch the extension off in a moment of weakness.

How do I block YouTube on MacBook with Terminal?

The hosts file points YouTube’s names at your own Mac, so they never load. It is a system file, so take a copy first.

  1. Back up the file in Terminal: sudo cp /etc/hosts /etc/hosts.backup
  2. Open the file: sudo nano /etc/hosts
  3. Enter your password.
  4. Go to the end and add 127.0.0.1 youtube.com, 127.0.0.1 www.youtube.com and 127.0.0.1 m.youtube.com, one per line.
  5. Save and close: ⌃O, Return, then ⌃X.
  6. Clear the cache so it takes effect: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

It works in every browser, and you can remove the lines in a minute. That makes it a speed bump, not a lock.

How do I block YouTube on Mac with Focus Berry?

  1. Download Focus Berry.
  2. Open the DMG and drag Focus Berry to Applications.
  3. Open the page you work in, in a tab in Chrome, Safari or Firefox.
  4. Click Focus Berry in your menu bar.
  5. Choose a browser tab as the one thing.
  6. Pick the tab you opened.
  7. Choose how long the session lasts.
  8. Choose how hard it is to leave: Easy, Breaks or Typing, or Impossible with Pro.
  9. Start the session.

The first time, macOS asks whether Focus Berry may control the browser. That prompt is macOS’s own.

YouTube is not on a list, because nothing else is available at all: every other tab, window and app steps aside, and every other display goes dark or shows a calm backdrop. When the timer ends, they all come back where they were.

What if I need YouTube for a lecture or a tutorial?

Then open that video and pick its tab as the one thing. A blocklist that bans YouTube would block your lecture too. A lock lets one tab through, and every other tab, YouTube ones included, steps aside until the timer ends. Pro can lock several tabs at once, if the video and your notes both need to stay.

How do I keep only one YouTube video open?

Open the tutorial or lecture, turn off Autoplay in the player so the next video doesn’t start, and pick that tab as the one thing in Focus Berry. Every other tab, window and app, a second YouTube tab included, steps aside. When the video is done, end the session or let the timer finish. For other sites, see how to allow only one website on Mac.

Which way of blocking YouTube should I choose?

Use Screen Time if you want YouTube gone for a user, such as a child, and set a passcode. Use an extension or the hosts file if YouTube is the only problem. If the real problem is that something else follows it, such as Reddit or a feed, a lock for the session covers the lot. See studying for a setup, or compare Focus Berry with other blockers.

Does locking my Mac to one tab cost anything?

No. The lock is free, at any length and on every display. Pro adds Impossible mode, several tabs or apps at once and always-allowed apps: €49 a year or €149 once, with a 6-month money-back guarantee.

More guides

Your next 45 minutes, on one thing.

Pick it, start the timer, and let Frost keep watch.

Download for Mac

Free · macOS 14 or later

Focus Berry is for Macs. Send yourself the link

Open it on your Mac to download. It runs on macOS 14 or later.

https://focusberry.app/download/