How to Block YouTube on Computer, iPhone, iPad and Android
Block the site and the app on every device, or keep YouTube and hide the distractions · Updated
Yes, you can block YouTube on any device. On a PC the fastest free method is the hosts file, which blocks YouTube in every browser. On an iPhone, iPad or Mac use Screen Time, and on Android use Digital Wellbeing or Family Link.
Quick steps: block YouTube in every browser on a PC
- 1.Open Notepad as administrator.
- 2.Open
C:\Windows\System32\drivers\etc\hostswith the file type set to All Files. - 3.Add
0.0.0.0 youtube.comand0.0.0.0 www.youtube.comon separate lines. - 4.Save the file and run
ipconfig /flushdnsin Command Prompt.

Key takeaways
- Hosts file: blocks YouTube in every browser on a PC, as long as you add every YouTube domain, not only youtube.com.
- iPhone and iPad: Screen Time blocks youtube.com in Safari and can block or limit the YouTube app.
- Android: Digital Wellbeing sets a daily timer on the YouTube app and on youtube.com in Chrome.
- Keep YouTube without the distractions: hide Shorts, the home feed and recommendations with an extension or by turning off watch history.
- Every built-in method can be removed by whoever knows the password or passcode.
Methods compared
Built-in tools block YouTube for free on every device, and only a website blocker is difficult to bypass.
| Method | Device | Blocks the YouTube app | Cost | Difficulty to bypass |
|---|---|---|---|---|
| Hosts file | Computer | Not applicable | Free | Easy (edit the file) |
| Browser policy (Chrome or Edge) | Computer | Not applicable | Free | Easy (delete the registry value) |
| Browser extension | Computer | Not applicable | Free or paid | Easy (remove in one click) |
| Screen Time | Mac, iPhone, iPad | Yes | Free | Easy for you (you know the passcode) |
| Digital Wellbeing or Family Link | Android | Yes | Free | Easy for you, difficult for a child |
| Router or DNS filter | Every device on your Wi-Fi | Depends on the router | Free | Needs the router password |
| Website blocker | Computer | Not applicable | Free or paid | Difficult |
1. Block YouTube on a PC with the hosts file
The hosts file stops YouTube from loading in Chrome, Edge, Firefox and every other browser on the PC. The steps are the same on a desktop or laptop.
- 1.Press Windows + S and type
notepad. Do not press Enter. - 2.Right click Notepad, select Run as administrator, then select Yes. You can only save the hosts file from Notepad opened this way.
- 3.Press Ctrl + O, or select File > Open.
- 4.Go to
C:\Windows\System32\drivers\etc. The folder looks empty at first, because Notepad only shows text files. - 5.In the drop down menu at the bottom right, change Text Documents to All Files, then select
hostsand Open. - 6.Add these lines at the bottom:
0.0.0.0 youtube.com 0.0.0.0 www.youtube.com 0.0.0.0 m.youtube.com 0.0.0.0 youtu.be 0.0.0.0 www.youtube-nocookie.com
- 7.Press Ctrl + S to save. If you see an access denied message, Notepad was not opened as administrator.
- 8.Open Command Prompt, run
ipconfig /flushdns, or restart the PC. Until then, a browser that opened YouTube recently can still load it.
m.youtube.com is the mobile site, youtu.be is the short link domain, and www.youtube-nocookie.com serves videos embedded on other websites. Blocking only youtube.com leaves these open.
Limits: anyone with administrator access can delete the lines. Full steps for other sites are in how to block websites on a PC.
2. Block YouTube on Chrome or Edge with the URLBlocklist policy
Chrome and Edge read a URLBlocklist policy from the registry. An entry of youtube.com blocks the site and all of its subdomains, with no extension.
- 1.Press Windows + R, type
regeditand press Enter. - 2.For Chrome, create
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\URLBlocklist. For Edge, createHKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\URLBlocklist. - 3.Inside it, create a String Value named
1with the valueyoutube.com, then2withyoutu.beand3withyoutube-nocookie.com. - 4.Restart the browser and open
chrome://policyoredge://policyto confirm the list is active.
Limits: each browser needs its own entry, Firefox ignores it, and an administrator can delete the values. More Chrome options are in how to block websites on Chrome.
3. Use a browser extension
Extensions such as BlockSite and LeechBlock NG block YouTube inside one browser.
- 1.Add the extension from the Chrome Web Store (Chrome, Edge, Brave) or Firefox Add-ons.
- 2.Add
youtube.comto its block list. - 3.Turn on Allow in Incognito (Chrome), Allow in InPrivate (Edge) or Run in Private Windows (Firefox) in the extension's settings.
Limits: one browser only, and it can be removed in one click.
4. Block YouTube on a Mac with Screen Time
Screen Time on a Mac can block youtube.com outright or block it after a daily limit. These steps are for macOS 26.
Block YouTube completely
- 1.Open System Settings and click Screen Time.
- 2.Click Content & Privacy, turn it on, then click App Store, Media, Web, & Games.
- 3.Set web content to Limit Adult Websites and click Customize.
- 4.Add
youtube.comto the Restricted list and click Done.
Set a daily limit
- 1.In Screen Time, click App Limits, turn it on, and click Add Limit.
- 2.Open the Websites category and add
youtube.com. - 3.Enter a time, select Block at end of limit, and click Done.
Set a Screen Time passcode so the settings cannot be changed without it. The hosts file also works on a Mac at /etc/hosts, with the same YouTube lines as method 1.
Limits: Apple lists the web content setting under Safari, so check that YouTube is also blocked in any other browser on the Mac. If you set it for yourself, you know the passcode. More Mac options are in how to block porn on a Mac.
5. Block YouTube on iPhone and iPad with Screen Time
The steps are the same on an iPhone and an iPad. Block both the website and the app, or YouTube stays open in one of them.
Block youtube.com in Safari (iOS 26 and iPadOS 26)
- 1.Open Settings, tap Screen Time, then Content & Privacy Restrictions, and turn it on.
- 2.Tap App Store, Media, Web, & Games, then Web Content.
- 3.Select Limit Adult Websites, tap Add Website under Never Allow, and enter
youtube.com.
Block or limit the YouTube app (iOS 26)
- To hide the app: the YouTube app is rated 13+ in the App Store. In Content & Privacy Restrictions > App Store, Media, Web, & Games > Apps, choose a lower rating such as 9+.
- To limit it: tap Screen Time > App Limits > Add Limit, select YouTube, set a time and turn on Block at End of Limit.
- To stop it being reinstalled: in Content & Privacy Restrictions > iTunes & App Store Purchases, set Installing Apps to Don't Allow.
On a child's iPhone or iPad with iOS 27
- 1.Open Settings, tap Family, then your child's name.
- 2.Tap Apps & Websites and enter your Screen Time passcode.
- 3.Select YouTube or youtube.com, tap Block App or Block Website, and confirm.
iOS 27 replaces App Limits with Time Allowances, which limit app categories and include an app's own website.
Limits: a Screen Time block you set for yourself can be removed with your own passcode.
6. Block YouTube on Android
For yourself, with Digital Wellbeing
- 1.Open Settings and tap Digital Wellbeing, then App timers.
- 2.Tap Set timer next to YouTube and choose a time. When it runs out, the app closes and its icon dims until midnight.
- 3.To limit youtube.com in Chrome, tap the Digital Wellbeing chart, then Chrome, then Set site timer next to youtube.com.
Google notes that you can set an App limits PIN and a timer of zero to block an app for other users of the device. Menu names vary by phone maker.
For a child, with Family Link
- 1.Open the Family Link app and select your child.
- 2.Tap Screen time, then Time limits, then App limits.
- 3.Select YouTube and switch it to Blocked, or tap Set limit for a daily time.
To block youtube.com as well, add it to the child's blocked sites in Chrome through Family Link.
Limits: Digital Wellbeing timers can be deleted by the person who set them. Family Link only applies to a supervised child account, and on a computer the child can switch to another Chrome profile.
7. Block YouTube on your router or with a DNS filter
A router filter blocks YouTube for every device on your Wi-Fi, including phones, tablets, consoles and smart TVs.
- 1.Open the router's admin page, usually
192.168.1.1or192.168.0.1, and sign in. - 2.Find Parental controls, Access restrictions or the website filter. The menu differs by brand.
- 3.Add
youtube.com,youtu.beand the other domains from method 1, then save. - 4.Check on a phone that both the YouTube app and the website are blocked. Some routers only block the website.
A DNS filter such as CleanBrowsing or Cloudflare for Families blocks content categories rather than a single site you choose.
Limits: anyone with the router password can remove it, and a phone on mobile data or a VPN is not covered.
8. Keep YouTube but remove Shorts, the home feed and recommendations
Many people want YouTube for search, tutorials and subscriptions, without the parts that take up the most time.
- Hide Shorts: the YouTube app has a Shorts feed limit, and on a computer an extension removes Shorts. All the options are in how to block YouTube Shorts.
- Remove home page recommendations: turn off watch history in your Google Account under My Activity > YouTube History > Controls. YouTube removes home page recommendations when you have no relevant recent watch history.
- Hide recommendations, comments and the sidebar: the Unhook extension (1,000,000 Chrome Web Store users) hides the parts of YouTube you choose in Chrome and Edge.
- Get a reminder to stop: in the YouTube app, tap your profile picture, then Settings > General > Remind me to take a break. The reminder pauses the video, and you can dismiss it.
- Set a daily time limit: use App Limits or Time Allowances on Apple devices, App timers on Android, or an extension or website blocker on a computer.
Limits: extensions and YouTube settings can be switched back on in a moment.
9. Filter YouTube instead of blocking it
If you want to keep YouTube for a child but hide mature videos, filter it instead of blocking it.
- Restricted Mode: hides videos that may be mature. On a computer, select your profile picture on youtube.com, then Restricted Mode, and turn on Activate Restricted Mode. It applies only to that browser, so turn it on in each browser and on each device.
- YouTube Kids: a separate app and website (youtubekids.com) for children, where a parent chooses an age level or approves each channel and video.
- Family Link: a supervised Google account lets a parent choose what the child can watch on YouTube.
Limits: anyone using the browser can turn Restricted Mode off unless a school or network enforces it, and no filter catches every video.
10. Use a website blocker
If you want to block YouTube with strong enforcement, the best alternative is a hard-to-bypass blocker that can't be removed or edited easily, such as Ascension.
Price: 15-day free trial, then $12.99/month or $50 one-time.
- 1.Install Ascension and add its extension to your browser. A browser running without the extension is closed to ensure blocks are not bypassed.
- 2.Block
youtube.com, or only a section such asyoutube.com/shorts. - 3.Choose Always blocked, a Scheduled block, an Entry delay, or a daily Time limit on the whole of youtube.com.
- 4.To keep YouTube, turn on the extension's YouTube settings: hide Shorts, the home feed, comments or suggested videos.
- 5.Add a lock to the block so it can't be edited or removed easily. How Ascension's uninstall protection works →
Limits: Windows only (iOS and Mac in development).
Which method should you use?
If you want to block YouTube on a PC for free in every browser, choose the hosts file. If you want to block YouTube in Chrome or Edge only, choose the URLBlocklist policy or an extension. If you want to block YouTube on an iPhone, iPad or Mac, choose Screen Time, and block both the website and the app. If you want to block YouTube on Android, choose Digital Wellbeing for yourself or Family Link for a child. If you want to keep YouTube but lose Shorts and recommendations, choose an extension such as Unhook. If you want to block YouTube with strong enforcement, choose a hard-to-bypass blocker such as Ascension or Cold Turkey Blocker.
Frequently asked questions
Can you block YouTube?
Yes. Every computer, phone and tablet has a built-in way to block YouTube: the hosts file on a PC, Screen Time on Apple devices, and Digital Wellbeing or Family Link on Android. Your router can block it for every device on your Wi-Fi.
How do I block YouTube on my computer?
On a PC, add youtube.com, www.youtube.com, m.youtube.com, youtu.be and www.youtube-nocookie.com to the hosts file, pointing each to 0.0.0.0, then run ipconfig /flushdns. On a Mac, add youtube.com to the Restricted list in Screen Time.
How can I block YouTube on my iPad?
Open Settings, then Screen Time, then Content & Privacy Restrictions, and add youtube.com under Never Allow in Web Content. Then block the YouTube app by setting the app rating below 13+ or with an app limit.
How do I block YouTube on Chrome?
Add youtube.com to Chrome's URLBlocklist policy in the registry, or install an extension such as BlockSite or LeechBlock NG. The hosts file also blocks YouTube in Chrome and every other browser.
How do I block YouTube on a laptop?
A laptop uses the same steps as a desktop: the hosts file or a browser policy on a PC, and Screen Time on a MacBook.
How do I block YouTube on a school Chromebook?
A school Chromebook is managed by the school, so you cannot change its settings. Block YouTube on your home router so it covers the Chromebook on your Wi-Fi, or ask the school's IT team whether YouTube can be restricted on the device.
Can I block YouTube but keep YouTube Music or YouTube Kids?
Yes, on a phone. YouTube Music and YouTube Kids are separate apps, so you can block the YouTube app and leave them allowed. On a computer, the hosts file lines in method 1 leave music.youtube.com open, while a youtube.com entry in the Chrome or Edge policy blocks it too.
Can I block YouTube only at certain times?
Not with the hosts file or browser policy. Screen Time schedules, Family Link, browser extensions and website blockers can block YouTube during set hours.
How do I stop myself from unblocking YouTube?
Built-in tools can be removed by whoever set them. For a block that can't be removed or edited easily, use a hard-to-bypass blocker such as Ascension.
Available on Windows 10 & 11