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

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, somepeople 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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (1)
  2. Right-click on it and select “Run as administrator.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (2)
  3. Go to “File” and click “Open….”
    How to Block YouTube on a Windows, Mac or Chromebook PC (3)
  4. Go to the “This PC” tab on the left side of the window.
    How to Block YouTube on a Windows, Mac or Chromebook PC (4)
  5. Double-click your computer’s hard drive and open the Windows folder.
    How to Block YouTube on a Windows, Mac or Chromebook PC (5)
  6. Scroll down and double-click the System32 folder.
    How to Block YouTube on a Windows, Mac or Chromebook PC (6)
  7. Go down and double-click the “drivers” folder.
    How to Block YouTube on a Windows, Mac or Chromebook PC (7)
  8. Double-click the “etc” folder.
    How to Block YouTube on a Windows, Mac or Chromebook PC (8)
  9. Click on “Show all file types.” The “host” file will be visible.
    How to Block YouTube on a Windows, Mac or Chromebook PC (9)
  10. Right-click on it, open “Properties,” go to “Security,” then click “Edit.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (10)
  11. Check the “Full Control” box and press OK.
    How to Block YouTube on a Windows, Mac or Chromebook PC (11)
  12. Double-click on the host file to open it in the notepad.
    How to Block YouTube on a Windows, Mac or Chromebook PC (12)

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.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (13)
  2. Make a backup of your “hosts” file.
  3. Click “File,” then “Save As…,” followed by “Text Documents,”
    How to Block YouTube on a Windows, Mac or Chromebook PC (14)
  4. Select “All Files” in the drop-down menu, then the “hosts” file, and save it by clicking “Save.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (15)
  5. Restart your computer. After editing the “hosts” file, it is recommended that you restart your computer to ensure the changes take effect.
    How to Block YouTube on a Windows, Mac or Chromebook PC (16)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (17)
  2. Click “Network Connections.” Under the “Change adapter” options, right-click your current network.
    How to Block YouTube on a Windows, Mac or Chromebook PC (18)
  3. Select “Properties” and select the “Internet Protocol Version 4 (TCP/IPv4)” option.
    How to Block YouTube on a Windows, Mac or Chromebook PC (19)
  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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (20)
  5. To save, click OK on both open windows.
    How to Block YouTube on a Windows, Mac or Chromebook PC (21)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (22)
  3. Go to the “Settings” tab.
    How to Block YouTube on a Windows, Mac or Chromebook PC (23)
  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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (24)
  5. Enter a network name.
    How to Block YouTube on a Windows, Mac or Chromebook PC (25)
  6. Click “DONE.” This brings up the network’s settings page.
    How to Block YouTube on a Windows, Mac or Chromebook PC (26)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (27)
  2. Then proceed to the following location:
    C:\Windows\system32\drivers\etc
    How to Block YouTube on a Windows, Mac or Chromebook PC (28)
  3. Now, right-click the “Hosts” file and choose “Open with.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (29)
  4. Select Notepad from the drop-down menu and click OK.
    How to Block YouTube on a Windows, Mac or Chromebook PC (30)

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
    How to Block YouTube on a Windows, Mac or Chromebook PC (31)
  2. Create a backup copy of the “hosts” file.
  3. Go to “File,” then “Save As…,” then “Text Documents.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (32)
  4. From the drop-down box, choose “All Files,” then the “hosts” file, and click “Save.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (33)
  5. Restart your computer. It is advised that after modifying the “hosts” file, you restart your computer to ensure the changes take effect.
    How to Block YouTube on a Windows, Mac or Chromebook PC (34)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (35)
  3. Choose “Properties,” then “Internet Protocol Version 4 (TCP/IPv4).”
    How to Block YouTube on a Windows, Mac or Chromebook PC (36)
  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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (37)
  5. Click OK on both open windows to save.
    How to Block YouTube on a Windows, Mac or Chromebook PC (38)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (39)
  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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (40)
  5. Provide a network name.
    How to Block YouTube on a Windows, Mac or Chromebook PC (41)
  6. Click “Done” to finish the setup.
    How to Block YouTube on a Windows, Mac or Chromebook PC (42)

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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (43)
  2. Open the macOS Terminal program.
    How to Block YouTube on a Windows, Mac or Chromebook PC (44)
  3. Navigate to the Finder and click “Go.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (45)
  4. Select “Utilities.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (46)
  5. Double-click “Terminal” to open it.
    How to Block YouTube on a Windows, Mac or Chromebook PC (47)
  6. At this point, type the following command:
    /etc/hosts sudo nano
    How to Block YouTube on a Windows, Mac or Chromebook PC (48)
  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.
    How to Block YouTube on a Windows, Mac or Chromebook PC (49)
  2. Duplicate the “hosts” file for backup purposes.
  3. Click “File,” followed by “Save As…”, and finally “Text Documents.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (50)
  4. Select “All Files” from the drop-down box, then the “hosts” file, and click “Save.”
    How to Block YouTube on a Windows, Mac or Chromebook PC (51)
  5. Restart your computer.
    How to Block YouTube on a Windows, Mac or Chromebook PC (52)

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!

Related Posts

How to Check Mouse DPI on a Windows PC, Mac, or ChromebookHow to View Instagram Reels on a Windows PC, Mac, or ChromebookHow to Block Channels on YouTubeHow To Block a Windows 11 Update on a Windows 10 PC

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

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6058

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.