Block YouTube

YouTube’s library of videos includes those that may be inappropriate for kids. If you want to control your family’s Internet usage by blocking YouTube, you can block a portion or all the videos on your computer or device.

Steps

Using YouTube Restricted Mode

  1. Visit the YouTube site on your main web browser. You can enable Safety Mode in YouTube, which will only allow access to all-ages videos. This is the best option if you want to be able to access YouTube yourself, and still want your children to be able to access useful and safe videos.[1]
    • If you want to block YouTube completely for everyone, see the next section.
    • The Restricted Mode filter is based on community flagging, and as such is not 100% perfect.[2]
  2. Log in with your own Google account. Make sure that you log into YouTube with a Google account that you child does not have access to. This will ensure that they are not able to turn Restricted Mode off on their own.
  3. Scroll down to the bottom of the page. You'll find the "Restricted Mode" menu here.
  4. Click the "Restricted Mode" menu. You'll see the options appear beneath the menu.
  5. Click "On" and then "Lock Restricted Mode." You'll be prompted to enter your Google account password again.
  6. Click "Save." This will lock Restricted Mode on for the browser.
  7. Repeat for any other browsers on your computer. Restricted Mode only applies to the browser that you enabled it on, so you'll need to enable it on every browser that you have installed. The process is the same regardless of the browser.[3]
  8. Disable Incognito or Private browsing on all of your browsers. Most browsers allow you to enter an "incognito" mode that doesn't track browsing history. This mode will also bypass Restricted Mode in YouTube. You'll need to disable the incognito or private browsing option for each of your browsers.
  9. Turn on Restricted mode in any YouTube apps. If you have any devices with the YouTube app installed, you'll need to enable Restricted Mode on the app as well.
    • Open the YouTube app.
    • Tap the Menu button and select "Settings."
    • Select "General" and then check the "Restricted mode" box (Android), or tap "Restricted Mode Filtering" and select "Strict" (iOS).
  10. Turn Restricted mode on for mobile browsers. Mobile browsers on your smartphones and tablets have a Restricted mode as well.
    • Open your mobile browser and visit the YouTube website.
    • Tap the menu button in the upper-right corner and select "Settings."
    • Toggle "Restricted Mode" on.

Blocking YouTube on a Single Computer

  1. Open the hosts file. If you just have a single computer on your network, you can edit the hosts file to block access to YouTube (and any other site). This is really only effective if you have a single computer, as it needs to be done for each computer on the network. If you have lots of devices, see the next section. The hosts file is located in different places for Windows and OS X:
    • Windows - Find the hosts file in C:\Windows\System32\drivers\etc. Right-click it and select "Open With" and then "Notepad."
    • Mac - Open the Terminal from the Utilities folder. Type sudo /bin/cp /etc/hosts /etc/hosts-original and press Return. Then type sudo nano /etc/hosts/ and press Return. This will open the hosts file in a text editor.
  2. Add a new line to the bottom of the file. You'll be adding each site you want to block to the bottom of the hosts file. Create a new line to block YouTube.
  3. Type 127.0.0.1 www.youtube.com on the blank line. This will block YouTube.
  4. Type 127.0.0.1 m.youtube.com on another new line. This will block the mobile site, preventing circumvention of the block.
  5. Save and close the file. Once you've added the YouTube sites to the list, you can save and close the file. Your changes will take place as soon as your restart your browser.[4]
    • If you're using a Mac, press Ctrl+O to save your file and then Ctrl+X to exit. Then type sudo dscacheutil –flush cache to reset your DNS cache.

Blocking YouTube on Your Network

  1. Sign up for OpenDNS. Most routers cannot block HTTPS websites, which means you won't be able to effectively block YouTube using just your router's filtering tools. OpenDNS is a free (for home use) web filtering service that can block YouTube on any computer or device connected to your network, even the YouTube app. You can sign up for OpenDNS Home at opendns.com/home-internet-security/.
    • Note that if someone is using a smartphone with a cellular data connection, they'll be able to circumvent these blocks. You'll need to use additional blocks on mobile devices to prevent access to YouTube on cellular networks.
  2. Open a web browser on a computer connected to your network. You'll be setting your router to connect to the OpenDNS DNS servers, which will block the websites that you set. To change your router's DNS settings, you'll need to open your router's configuration page in a browser.
  3. Open your router's configuration page. You can access your router's configuration page by entering the address into the browser's address bar. See Access a Router for details. Common addresses include:
    • Linksys - http://192.168.1.1
    • D-Link/Netgear - http://192.168.0.1
    • Belkin - http://192.168.2.1
    • ASUS - http://192.168.50.1/
    • AT&T U-verse - http://192.168.1.254
    • Comcast - http://10.0.0.1
  4. Log in with your router's administrator account. If you've changed the login information, log in with your administrator account. Otherwise, use the default login for your router. This is usually "admin" or blank for the username, and "admin" or blank for the password.
  5. Open the "WAN" or "Internet" section. This section contains your DNS settings.
  6. Set your DNS servers to the OpenDNS servers. Your router will connect to the OpenDNS servers, which will block all traffic to the sites you specify. Enter the following into the two DNS server fields:[5]
    • 208.67.222.222
    • 208.67.220.220
  7. Log into your OpenDNS dashboard. After changing your router settings, point your web browser to your OpenDNS account page. Log in with the account you created earlier. You can use the link that came in your registration email.
  8. Add your home network in the Settings tab. You'll need to add your home network's IP address to OpenDNS so that it can apply custom filters. You'll see your IP address at the top of the page. Enter this address into the "Add a network" address field.
    • You'll be asked to give your network an easily-identifiable name and given a link to the OpenDNS Updater. This program will automatically update your OpenDNS network settings whenever your dynamic IP address changes. It's recommended that most home users download this program.
  9. Confirm your network in the email you receive. OpenDNS will send you an email to confirm that you've added the correct network. Click the link to verify your network IP and gain access to custom filtering.
  10. Open the "Web Content Filtering" section of the OpenDNS dashboard. This will allow you to set which sites you want blocked.
  11. Enter the YouTube URLs into the "Manage individual domains" list. Enter the following URLs into the block list to block YouTube on computers and mobile devices, including the YouTube app. Make sure to set each one to "Always block:"[6]
    • youtube.com
    • m.youtube.com
    • ytimg.com
    • ytimg.l.google.com
    • youtube.l.google.com
    • googlevideo.com
  12. Block YouTube on mobile devices with cellular data connections. The method above will block all YouTube traffic on your network, but won't be able to block YouTube if someone connects using a cellular data connection.

Blocking YouTube on an iPhone, iPad, or iPod

  1. Open the Settings app on the iOS device. You can use the Restrictions feature to block the YouTube website on your iOS device.
  2. Select "General" and then "Restrictions." This will open the Restrictions menu.
  3. Tap "Enable Restrictions" and create a passcode. Make sure this isn't the same passcode used to unlock the device. This passcode will prevent anyone else from changing the Restrictions setting.
  4. Tap "Websites" in the "Allowed Content" section. This will allow you to set websites that you want to block.
  5. Tap "Limit Adult Content." This will allow you to set specific websites that you want to block.
  6. Tap "Add a Website" in the "Never Allow" section. You'll be able to enter a URL.
  7. Add the YouTube URLs. Enter the following URLs to block the YouTube website:
    • youtube.com
    • m.youtube.com
  8. Return to the Restrictions menu and toggle "Installing Apps" off. This will prevent anyone from installing new apps, including the YouTube app.
  9. Delete the YouTube app from the device. If you have the YouTube app installed, delete it to prevent anyone from using it. Since you disabled installing apps, no one will be able to add it back.
    • Press and hold the YouTube app icon until your icons start wiggling.
    • Tap the "X" in the corner of the YouTube app. This will uninstall the app.

Blocking YouTube on an Android

  1. Download a file manager app. You'll need a file manager app in order to find the hosts file, which you'll be using to block websites. One of the most popular free options is ES File Explorer, which you can get on the Google Play Store.
  2. Open the file explorer. You'll see your Android folders.
  3. Tap the "/" button in your file explorer. This will take you to the root folder.
  4. Open the "system" folder, then the "etc" folder. This is where the hosts file is located.
  5. Tap the "hosts" file and select "Text." This will tell your file manager that you want to open the file as a text file.
  6. Select a text editor from the list. Most file managers include a text editor that will be at the top of the list.
  7. Start a new line in the hosts file. You'll be creating a new line for each site you want to block.
  8. Block the main YouTube site. Enter the following to block the main YouTube site:
    • 127.0.0.1 www.youtube.com
  9. Add another line for the mobile site. Create a new line and enter the following to block the mobile YouTube site:
    • 127.0.0.1 m.youtube.com
  10. Download an app locker. Once you've blocked the YouTube website, you'll need to block the YouTube app as well. Since the app cannot be deleted from many Android devices, you'll need to use a third-party app to block access to it. Popular app blockers include:
    • AppLock
    • App Lock
    • Smart AppLock
    • Perfect AppLock
  11. Create an app lock passcode. When you start your app locker, you'll be prompted to create a new passcode. This code will be required to access locked apps or change the app locker settings.
  12. Lock the apps you need to block. Block the following apps to prevent access to YouTube as well as prevent the block from being circumvented:
    • YouTube
    • Play Store
    • Settings

Tips

  • 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.

Related Articles

Sources and Citations