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

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
  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
  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
  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.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  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
  3. Select “Properties” and select the “Internet Protocol Version 4 (TCP/IPv4)” option.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  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
  5. To save, click OK on both open windows.
    How To Block YouTube On A Windows, Mac Or Chromebook PC

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
  3. Go to the “Settings” tab.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  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
  5. Enter a network name.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  6. Click “DONE.” This brings up the network’s settings page.
    How To Block YouTube On A Windows, Mac Or Chromebook PC

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
  2. Then proceed to the following location:
    C:\Windows\system32\drivers\etc
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  3. Now, right-click the “Hosts” file and choose “Open with.”
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  4. Select Notepad from the drop-down menu and click OK.
    How To Block YouTube On A Windows, Mac Or Chromebook PC

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

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

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
  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
  5. Provide a network name.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  6. Click “Done” to finish the setup.
    How To Block YouTube On A Windows, Mac Or Chromebook PC

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
  2. Open the macOS Terminal program.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  3. Navigate to the Finder and click “Go.”
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  4. Select “Utilities.”
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  5. Double-click “Terminal” to open it.
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  6. At this point, type the following command:
     /etc/hosts sudo nano
    How To Block YouTube On A Windows, Mac Or Chromebook PC
  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
  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
  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
  5. Restart your computer.
    How To Block YouTube On A Windows, Mac Or Chromebook PC

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!

Sign up and earn $1000 a day ⋙

Driver Booster 12 Free: Keep 9.5M+ Drivers Up-to-Date in 1-Click

Driver Booster 12 Free: Keep 9.5M+ Drivers Up-to-Date in 1-Click

Driver Booster 12 Free is an effective tool that will keep your computers drivers up to date, which will make the system run faster and more reliably. This driver updater from IObit keeps your PC running at its best by checking for lost, out-of-date, or broken drivers immediately.

Advanced SystemCare 17 Free Review 2024 - Your Best PC Optimizer

Advanced SystemCare 17 Free Review 2024 - Your Best PC Optimizer

In an era where digital efficiency is paramount, Advanced SystemCare 17 Free emerges as a beacon for those seeking to enhance their PC's performance.

Summary of Movies & TV application shortcuts on Windows 10

Summary of Movies & TV application shortcuts on Windows 10

Summary of Movies & TV application shortcuts on Windows 10, Summary of Movies & TV application shortcuts on Windows 10 to bring you a great experience. Maybe

How to fix Messages Failed to Load error on Discord for Windows

How to fix Messages Failed to Load error on Discord for Windows

How to fix Messages Failed to Load error on Discord for Windows, Discord isn't fun if you can't read what other people write. Here's how to fix Messages error

How to display the This PC icon on the Windows 11 desktop

How to display the This PC icon on the Windows 11 desktop

How to display the This PC icon on the Windows 11 desktop, During the process of using Windows 11, many users need to access This PC (management).

How to find information in the Windows Registry quickly

How to find information in the Windows Registry quickly

How to find information in the Windows Registry quickly, Do you find it difficult to find information in the Windows Registry? So below are quick ways to find the registry

How to limit the number of failed login attempts on Windows 10

How to limit the number of failed login attempts on Windows 10

How to limit the number of failed login attempts on Windows 10. Limiting the number of failed password login attempts on Windows 10 helps increase computer security. Here's how

How to create fake error messages in Windows

How to create fake error messages in Windows

How to create fake error messages in Windows, Windows can come up with some pretty creative error messages but why don't you try creating your own content for them to make fun of?

Ways to open Windows Tools in Windows 11

Ways to open Windows Tools in Windows 11

Ways to open Windows Tools in Windows 11, Windows Administrative Tools or Windows Tools are still useful on Windows 11. Here's how to find Windows Tools in Windows 11.

How to fix Windows Quick Assist not working error

How to fix Windows Quick Assist not working error

How to fix Windows Quick Assist not working error, Windows Quick Assist helps you connect to a remote PC easily. However, sometimes it also generates errors. But,

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar, How to pin Office files to the taskbar icon on Windows 11? Invite

How to fix the error of not being able to install software on Windows

How to fix the error of not being able to install software on Windows

How to fix the error of not being able to install software on Windows, Why can't you install apps or software on Windows 10/11? Here's everything you need to know about how to fix it

Instructions for deleting or changing PIN on Windows 11

Instructions for deleting or changing PIN on Windows 11

Instructions for deleting or changing the PIN code on Windows 11, In Windows 11, the PIN code is a very useful and convenient security tool for users. However some people

How to fix There Are Currently No Power Options Available error in Windows 10

How to fix There Are Currently No Power Options Available error in Windows 10

How to fix There Are Currently No Power Options Available error in Windows 10, Can't select power mode in Windows 10, what should I do? Here's how to fix the error

The simplest way to fix Photos application errors on Windows 10

The simplest way to fix Photos application errors on Windows 10

The simplest way to fix Photos app errors on Windows 10, what should I do if Microsoft Photos doesn't work? Don't worry about ways to fix Photos app errors on Windows

Instructions for installing keyboard shortcuts to switch input languages ​​on Windows 11

Instructions for installing keyboard shortcuts to switch input languages ​​on Windows 11

Instructions for installing shortcuts to switch input languages ​​on Windows 11. During the process of using Windows, users will often have to switch between methods.

How to check supported power status on Windows 11

How to check supported power status on Windows 11

How to check power status is supported on Windows 11, Windows 11 can handle many different power states. Here's how to check the power status

How to switch from 2.4GHz to 5GHz in Windows 10

How to switch from 2.4GHz to 5GHz in Windows 10

How to switch from 2.4GHz to 5GHz in Windows 10, If you want to find a quick and simple way to speed up the Internet, changing the WiFi band from 2.4GHz to 5GHz may help.

How to fix Not Enough Memory to Run Microsoft Excel error on Windows

How to fix Not Enough Memory to Run Microsoft Excel error on Windows

How to fix Not Enough Memory to Run Microsoft Excel error on Windows, Are you having an error of not enough memory to run Microsoft Excel? So, how to fix Not Enough Memory error

Ways to find all video files on Windows

Ways to find all video files on Windows

Ways to find all video files on Windows, Can't find recorded and saved videos on PC. Below are ways to help you find all clips on Windows.