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
- Open the Start menu and search for the notepad.
- Right-click on it and select “Run as administrator.”
- Go to “File” and click “Open….”
- Go to the “This PC” tab on the left side of the window.
- Double-click your computer’s hard drive and open the Windows folder.
- Scroll down and double-click the System32 folder.
- Go down and double-click the “drivers” folder.
- Double-click the “etc” folder.
- Click on “Show all file types.” The “host” file will be visible.
- Right-click on it, open “Properties,” go to “Security,” then click “Edit.”
- Check the “Full Control” box and press OK.
- Double-click on the host file to open it in the notepad.
Now you can edit the host file.
- 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.”
- Make a backup of your “hosts” file.
- Click “File,” then “Save As…,” followed by “Text Documents,”
- Select “All Files” in the drop-down menu, then the “hosts” file, and save it by clicking “Save.”
- 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:
- Right-click the Start button.
- Click “Network Connections.” Under the “Change adapter” options, right-click your current network.
- Select “Properties” and select the “Internet Protocol Version 4 (TCP/IPv4)” option.
- 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.
- 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:
- Open the email address associated with your OpenDNS account.
- 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.
- Go to the “Settings” tab.
- 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.
- Enter a network name.
- 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
- Open File Explorer on your computer.
- Then proceed to the following location:
C:\Windows\system32\drivers\etc - Now, right-click the “Hosts” file and choose “Open with.”
- Select Notepad from the drop-down menu and click OK.
You can now edit the host file.
- 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
- Create a backup copy of the “hosts” file.
- Go to “File,” then “Save As…,” then “Text Documents.”
- From the drop-down box, choose “All Files,” then the “hosts” file, and click “Save.”
- 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:
- Right-click the Start button in the bottom left corner of your desktop.
- Click “Network Connections” and right-click your existing network under the “Change adapter” option.
- Choose “Properties,” then “Internet Protocol Version 4 (TCP/IPv4).”
- 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.
- Click OK on both open windows to save.
Then, make an OpenDNS account as instructed above.
- Log in to your OpenDNS account using the email address linked with it.
- 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.
- Select the “Settings” option.
- 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.
- Provide a network name.
- 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
- In the Dock, click the “Launchpad” symbol and then type “Terminal” in the search area.
- Open the macOS Terminal program.
- Navigate to the Finder and click “Go.”
- Select “Utilities.”
- Double-click “Terminal” to open it.
- At this point, type the following command:
/etc/hosts sudo nano
- Input your user’s sudo password to provide edit access to the file.
You may now edit the host file.
- 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.
- Duplicate the “hosts” file for backup purposes.
- Click “File,” followed by “Save As…”, and finally “Text Documents.”
- Select “All Files” from the drop-down box, then the “hosts” file, and click “Save.”
- 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!
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