Download Article
Learn the easiest ways to completely block YouTube on any browser, computer, phone, and tablet
Download Article

Do you want to prevent your child, students, or even yourself from accessing YouTube? There are many ways to block YouTube, and they're all pretty easy to do. If you're using an Apple device like an iPhone, iPad, or Mac, you can block YouTube completely on all browsers using Screen Time. On Windows, you can edit a text file that blocks YouTube in Chrome, Edge, and any other browser. On an Android, you can block YouTube using the free apps BlockSite and Norton App Lock. This How.com.vn article will teach you the easiest ways to block YouTube.com and the YouTube mobile app on any platform.

Things You Should Know

  • The easiest way to block YouTube on all PC web browsers is to add YouTube to your Windows hosts file.
  • Use Content Restrictions in Screen Time to block YouTube and any other app or site on iPhone, iPad, and Mac.
  • If you're using BlockSite on Android, anyone can get around your YouTube restrictions unless you lock the app with Norton App Lock.
Method 1
Method 1 of 4:

On Windows

Download Article
  1. How.com.vn English: Step 1 Open Notepad as an administrator.
    The most effective way to block YouTube completely in all web browsers is to add a few lines to a text file called "hosts," which you can edit in Notepad. Because the hosts file is protected, you'll have to open Notepad in a special way to edit the file: Here's how:
    • Press Windows key + S to activate the search bar.
    • Type notepad, but don't click any search results.
    • Right-click "Notepad" and select Run as administrator.
    • Click Yes to open the app.
  2. How.com.vn English: Step 2 Press Ctrl+O to open a file.
    You can also get to the Open window by clicking File > Open.
    Advertisement
  3. How.com.vn English: Step 3 Navigate to the folder that contains your hosts file.
    If Windows is installed on your C drive, navigate to C:\Windows\System32\drivers\etc. If your Windows installation has a different drive letter, replace C with the correct letter.
    • Don't be alarmed if the folder appears empty, as the files are hidden right now.
  4. How.com.vn English: Step 4 Click the drop-down menu at the bottom-right and choose All Files.
    This displays all of the files in the "\etc" folder.
  5. Step 5 Select the file called "hosts" and click Open.
    This opens the hosts file for editing.
  6. How.com.vn English: Step 6 Add a new line at the bottom of the file to block youtube.com.
    After the last line in the file, press Enter to create a new line. Then, follow these steps:
    • Type 127.0.0.1 and press the Tab key to insert some space.
    • Type youtube.com
    • Press Enter to go to the next line.
  7. How.com.vn English: Step 7 Add another new line to block www.youtube.com.
    You'll do this the same way you did when blocking youtube.com:
    • On the first empty line, type 127.0.0.1 and press the Tab key to insert some space.
    • Type www.youtube.com
    • Press Enter.
  8. How.com.vn English: Step 8 Add another line to block m.youtube.com.
    This is YouTube's mobile address, so you'll want to block this as well.
    • On the first empty line, type 127.0.0.1 and press the Tab key to insert some space.
    • Type m.youtube.com
  9. Step 9 Save your "hosts" file.
    Now you can simply press Ctrl + S to save, or click File > Save.
  10. How.com.vn English: Step 10 Flush your DNS cache so the changes will take effect.
    Until you do this, you'll still be able to access YouTube through any web browsers you've used the site in recently. The easiest way to do this is to restart your computer. If you don't want to restart right now, you can also flush your DNS cache by running a simple command:
    • Press Windows key + S to activate the search bar.
    • Type cmd.
    • Right-click Command Prompt and select Run as administrator.
    • Type ipconfig /flushdns and press Enter.
  11. Advertisement
Method 2
Method 2 of 4:

On a Mac

Download Article
  1. How.com.vn English: Step 1 Go to System Settings.
    To block YouTube in all browsers on a Mac, you can restrict the site in your Screen Time settings. To get to System Settings, click the Apple menu icon in the top left corner of your screen and select System Settings.
  2. How.com.vn English: Step 2 Click Screen Time.
    You should see this in the menu on the left side of the window next to an hourglass icon on a purple background.
    • If you're using Family Sharing, click the family member that you'd like to block from seeing YouTube.
  3. How.com.vn English: Step 3 Click Content & Privacy.
    You'll see this in the menu on the left side of the screen.
  4. How.com.vn English: Step 4 Click Content Restrictions.
    This will give you more options.
  5. How.com.vn English: Step 5 Select Limit Adult Websites.
    YouTube isn't considered an "adult website," but you'll be preventing it in the next step.
  6. How.com.vn English: Step 6 Click Customize.
    You'll see this under the "Web Content" selections.
  7. Step 7 Click + under the "Restricted" section.
    Doing this will let you select YouTube as a restricted site.
  8. Step 8 Enter "youtube.com" and click OK.
    Doing this will prevent YouTube from opening in any web browser on your Mac.[1]
  9. Advertisement
Method 3
Method 3 of 4:

On iPhone & iPad

Download Article
  1. How.com.vn English: Step 1 Open your iPhone or iPad's icon Settings.
    There are a few different ways you can block YouTube on your iPhone, but using Screen Time is the most straightforward way that blocks the YouTube app and YouTube in your iPhone's web browsers. Tap the Settings app icon, which is a grey box with gears on it.
  2. How.com.vn English: Step 2 Tap Screen Time.
    It's the purple icon with an hourglass in the second group of settings.
    • If Screen Time is not enabled, tap Turn on Screen Time to enable it now. Then, complete the setup process to activate Screen Time.
  3. How.com.vn English: Step 3 Tap Content & Privacy Restrictions.
    It's at the bottom of the list.
    • Enter your PIN if prompted.
  4. How.com.vn English: Step 4 Enable Content & Privacy Restrictions if disabled.
    If the switch at the top of the menu is gray, tap it to enable the feature.
  5. How.com.vn English: Step 5 Tap Content Restrictions.
    It's in the first group of settings.
  6. How.com.vn English: Step 6 Block the YouTube mobile app for a child (optional).
    If you want to prevent a child from opening or downloading the YouTube app (or any other apps that require the user to be of a certain age) on this iPhone or iPad, you can block the app easily:
    • Tap Apps in the list.
    • Select 12+ (or younger) as the age. Since YouTube has an age suggestion of 17+, it won't be possible for your child to open the app if they're under age. The app won't even appear on their screens.
    • To undo this restriction in the future, return to this menu and select Allow all apps.[2]
    • Tap the Back button when you're finished. You've blocked the YouTube app, but what about YouTube in a web browser? Let's fix that.
  7. How.com.vn English: Step 7 Tap Web Content.
    It's under the "Web Content" header a bit further down the page.
  8. How.com.vn English: Step 8 Tap Limit Adult Websites.
    YouTube isn't considered an adult website, but turning this feature on allows you to add block YouTube's URL.
  9. Step 9 Tap Add Website under "Never Allow."
    Make sure you are tapping the option under "Never Allow," and not "Always Allow."
  10. How.com.vn English: Step 10 Add all of YouTube's URLs to your block list.
    Here's how:
    • Type youtube.com and press done}}. Now you'll see youtube.com in your "Never Allow" list.
    • Tap Add Website under "Never Allow" again.
    • Type m.youtube.com and tap done.
    • Tap Add Website again, type www.youtube.com, and then tap done.
  11. Advertisement
Method 4
Method 4 of 4:

On Android

Download Article
  1. How.com.vn English: Step 1 Install BlockSite and Norton App Lock.
    To block both the YouTube website and the YouTube app on your Android, you will need to download two apps: BlockSite, which blocks YouTube, and an app called Norton App Lock, which can password-protect BlockSite to prevent anyone from undoing the block.
    • Both Norton App Lock and BlockSite are available for free from the Play Store.
    • Also, if you deleted the YouTube app, you'll need to reinstall it for now so you can block it. You can always remove it later.
  2. How.com.vn English: Step 2 Open BlockSite.
    Press the Home button to close the Play Store, then tap the BlockSite app icon, which is an orange shield with a white cancel sign on it.
  3. How.com.vn English: Step 3 Enable BlockSite in your Android's Accessibility settings when prompted.
    For BlockSite to be able to access your apps, it will need certain permissions. When prompted, follow the on-screen instructions to allow the app to control your apps.
  4. How.com.vn English: Step 4 Tap + in BlockSite.
    It's in the bottom-right corner of the screen.
  5. How.com.vn English: Step 5 Enter YouTube's address.
    In the text box at the top of the page, type in youtube.com to indicate that you want to prevent your Android's built-in browsers from accessing YouTube.
    • Unlike many content blockers, you don't have to block the mobile version of YouTube's website ("m.youtube.com") as well.
  6. How.com.vn English: Step 6 Tap icon.
    It's in the top-right corner of the screen. This will block YouTube in your Android's Chrome browser and any other built-in browsing app(s).
    • If you have any third-party browsing apps installed (e.g., Firefox), you'll need to lock them with Norton App Lock to prevent your child from accessing YouTube in them since BlockSite doesn't cover these apps.
  7. How.com.vn English: Step 7 Tap + again.
    This is in the bottom-right corner of the screen.
  8. How.com.vn English: Step 8 Tap the APP tab.
    It's at the top of the screen. A list of apps will open.
  9. How.com.vn English: Step 9 Scroll down and tap YouTube.
    It's in the list of apps. Doing so adds the YouTube app to the list of blocked apps on your Android.
  10. How.com.vn English: Step 10 Open Norton App Lock.
    Press the Home button, then tap the Norton Lock app icon which is a yellow-and-white circle with black icons in it.
  11. How.com.vn English: Step 11 Follow the on-screen instructions to give Norton App Lock the right permissions.
    Like BlockSite, you'll need to grant access to Norton Lock. Tap Setup, then follow the on-screen instructions to enable access for the app.
  12. How.com.vn English: Step 12 Create an unlock code and tap Continue.
    When the Norton Lock app re-opens, draw a pattern, then repeat the pattern when asked. This is the code you'll use to unlock any apps you lock later.
    • If you want to use a passcode instead of a pattern, tap SWITCH TO PASSCODE and enter twice your preferred passcode instead.
  13. How.com.vn English: Step 13 Lock the apps you don't want your child to modify.
    Scroll down and tap each of the following apps to prevent them from being accessed without your passcode:
    • BlockSite
    • Play Store
    • Any web browser not covered by BlockSite (e.g., any non-Chrome or stock browser such as Firefox or UC Browser).
    • Norton Lock will also lock Settings and the Norton Lock app by default. As long as the Play Store is also locked, this will make it impossible to access YouTube without the code.
  14. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I unblock YouTube from a single computer?
    How.com.vn English: Community Answer
    Community Answer
    Go to the admin account and select the PC name you want to unblock. You'll see an option to unblock the site there.
  • Question
    Which software can I use to block YouTube?
    How.com.vn English: Community Answer
    Community Answer
    The application SelfControl gives you the option to block certain websites of your choosing for a certain amount of time.There's no way to go around the limitations until the time runs out even if you turn off and reboot your computer.
  • Question
    When I save, why does Windows say I don't have permission?
    How.com.vn English: Community Answer
    Community Answer
    You need to make sure you run notepad in administrator mode (try right clicking then going to edit with notepad).
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • You can also block YouTube via the BlockSite extension in Google Chrome and Firefox if needed. This will not block YouTube in browsers such as Safari, Edge, or Internet Explorer.
      • If using IOS method, Set a Screen Time Pin in Settings so your child needs the password (which you won’t share) to click Allow.
      • You can also set a 1 minute time limit as well to block the IOS app
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • No blocking method will be 100% effective, especially if your child is tech-savvy. Make sure to take the time to educate your child on what is and is not allowed.
      Advertisement

      About This Article

      How.com.vn English: Darlene Antonelli, MA
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for How.com.vn. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 1,232,825 times.
      How helpful is this?
      Co-authors: 24
      Updated: May 11, 2024
      Views: 1,232,825
      Thanks to all authors for creating a page that has been read 1,232,825 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement