Because distance learning has become a part of children's lives in recent years, many parents are looking for a way to block YouTube videos during e-learning or reduce the amount of time children spend in front of a computer watching videos instead of do other activities.
Besides addiction to YouTube that worries parents, in recent years there have been released many YouTube videos with inappropriate or dangerous content for children and for this reason is necessary to restrict YouTube access, especially when there is no supervision by parents.
In this guide, you will learn how to prevent access to YouTube website on all browsers. *
* Note: If you want to block a website only in Chrome or in Firefox read this article: How to Block Websites on Chrome & Firefox.
How to Block YouTube on any Browser on Windows 10, 8 or 7 OS.
The most reliable way to block any website on any browser on a Windows PC, is to use the "hosts" file. The hosts file is an operating system file that maps hostnames (domain names) to IP addresses. In simple words, when you type a website's address in your browser, the computer looks first at the local hosts file to resolve its IP Address. If the site name does not appear in the host file, then it is trying to find its IP address from the DNS service that you are using on your device.
To block YouTube on any web-browser (e.g. Chrome, Firefox, Edge, etc.) on Windows through the hosts file:
1. Open Notepad application as Administrator. To do that:
a. Type notepad on the search box
b. Right-click on Notepad and select Run as Administrator.
2. From File menu, select Open.
3. Navigate to this location on your disk:
4. Change the "File type" to All files and then open the hosts file
5. At the end add the following lines:*
- 127.0.0.1 youtube.com
- 127.0.0.1 www.youtube.com
- 127.0.0.1 m.youtube.com
* Note: Press TAB after typing 127.0.0.1
6. When done, click File > Save and close notepad.
7. Finally open your browser and try to visit YouTube. Normally, you should receive the message: "Connect to the Internet. You're offline. Check your connection".
8. You're done. If you like to unblock YouTube in the future, just follow the same steps. but this time remove the three (3) added lines in hosts file, or type the symbol # in front of each added line.
That's all folks! Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.
- FIX: TEAMS Sign-in error on Mac 'Selected user account does not exist in tenant Microsoft Services and cannot access the application' (Solved) - December 4, 2023
- How to Upgrade Windows 10 to Windows 11 from ISO file. - November 29, 2023
- How to Update to Windows 11 23H2 On Unsupported Hardware. - November 27, 2023