How to Block YouTube on a Computer, Mac or Chromebook
If you've already blocked youtube.com once and your child was watching again by dinner, the block wasn't wrong - it was incomplete. YouTube serves video from a different domain than the one you typed, runs on a phone-shaped subdomain, and is embedded on half the web. This guide covers every way to block or limit YouTube on a child's computer - a Windows 11 PC, a laptop, a Mac, or a Chromebook - from free built-in methods to channel-level control, plus the full domain list and the bypasses each method leaves open.
Jump to your device with the picker, or read straight through.
The Problem with Blocking YouTube Entirely
Before we get into the how, let's talk about whether you should. Blocking YouTube completely is simple, but it creates problems. Your child needs YouTube for school projects. They want to watch the same videos their friends talk about. And a total block often leads to resentment and workarounds - a child who feels the rule is unfair will spend real effort defeating it, and they usually have more time than you do.
A better approach for most families: restrict YouTube to approved channels rather than blocking it outright. But if you've decided a full block is right for your situation, every method below is laid out with its real bypass risk so you can pick one that actually holds.
Which Blocking Method Should You Use?
Answer first: if you want a free block in five minutes and your child doesn't have the admin password, use the hosts file. If you want one block that covers every device in the house, use DNS filtering at the router. If you want YouTube available but curated - approved channels only - no free method can do that, and you need a parental control app.
| Method | Cost | Difficulty | Effectiveness | Bypass risk | Covers |
|---|---|---|---|---|---|
| Hosts file | Free | Medium | Good (all browsers, that PC) | High if child has admin | One computer |
| Router website blocking | Free | Medium | Moderate - misses HTTPS/DoH | Medium | Whole home network |
| DNS filtering (OpenDNS, CleanBrowsing, NextDNS) | Free tier | Medium | Very good | Medium - device DNS can be changed | Whole home network |
| Windows Family Safety | Free | Easy | Weak - Edge only | High | One Windows account |
| macOS Screen Time | Free | Easy | Good on that Mac | Medium | One Mac account |
| Google Family Link | Free | Easy | Very good on Chrome OS | Low | One Chromebook |
| Browser extension (BlockSite etc.) | Free | Easy | Weak - one browser | Very high | One browser |
| Parental control app (3Eyes and similar) | Paid | Easy | Very good, system-wide | Low | Per device, all browsers |
The pattern is consistent: the further down the stack you block - browser, then OS, then network - the harder the block is to defeat. A browser extension is defeated by opening a different browser. A hosts file is defeated by the admin password. A DNS block is defeated by changing DNS or switching to mobile data. Nothing blocks everything, so pick the level that matches how determined your child is.
The YouTube Domains You Actually Need to Block
Most guides tell you to block youtube.com and stop there. That leaves the mobile site, the short-link domain, and the API that the app and embeds use. Here's the practical list, ready to paste into a hosts file, a router block list, or a DNS filter's custom denylist:
youtube.com
www.youtube.com
m.youtube.com
music.youtube.com
tv.youtube.com
studio.youtube.com
youtu.be
youtube-nocookie.com
www.youtube-nocookie.com
youtubei.googleapis.com
i.ytimg.com
s.ytimg.com
ytimg.com
yt3.ggpht.com
googlevideo.com
A few notes on what these actually do. youtubei.googleapis.com is the internal API - block it and the YouTube apps and embedded players stop loading even when the main domain slips through. ytimg.com and yt3.ggpht.com serve thumbnails and avatars; blocking them doesn't stop playback on its own but makes embedded video visually useless. googlevideo.com is where the video bytes actually stream from, and it's the single most important one to include if your goal is stopping playback rather than stopping the website.
Two warnings. Hosts files do not support wildcards, so *.googlevideo.com will not work there - you need a DNS filter or router that accepts wildcard rules to catch the numbered rr1---sn-xxxx.googlevideo.com hostnames YouTube rotates through. And blocking googlevideo.com will also break video playback in some other Google products, so add it last and see whether you need it.
How to Block YouTube on Windows 10 and 11
Windows gives you two free routes: the hosts file, which works in every browser, and Microsoft Family Safety, which only works in Edge. The hosts file is the stronger one despite being more technical.
Hosts file method (all browsers)
- Right-click Notepad and choose Run as administrator. This step is not optional - without it the save will silently fail.
- Choose File > Open, set the file type filter to All Files, and open
C:\Windows\System32\drivers\etc\hosts - Add a line for each domain from the list above, prefixed with
127.0.0.1, for example:
127.0.0.1 youtube.com
127.0.0.1 www.youtube.com
127.0.0.1 m.youtube.com
127.0.0.1 youtu.be
127.0.0.1 youtubei.googleapis.com
127.0.0.1 www.youtube-nocookie.com
- Save the file (no
.txtextension - it must stay ashosts) - Open Command Prompt and run
ipconfig /flushdns - Test in a browser you have not used recently, and in an Incognito window
If it doesn't take effect, the usual culprit is Chrome's built-in secure DNS. Go to Chrome Settings > Privacy and security > Security and turn off Use secure DNS, which otherwise routes lookups around your machine's hosts file entirely. Do the same in Edge and Firefox if they're installed.
For the full walkthrough - including Linux, HP and Lenovo laptops, and how to undo it cleanly - see our dedicated hosts file guide.
Microsoft Family Safety
- Go to Settings > Accounts > Family and add your child's Microsoft account
- Visit family.microsoft.com and select your child
- Choose Content filters > Web and search
- Turn on Filter inappropriate websites and add youtube.com under Blocked sites
Be realistic about this one. Turning on web filtering blocks Chrome and Firefox from launching at all under that child account, which is how Microsoft enforces the Edge-only limitation. Families often find that too disruptive, turn it off, and are left with no block. It's free and easy, but it's the weakest option on Windows.
The single most important Windows step, whichever method you pick: make your child's account a Standard user, not an Administrator. Every Windows block on this page can be undone in under a minute by a user with admin rights.
How to Block YouTube on a Mac
macOS has the better free built-in option. Screen Time's content restrictions apply at the system level and follow the child's account, not the browser - though Safari gets the tightest enforcement.
Screen Time (recommended free method on macOS)
- Open System Settings > Screen Time and select your child's account from the family picker at the top
- Turn on Screen Time if it isn't already, then open Content & Privacy
- Switch on Content & Privacy and open Store, Web, Siri & Game Center Content
- Set Access to Web Content to Limit Adult Websites, then click Customize
- Under Restricted, add
https://www.youtube.comandhttps://m.youtube.com - Back in Screen Time, click Lock Screen Time Settings and set a passcode that isn't your login password
Alternatively, choose Allowed Websites Only instead of Limit Adult Websites. That flips it into an allowlist - only the sites you name will load. It's aggressive, but for a younger child it's dramatically more durable than a blocklist, because it fails closed on anything you didn't think of.
Hosts file on Mac
- Open Terminal (Applications > Utilities)
- Run
sudo nano /etc/hostsand enter your password - Add the same
127.0.0.1lines shown in the Windows section - Press Control+O then Return to save, Control+X to exit
- Run
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Same caveat as Windows: this only holds if your child's macOS account is a Standard account without admin rights. Check under System Settings > Users & Groups.
How to Block YouTube on a Chromebook
Chrome OS is the odd one out. There's no hosts file you can edit, no third-party filtering software in the normal sense, and the whole device is built around a single Google account. That sounds restrictive, but it's actually good news - the built-in control is the strongest of the three platforms, because a child can't install their way around it.
Google Family Link
- Install Family Link on your phone and add your child's Google account to your family group
- Make sure that same account is the one signed in on the Chromebook
- In Family Link, select your child, then Controls > Content restrictions > Google Chrome
- Choose Try to block explicit sites (blocklist mode) or Only allow approved sites (allowlist mode)
- Tap Manage sites > Blocked and add
youtube.com,m.youtube.comandyoutu.be - Back under Controls, open Apps and block or set a zero time limit on the YouTube Android app if the Play Store is enabled
Two Chromebook-specific gotchas. First, blocking the website does nothing about the YouTube Android app, which many Chromebooks can install from the Play Store - you have to block that separately in step 6. Second, Guest browsing and any secondary Google account added to the device sidestep Family Link entirely. In Family Link's Chromebook settings, disable Guest mode and restrict sign-in to your child's account only. Without those two toggles the rest of the setup is decorative.
If you want approved-channel viewing rather than a hard block, that needs channel-level control rather than a domain block - see 3Eyes features.
How to Block YouTube on a Laptop (Any Brand)
There is no HP method, Dell method or Lenovo method. A laptop runs Windows, macOS or Chrome OS, and the block happens at the operating system or network level, so use the section above that matches the OS. The brand only matters for the model name on the lid.
What is genuinely different about a laptop is that it leaves the house. Every network-level method - router blocking, DNS filtering, OpenDNS - stops working the moment your child connects to school Wi-Fi, a friend's Wi-Fi, or a phone hotspot. If the device is portable, the block has to live on the device: the hosts file, Screen Time, Family Link, or an installed parental control app. Network filtering is a good second layer for a laptop, never the only layer. See temporary vs permanent blocking on a laptop for choosing between a scheduled block and a standing one.
Router and DNS-Level Blocking (Whole House)
Blocking at the router covers every device on your Wi-Fi at once, including games consoles and tablets you'd otherwise have to configure individually.
Router blocking: log in at 192.168.1.1 or 192.168.0.1, find Parental Controls, Access Restrictions or Website Blocking, and add the domains from the list above. Effectiveness varies enormously by router - many consumer routers only match unencrypted requests and quietly fail against HTTPS.
DNS filtering is the more reliable version of the same idea. Create a free account with OpenDNS Home, CleanBrowsing or NextDNS, point your router's DNS servers at theirs, and add YouTube to the block list in their dashboard. NextDNS and CleanBrowsing also offer a "force SafeSearch and YouTube Restricted Mode" toggle, which is a useful middle setting if you don't want a hard block.
Both approaches share two weaknesses. They block YouTube for the adults in the house as well as the kids, and they stop applying the moment a device leaves your network. They also don't survive a child manually setting their laptop's DNS to 8.8.8.8 - so if you rely on DNS, make sure your child's account can't change network settings.
Blocking YouTube Entirely vs Allowing Specific Channels
Every method above is all-or-nothing. YouTube is either fully blocked or fully open. That's a poor match for how most families actually feel about it, because the objection is rarely YouTube itself - it's the recommendation feed, the autoplay chain, and the comment section.
Channel-level control is the alternative. Instead of blocking the site, you approve specific channels and your child can only watch those: the science channels you've reviewed, the animation they love, whatever their teacher assigned. No recommendations, no related-video sidebar, no rabbit hole at 11pm.
3Eyes works this way - it's an allowlist-first parental control app for Windows, Mac and Chrome OS. YouTube is blocked system-wide by default across every browser, and you add approved channels from the parent dashboard; your child browses and searches within those channels through a built-in video page.
Which one you want depends on the child. For a young child, or one who's genuinely struggling to stop, a hard block is cleaner and easier to explain. For a tween who uses YouTube for homework and hobbies, an allowlist keeps the useful part and removes the part that eats evenings - and it tends to produce far less conflict, because the answer isn't "no", it's "these".
How Kids Bypass YouTube Blocks
Assume the block will be tested. Here's what actually gets tried, roughly in order of how common it is, and what closes each door.
| Bypass | Why it works | What to do |
|---|---|---|
| Different browser | Extension and Family Safety blocks are per-browser | Block at the OS or network level instead |
| Phone hotspot / mobile data | Bypasses your router and DNS entirely | Use an on-device block; manage the phone separately |
| VPN or proxy app | Tunnels around DNS and router filtering | Remove admin rights; block VPN app installs; some filters block known VPN domains |
| DNS-over-HTTPS in the browser | Chrome and Firefox resolve names themselves, ignoring hosts file and router DNS | Turn off "Use secure DNS" in each browser; block DoH resolvers at the router |
| Editing the hosts file back | Trivial with admin rights | Make the child's account a Standard user |
| Embedded YouTube on other sites | The video plays on Reddit, Discord or a games site, not on youtube.com | Block youtubei.googleapis.com and googlevideo.com too |
| Alternate front-ends (Invidious, Piped and similar) | Third-party sites that stream YouTube from other domains | Allowlist mode rather than blocklist mode; these are endless to chase individually |
| Guest mode / second account | Sign-in-based controls don't apply | Disable Guest mode; restrict sign-in to the managed account |
The through-line: blocklists lose an arms race, allowlists don't. Every bypass in that table except the hotspot is defeated by switching from "block these sites" to "only allow these sites". That's why macOS Screen Time's Allowed Websites Only, Family Link's approved-sites mode, and channel-level control all hold up better than a domain list you keep adding to.
Are YouTube Kids and Supervised Accounts Enough?
An honest assessment: they help, and they are not a block.
YouTube Kids is a separate app and site with its own curated, age-filtered content, and for a child under about eight it's a reasonable place to point them. But it's a replacement destination, not a restriction - installing it does nothing to stop the main site, and its filtering is largely algorithmic, so unsuitable videos do surface. You can set it to "Approve content yourself" for a hand-picked, allowlist-style experience, which is much tighter but requires ongoing work from you.
Supervised accounts (linking your child's Google account to yours via Family Link) let you pick one of three content settings on the main YouTube: Explore, Explore More, or Most of YouTube. These are broad age bands applied by algorithm, not a filter you control, and the mildest one still includes an enormous amount of content. They also disable comments and some monetised features, which is genuinely worthwhile.
Restricted Mode is the weakest of the three - it's a per-browser, per-profile toggle at the bottom of the YouTube page that any child can switch off in two clicks unless you lock it via DNS-forced SafeSearch or Family Link.
Use these to shape what your child sees on YouTube. Don't use them as the answer to whether your child can get to YouTube - that needs one of the methods above.
Related guides
- By device: this guide covers Windows, Mac, Chromebook and laptops in their own sections above.
- Free method, in depth: How to block YouTube using the hosts file
- Block it on a schedule: Temporarily or permanently block YouTube on a laptop
- The behaviour side: How to stop kids watching YouTube all day and what to do when a child is addicted to YouTube
If you'd rather not maintain a domain list yourself, 3Eyes blocks YouTube across every browser and lets you approve individual channels - 14-day free trial.
Frequently asked questions
How do I block YouTube on Windows 10 or Windows 11? Edit the hosts file at C:\Windows\System32\drivers\etc\hosts using Notepad run as administrator, add the YouTube domains pointed at 127.0.0.1, then run ipconfig /flushdns. It blocks every browser on that PC. The steps are identical on Windows 10 and 11.
How do I block YouTube on a Mac? Use Screen Time: System Settings > Screen Time > Content & Privacy > Store, Web, Siri & Game Center Content, set Access to Web Content to Limit Adult Websites, and add youtube.com under Restricted. Then lock Screen Time with a passcode.
How do I block YouTube on a Chromebook? Use Google Family Link - Controls > Content restrictions > Google Chrome > Manage sites > Blocked. Chrome OS has no editable hosts file. Also block the YouTube Android app and disable Guest mode, or both are trivially bypassed.
How do I block YouTube on a laptop? Use the method for its operating system - the brand (HP, Dell, Lenovo) makes no difference. Because a laptop leaves your home network, block on the device itself rather than relying only on router or DNS filtering.
Can I block YouTube but still allow some channels? Not with the free methods - they're all-or-nothing at the domain level. Allowing specific channels while blocking the open feed needs channel-level control such as 3Eyes.
Why does YouTube still load after I blocked it? Usually the browser's secure DNS (DNS-over-HTTPS) is bypassing your hosts file or router - turn off "Use secure DNS" in Chrome, Edge and Firefox. Otherwise you've missed a domain: add m.youtube.com, youtu.be and youtubei.googleapis.com.
Will blocking YouTube on the computer stop it on phones? No. Every method here is per-device or per-network. A phone on cellular data is unaffected unless you manage it separately with iOS Screen Time or Family Link.