YouTube Restrict (children-safe) Mode
YouTube has an amazing, but not well known, mode that allows you to block access to unsafe (adult or violent) videos and block comments. Learn more about the YouTube Restricted and Moderate Modes.
YouTube Restrict and Restrict-Moderate
YouTube provides a way for parents and schools to enforce a children friendly mode on all browsers and devices using your network. That's done by enabling the Restrict.YouTube (or Restrict-Moderate.YouTube) filter to all YouTube domains - that can't be undone at the browser level. It means you can be more confident that the kids won't be seeing adult content or reading the comments on the videos they are watching.
If you are using CleanBrowsing, we enforce YouTube's Restrict-Moderate mode automatically on our Family Filter and you do not have to take any of these steps.
Configuring Restricted YouTube DNS
YouTube Restrict works by re-mapping YouTube IP addresses to the CNAME restrict.youtube.com (or restrictmoderate.youtube.com). It means that instead of visiting YouTube at their normal IP addresses, you will re-route the traffic to a special load balancer provided by Google that will block access to non children friendly videos. YouTube offers two modes:
restrict.youtube.com: More strict mode. It blocks access to videos with violence, language, sexuality or adult content. It is the closest to the YouTube Kids mode. Blocks comments. Recommended for kids under 12.
restrictmoderate.youtube.com: Less strict mode. It blocks access to videos with possible violence, sexuality or adult content. It also blocks comments.
You can choose the filter that fits your needs the best. Note that for the following steps, you will either have to use the IP address 22.214.171.124 for the restrictmoderate filter or 126.96.36.199 restrict.youtube.com.
Re-mapping via /etc/hosts
The first way to do that is via the /etc/hosts file on your Mac or Linux (or \WINDOWS\system32\drivers\etc\hosts on Windows). That file overwrites the IP address of any domain added to that file. You have to open it and append the following lines at the bottom of it:
188.8.131.52 www.youtube.com 184.108.40.206 m.youtube.com 220.127.116.11 youtubei.googleapis.com 18.104.22.168 youtube.googleapis.com 22.214.171.124 www.youtube-nocookie.com
If you add those 5 entries above, you will force the restricted mode. To verify it is working, save the file and go to YouTube.com to check that you can't see comments or any more adult video.
Re-mapping at your router
Re-mapping at your router can be a bit more difficult. You have to login to your router, and find the DNS and Domain mapping option (It might be under DHCP or Settings on some router versions). Once you find the place to map domain names, you will have to add the IP address 126.96.36.199 as the map for www.youtube.com, m.youtube.com, youtubei.googleapis.com, youtube.googleapis.com and www.youtube-nocookie.com.
Kids spend quite a bit of time on YouTube, so it is critical to block access to some of the dirty content that is in there. Try these steps above and see if they work for you. Another option is to use CleanBrowsing, as we deal with it automatically.