How to Block YouTube on Your Computer
YouTube is a popular video-sharing website that's owned by Google. Because most of the content on YouTube is user-submitted, some of the videos may be a bit extreme for younger audiences. If you have children or own a computer with public Internet access, you may wish to block users from visiting YouTube's website. While there are programs available that offer parental controls, one simple free way to block specific websites is to add the website to your hosts file along with a loopback IP address that makes it impossible to connect to that site while browsing.
Log onto your computer using an Administrator account.
Click "Start" and input "run" into the Windows search bar. Press "Enter." The "Run" window will appear.
Type "notepad c:\WINDOWS\system32\drivers\etc\hosts" into the "Open" field and press "Enter." This opens the Windows hosts file using Notepad so that you can edit it.
Scroll down to the bottom of the Notepad hosts file and add the following string directly below the last line:127.0.0.1 youtube.com
Click "File" and select "Save" to save the updates to the hosts file.
Restart your computer. Internet users who attempt to visit the YouTube website will see the following message: "ERROR...Could not connect to database server!"
Tips & Warnings
- Unblock YouTube by deleting the line you added to the hosts file or by adding "#" at the beginning of the line.
- Do not modify anything else in the hosts file or you can damage your Internet settings.