YouTube: How to Allow Only Specific Video
Question: You have YouTube blocked by blocking “Social Networking” and “Video Sharing” categories of sites. Nevertheless you would like to allow access to a single video on YouTube. You have HTTPS filtering enabled (important!)
Answer: You need to allow access to streaming media from Google sites (where youtube videos are hosted) and allow access to one specific YouTube video by ID.
Add the following domain to Web UI / Policy / Exclusions / Domain name. This will allow direct access to all youtube media files. Note leading dot:
Add the following regular expression to Web UI / Policy / Exclusions / URL Regex. This will allow access to information about video attributes (for example length of video, title, caption, etc) for all youtube media files:
Finally add the following regular expression to Web UI / Policy / Exclusions / URL Regex. This will allow access to ONLY ONE video identified by z8aBZZnv6y8 video id and accessed by “embed” style link (https://www.youtube.com/embed/z8aBZZnv6y8). You will then need to share the video link to your users, for example by embedding it into your site:
When you need to add another video, lookup its video id from the browser url, and repeat point 4 only. Access to all other videos on youtube from browser will be blocked (because you have video sharing category blocked by default).
YouTube may regularly change its URL video coding scheme so if this regular expression does not work, ask firstname.lastname@example.org to research this issue again.