How to Block YouTube on a Windows, Mac or Chromebook PC

Whether you’re looking up a specific how-to solution or kicking back and relaxing, YouTube has an immense variety of videos to explore. Unfortunately, some people may become sidetracked by YouTube videos and wind up delaying tasks they should be completing.

Luckily, you can block YouTube if you want to prevent yourself from slacking or if you want to keep your children or workers from using the site. This article will go through all the necessary steps to block YouTube on different devices.

How to Block YouTube on a Windows 10 PC

When it comes to your Windows 10 PC, you can block YouTube in two ways – blocking it on your browsers or blocking it on your network.

Block YouTube on Your Browsers

  1. Open the Start menu and search for the notepad.
  2. Right-click on it and select “Run as administrator.”
  3. Go to “File” and click “Open….”
  4. Go to the “This PC” tab on the left side of the window.
  5. Double-click your computer’s hard drive and open the Windows folder.
  6. Scroll down and double-click the System32 folder.
  7. Go down and double-click the “drivers” folder.
  8. Double-click the “etc” folder.
  9. Click on “Show all file types.” The “host” file will be visible.
  10. Right-click on it, open “Properties,” go to “Security,” then click “Edit.”
  11. Check the “Full Control” box and press OK.
  12. Double-click on the host file to open it in the notepad.

Now you can edit the host file.

  1. At the bottom, add a line containing YouTube’s address. Enter 127.0.0.1 and then hit the Tab key, followed by youtube.com, and press Enter. If you’re using Chrome, you’ll need to add a space at the end of the YouTube address and then write “www.youtube.com.”
  2. Make a backup of your “hosts” file.
  3. Click “File,” then “Save As…,” followed by “Text Documents,”
  4. Select “All Files” in the drop-down menu, then the “hosts” file, and save it by clicking “Save.”
  5. Restart your computer. After editing the “hosts” file, it is recommended that you restart your computer to ensure the changes take effect.

Block YouTube on Your Network

Before modifying the restricted websites on your home network, you must configure your computer to utilize the OpenDNS DNS server addresses. Here’s how:

  1. Right-click the Start button.
  2. Click “Network Connections.” Under the “Change adapter” options, right-click your current network.
  3. Select “Properties” and select the “Internet Protocol Version 4 (TCP/IPv4)” option.
  4. Click Properties, check the “Use the following DNS server addresses” box, and then type 208.67.222.222 in the top box and 208.67.220.220 in the bottom box.
  5. To save, click OK on both open windows.

Then, create an account with OpenDNS. Enter the email address you wish to use for OpenDNS registration. From the drop-down menu, select your current country. Finally, choose a password for your account. From here, the steps are:

  1. Open the email address associated with your OpenDNS account.
  2. There will be an email with a verification link. Confirm your OpenDNS registration by clicking the “[OpenDNS] Confirm your OpenDNS registration” email. This will take you to a new window.
  3. Go to the “Settings” tab.
  4. Click “ADD THIS NETWORK” on the image labeled “BLOCK YOUTUBE.” It’s the grey button to the right of your current network’s IP address. There will be a pop-up window.
  5. Enter a network name.
  6. Click “DONE.” This brings up the network’s settings page.

How to Block YouTube on a Windows 11 PC

The same methods to block YouTube on Windows 10 work for Windows 11.

Block YouTube on Your Browsers

  1. Open File Explorer on your computer.
  2. Then proceed to the following location:
    C:\Windows\system32\drivers\etc
  3. Now, right-click the “Hosts” file and choose “Open with.”
  4. Select Notepad from the drop-down menu and click OK.

You can now edit the host file.

  1. Add a line at the bottom with YouTube’s URL. Enter 127.0.0.1 followed by the Tab key, youtube.com, and then press Enter. If you’re using Chrome, you must add a space after the YouTube address and then type www.youtube.com
  2. Create a backup copy of the “hosts” file.
  3. Go to “File,” then “Save As…,” then “Text Documents.”
  4. From the drop-down box, choose “All Files,” then the “hosts” file, and click “Save.”
  5. Restart your computer. It is advised that after modifying the “hosts” file, you restart your computer to ensure the changes take effect.

Block YouTube on Your Network

Again, you must modify your computer’s DNS server configuration to use the OpenDNS DNS server addresses. This is how to do it:

  1. Right-click the Start button in the bottom left corner of your desktop.
  2. Click “Network Connections” and right-click your existing network under the “Change adapter” option.
  3. Choose “Properties,” then “Internet Protocol Version 4 (TCP/IPv4).”
  4. Select Properties, check the box labeled “Use the following DNS server addresses,” and then put 208.67.222.222 in the top box and 208.67.220.220 in the bottom box.
  5. Click OK on both open windows to save.

Then, make an OpenDNS account as instructed above.

  1. Log in to your OpenDNS account using the email address linked with it.
  2. You will receive an email including a link for verification. Confirm your OpenDNS registration by clicking the link in the “[OpenDNS] Confirm your OpenDNS registration” email. This opens a new window.
  3. Select the “Settings” option.
  4. On the picture click “ADD THIS NETWORK.” It’s the grey button to the right of the IP address of your current network. A pop-up window will appear.
  5. Provide a network name.
  6. Click “Done” to finish the setup.

How to Block YouTube on a Mac

Blocking YouTube in a Mac is very similar to doing so on Windows.

Block YouTube on Your Browsers

  1. In the Dock, click the “Launchpad” symbol and then type “Terminal” in the search area.
  2. Open the macOS Terminal program.
  3. Navigate to the Finder and click “Go.”
  4. Select “Utilities.”
  5. Double-click “Terminal” to open it.
  6. At this point, type the following command:
     /etc/hosts sudo nano
  7. Input your user’s sudo password to provide edit access to the file.

You may now edit the host file.

  1. At the bottom, provide a line containing YouTube’s URL. Enter 127.0.0.1, hit Tab, type youtube.com, and press Enter. You must type www.youtube.com after the YouTube address if you’re using Chrome.
  2. Duplicate the “hosts” file for backup purposes.
  3. Click “File,” followed by “Save As…”, and finally “Text Documents.”
  4. Select “All Files” from the drop-down box, then the “hosts” file, and click “Save.”
  5. Restart your computer.

Never Get Distracted by YouTube Again

While this guide specifically covered how to block YouTube, any similar website can also be blocked on your PC. In this way, you can eliminate any distractions and focus on what you really need to get done. Additionally, you can prevent children from accessing any inappropriate content.

Have you ever blocked a website? Do you often get distracted by YouTube? Let us know in the comment section below!

Leave a Reply

Your email address will not be published.


Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos