← All posts

How to Block YouTube on Mac: Every Method, From the Whole Site to Just Shorts

By Anay Goenka · Updated · 10 min read

The short answer

To block all of YouTube for free, add youtube.com to Screen Time's Restricted list (then test it in every browser you use) or add YouTube's domains to /etc/hosts. Both take seconds to undo. To block only Shorts or the recommendations, use a browser extension or a URL rule in a blocker app, because the hosts file can't see paths. YouTube can't be limited to one channel by URL, but it can be limited to one playlist.

Disclosure: we make FocusDragon, a website blocker for Mac, and it comes up in this guide. Everything about Apple's tools and other apps comes from their own documentation or the published sources linked below, and we say plainly where another tool does the job better.

Most guides treat YouTube as all or nothing. But many people don't want to lose YouTube entirely. They need the lecture, the coding tutorial or the recipe, and want to lose Shorts, the home feed and the sidebar that turns one video into twelve. So this guide covers the full range: blocking the whole site, blocking only the parts that pull you in, and allowing only what you need.

One question matters more than any setting: how easy is it for you to undo? A block you can switch off in twenty seconds holds only until the first time you really want YouTube back. Each method below says how easy it is to reverse.

Which method fits what you want

What you wantBest methodCostEasy to undo?
Block all of YouTube, lightlyScreen Time Restricted listFreeYes, unless someone else holds the passcode
Block all of YouTube in every browserHosts file, or a blocker appFreeHosts file: yes. Blocker app: depends on the lock
Block only ShortsExtension, or a URL rule in a blockerFree to a few dollarsDepends on the tool
Hide the home feed and recommendationsUnhook, or a Safari extensionFree to a few dollarsYes
Allow one playlist, block the restBlocker app with URL exceptionsFree in several appsDepends on the lock
Keep YouTube for work, lose it for funA goal-based blocker such as AI FocusPaid after a free trialDepends on the lock

Method 1: Screen Time (built in, free)

Screen Time is already on your Mac. Apple's current steps (source) use different labels from the older guides you'll find, so here they are as they appear now:

  1. Open the Apple menu, then System Settings, then Screen Time.
  2. Click Content & Privacy and turn it on if it's off.
  3. Click App Store, Media, Web, & Games.
  4. Under Access to Web Content, choose Limit Adult Websites, then click Customize.
  5. Under Restricted, click +, enter youtube.com, and click Done. Add www.youtube.com and m.youtube.com the same way.
  6. Open YouTube in each browser you use to check it is blocked.

That last step matters. Apple's page lists these web options under a Safari heading and doesn't say whether other browsers are covered. Some guides only mention Safari and Firefox. So if you use Chrome, Edge or Brave, test it there before you rely on it.

Screen Time also has Allowed Websites Only, which blocks everything except a list you approve. That's the built-in way to allow only certain sites, though it works on whole sites, so it can't allow one YouTube video and block the rest.

How easy is it to undo? Very, if you set it up yourself. Screen Time was designed for parents limiting children. If you know the passcode, you can switch it off in a few clicks. It holds better when someone else sets the passcode.

Method 2: The hosts file (free, every browser)

The hosts file tells your Mac where to find a website before it asks the internet. Point YouTube's addresses at your own machine and they stop loading. It's the method most guides cover, but they usually list only one or two addresses, which leaves gaps such as the mobile site and short links.

  1. Open Terminal and run: sudo nano /etc/hosts. Enter your Mac password when asked.
  2. At the bottom of the file, add one line per address: 127.0.0.1 youtube.com, then 127.0.0.1 www.youtube.com, 127.0.0.1 m.youtube.com, 127.0.0.1 youtu.be and 127.0.0.1 music.youtube.com (if you want YouTube Music gone too).
  3. Save with Control-O, press Return, then exit with Control-X.
  4. Flush the DNS cache so the change applies straight away: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  5. Quit and reopen your browsers, then try YouTube in each one.

Each address needs its own line, because the bare domain and the www version count as separate entries. Two limits are worth knowing. First, the hosts file only understands whole hostnames, not paths, so it can't block youtube.com/shorts/ on its own. It's all of YouTube or none of it. Second, a browser that resolves names over its own secure DNS may not read the hosts file the same way, so test in every browser rather than assuming. Our step-by-step guide to blocking websites on Mac covers the hosts file in more detail.

How easy is it to undo? Very. Delete the lines, save and flush again. It takes about twenty seconds once you know how, and you will know how.

Method 3: Browser extensions (free or cheap, per browser)

Extensions are the only free tools that see inside the page, which is why they're the best answer for Shorts and recommendations. Most general-purpose blocking extensions can also block youtube.com outright. Our guide to blocking websites in Chrome on a Mac covers the extension options and the Incognito loophole. The downside is coverage. An extension only works in the browser it's installed in, and a second browser with no extension is a way around it.

If you only want part of YouTube gone, skip to the section on blocking just Shorts and recommendations below.

How easy is it to undo? Usually very easy. You can turn off or remove most extensions from the browser's extensions page.

Method 4: A blocker app (hardest to undo)

A dedicated blocker combines the system-wide reach of the hosts file with page-level rules from an extension, and adds the thing the free methods lack: a lock. You decide in advance how hard the block is to remove, and then you can't change your mind in the moment.

FocusDragon is the one we make. Add youtube.com to a block and it's enforced two ways at once: in the hosts file, through a background service, and by its extension in Safari, Chrome and other Chromium browsers, and Firefox. Instead of a connection error, you see a block page. The block keeps running if you quit the app, force-quit its background service or drag the app to the Trash, and changing the system clock doesn't end a timer. The core blocker is free. Pro, $19.99 one time (October 2026), adds the locks that decide how hard a block is to switch off, from a simple timer to a long random text you must retype or a password a friend holds.

It isn't the only good option. Cold Turkey Blocker's free tier includes website blocking, website exceptions and timed blocks, and Pro is a one-time purchase (pricing). It's a good choice if you also use Windows. Freedom's free plan includes website blocking and exceptions, and Premium was $8.99 a month, $3.33 a month billed yearly or $99.50 once in October 2026 (pricing). If YouTube is also a problem on your phone, Freedom's cross-device sync is the real reason to pick it. We compare them in our roundup of Mac website blockers.

How easy is it to undo? That depends on the lock you choose, which is the point.

How to block only YouTube Shorts or recommendations

Shorts and the home feed are different problems, and they need different tools.

Shorts only

Every Short lives under youtube.com/shorts/, so any tool that can block a path can block Shorts and leave normal videos alone. The hosts file can't do it, because it never sees the path. Your options:

  • Safari: Eat the Shorts is a Safari extension for Mac that removes Shorts. iMore reported it as a one-time $1.99 on the Mac App Store (source); check the current price on the listing.
  • Chrome, Edge or Firefox: Unhook is free and can hide Shorts (Chrome Web Store, Edge Add-ons).
  • Every browser, with a lock: in FocusDragon, type youtube.com/shorts/ into a block's website field instead of youtube.com. It becomes a page-level rule, so searching YouTube for a tutorial still works but Shorts are blocked. This rule is enforced by FocusDragon's browser extension, not the hosts file, so the extension needs to be installed in every browser you use. Test it by opening a Short directly and by clicking one from the YouTube home page.

The home feed and recommendations

This is where an extension that edits the page is better than a blocker, including ours. FocusDragon blocks or allows addresses. It doesn't hide parts of a YouTube page. For that:

  • Unhook (free, for Chrome, Edge and Firefox) hides the recommended sidebar, Shorts, end-screen suggestions, comments, the home page feed and the trending tab, and can turn off autoplay. We couldn't find a Safari version.
  • Remove distractions on YouTube is a Safari extension on the Mac App Store that hides related videos, Shorts and home page recommendations (listing). It appeared as $1.99 in October 2026; check the listing.
  • Turn off YouTube watch history. In 2023 YouTube said that with watch history off, and little history saved, the home page recommendations would be switched off, leaving search, subscriptions and the menu (9to5Google). Recommendations briefly came back that November, and YouTube called it an error (9to5Google). That's reported behaviour, not a promise, but it's free and works in any browser where you're signed in.

How to allow one YouTube channel or playlist

This is the request most guides skip, because the honest answer is awkward: you can't reliably allow one channel by URL. A video's address is youtube.com/watch?v= followed by an ID, and nothing in that address says which channel it belongs to. Network admins run into the same wall. The usual advice is to list each video ID individually (Palo Alto Networks forum). Even guides that allow a whole channel do it by listing every playlist and video ID, and note that it breaks for videos opened from feeds or embeds (SafeSquid).

Playlists are different. When you watch a video inside a playlist, the address carries list= and the playlist's ID. A blocker can match that. So the practical workaround for "only this channel" or "only my course" is: put the videos you need in a playlist (or use the creator's), then allow that playlist and block everything else.

Allowing one playlist in FocusDragon

  1. Copy the playlist ID: the part after list= in the playlist's address. It usually starts with PL.
  2. Create a block with youtube.com in it.
  3. Open the block's Exceptions and add a URL exception for the domain youtube.com.
  4. In the advanced fields, put the playlist ID in URLs containing, for example list=PLxxxxxxxx.
  5. Start the block, then open the playlist and play a video from it. Then click a video in the sidebar that isn't part of the playlist. It should be blocked.

A few details worth knowing. The exception only ever applies to youtube.com, so a "contains" rule can never unblock another site. Once you add an exception, youtube.com is removed from the hosts-file layer and enforced by the extension instead, so install it in every browser. To allow a channel's own page rather than its videos, add the path /@channelname as an allowed path. And while a lock is running, adding or widening an exception counts as weakening the block, so you can't quietly slip one in halfway through.

Other blockers handle this too. The Focus app for Mac documents a rule for allowing a single playlist while youtube.com stays blocked (Focus docs), and Cold Turkey and Freedom both include website exceptions in their free tiers.

When you need YouTube for work or study

Lists break down when the same site is both your homework and your distraction. A lecture and a video essay about a film look the same to a URL rule. You can't list every useful video in advance, and you can't list every distracting one either.

That's the problem AI Focus is built for. You write what you're working on, such as "organic chemistry lectures for Thursday's exam", and during the block it checks a downscaled screenshot of your screen at a random moment every 10 to 20 seconds. If two checks in a row find you off task, it saves your tabs, closes the YouTube tab and quits that browser for a short cooldown, then offers to restore your tabs. Shorts are judged like any other video: fine if they fit the goal, closed if they don't. Naming the kind of video you need in your goal helps it tell lessons from entertainment, and it isn't perfect at that. Screenshots pass through our server without being stored and go to an AI model provider under a zero-data-retention agreement. More on the YouTube distraction blocker page.

AI Focus doesn't block all of YouTube. If that's what you want, a normal block is simpler, and it's free. The first hour of AI Focus is free in the Mac app with no card, and the plans are on the pricing page. It's for people 18 and over.

How to make a YouTube block stick

  1. Cover every browser. A block in Safari does nothing if Chrome is one click away. Test each one.
  2. Cover every address. youtube.com, www.youtube.com, m.youtube.com and youtu.be are separate entries in Screen Time and the hosts file.
  3. Block the part that hurts, not the whole site. If you need tutorials, blocking only Shorts or the home feed is a rule you'll actually keep.
  4. Decide in advance. A schedule that starts on its own beats a block you have to remember to start.
  5. Add friction to undoing it. A delay, a long text to retype or a password someone else holds gives the urge time to pass. If focus is a daily fight, our ADHD guide goes further.

Frequently asked questions

Can you block YouTube on a Mac with Screen Time?+

Yes. Go to System Settings, Screen Time, Content & Privacy, App Store, Media, Web, & Games. Under Access to Web Content choose Limit Adult Websites, click Customize and add youtube.com, www.youtube.com and m.youtube.com to the Restricted list. Apple lists these settings under Safari, so test YouTube in every other browser you use.

How do I block YouTube Shorts but not YouTube on a Mac?+

Block the path youtube.com/shorts/ rather than the domain. In Safari, an extension such as Eat the Shorts does this. In Chrome, Edge or Firefox, Unhook can hide Shorts for free. A blocker app with URL rules, such as FocusDragon, can block youtube.com/shorts/ in every browser where its extension is installed. The hosts file can't do it, because it doesn't see paths.

Can I block YouTube but allow one channel?+

Not reliably. YouTube video addresses carry only a video ID, with nothing that ties them to a channel, so no URL rule can tell one channel's videos from another's. You can allow a channel's page, or a playlist, because playlist videos carry list= and the playlist ID in their address. Putting the videos you need in a playlist and allowing that playlist is the practical workaround.

How do I remove recommendations from YouTube on a Mac?+

Use an extension that edits the page. Unhook is free for Chrome, Edge and Firefox and hides the home feed, sidebar and end-screen suggestions. In Safari, Remove distractions on YouTube does something similar. Turning off your YouTube watch history has also been reported to empty the home feed.

How do I block YouTube on my Mac for free?+

Screen Time and the hosts file are both free and built in, but both take seconds to undo. FocusDragon's core blocker is free too, and its blocks keep running when you quit or delete the app. The locks that stop you switching a block off are in Pro, $19.99 once (October 2026), but you don't need Pro to block YouTube.

Further reading