Have you ever wondered how to block YouTube on Windows 10? You are not alone, but I’m here to show you how it’s possible. In this blog post I will walk you through three different methods that will allow you to block any website with ease. This can be especially useful if you don’t want your children watching non-educational content or if you want to avoid distractions when working.
YouTube is an excellent avenue for watching educational and entertaining videos, but it should not take a lot of your time too much. If your productivity or your kids' time is affected, you must block the website on your computer so that you or your children can focus on other tasks.
For Windows 10 users, there are many options for preventing YouTube from being accessed, but the most highly recommended solution is to modify a specific file named "hosts" on your device.
Take note, though, that the "hosts" file does not have an extension on it compared to .TXT or any other types of files.
What is the Hosts File?
A unique file on any Windows computer, "hosts" is used to designate a particular IP address of your choice for a specific domain. Aside from website blocking, "hosts" can also be utilized to prevent ads and spyware from popping up. Keep in mind, however, that any mishap on file configurations can have adverse effects on your ability to surf the web.
To access the file, just navigate to C:WindowsSystem32driversetc.
Preventing YouTube Access
Refer to the step-by-step instructions below to block YouTube access on your Windows 10 computer.
- Click on the search box or magnifying glass icon on your Windows 10 taskbar.
- Type “run” in the search box and wait for the Run app to display in the results. Once the Run app pops up, click on it.
- On the Run dialog window, type C:WindowsSystem32driversetc and click OK to open a folder named etc.
- Once the etc folder shows up, right-click on the "hosts" file and click on Open with.
- Scroll through the selection list until you find Notepad and click OK.
- On the "hosts" notepad, move your text cursor to the very end and type the following single line of code:
127.0.0.1 www.youtube.com
- Click File > Save to apply the changes and close the Notepad app.
What to Do If Hosts Cannot Be Saved in the Same Location?
There might be times when the system prompts you to save "hosts" to a different location other than C:WindowsSystem32driversetc. This is due to the etc folder being associated with the Windows 10 operating system.
For you to save any changes to "hosts" within the same location, it is highly recommended that you open this file using Notepad with administrator-level privileges. In case right-clicking on "hosts" to open it with Notepad does not work. You can use this elevated Notepad app trick to your advantage instead.
Simply follow these steps:
- On your Windows 10 taskbar, click on the search box or magnifying glass icon.
- Type notepad and wait for this app to show up in the results. Once Notepad shows up, click on Run as administrator.
- On a blank or new notepad document, navigate to File > Open.
- Go to the etc folder by typing C:WindowsSystem32driversetc on the top text field or clicking on the left-side pane.
- Next to the "File name:" text field, click on the "Text Documents (*.txt)" dropdown, and change its value to "All Files (*.*)" so that "hosts" will appear.
- Click on "hosts" then click Open.
- Move your text cursor to the very end and type:
127.0.0.1 www.youtube.com
- Click File > Save and close Notepad.
Summary: Block YouTube on Windows 10
- Open your Start Menu and search for "Windows Defender Firewall."
- Click on the "Windows Defender Firewall" result.
- Click on the "Advanced Settings" option that appears on the left-hand side, below the main navigation pane.
- Click on the "Outbound Rules" section in the middle pane.
- From this screen, you can see all of the outbound rules that are active and can edit or disable them as necessary.
- Working from this screen, scroll through until you find a rule that contains an "ANY" outbound port and an "ANY" protocol. These rules will allow any traffic to be sent or blocked from your network.
- Once you have found a rule that is configured as such, right-click it and choose "Properties." You'll then see a long list of options that you can set for this rule.
- From here, you'll want to select the "Programs and Services" tab, then click on "Isolation Mode (Prevent All Programs from This Program).
- The last thing that you should do this time is to open your favorite web browser and try to open YouTube. If you can’t access YouTube after all the changes you’ve made, it simply means that you have blocked the website successfully. You may apply this similar procedure to other websites that you want to block as well.