Allowing a single YouTube video through a ProxySG

<< Back to Knowledge Search



How do I allow a single YouTube video through my ProxySG?
My company does not allow YouTube or streaming media.  However, there is one video we want our users to view.  How do I allow that one video through while denying all other YouTube content?


The ProxySG can be configured to allow a single YouTube video to pass through the proxy while blocking all other YouTube content.  This policy can be created and placed into the local policy file.  For information on how to install the CPL policy into the local policy file, please see 000010101 for information on how to install policy into the local policy file.  The following example uses a Blue Coat corporate video located at

url.domain=// allow
url.domain=// allow         ; This is a YouTube content host URL
url.substring=snkEXxCwpMA allow       ; This allows only the unique youtube video. This string is what comes after /watch?v= in the YouTube video URL. allow   ; This is another YouTube content host URL Deny           ; This rule will deny access to other youtube URLs.

<proxy> http.method=CONNECT ALLOW  
  ;This rule allows users to access the YouTube site's initial request on explicit Proxies. 

NOTE: To allow another youtube video, just add a new line in the CPL code above the first URL.substring rule to allow it, .e.g if we want to allow youtube video in addition to the above video, the CPL code becomes:

url.domain=// allow
url.domain=// allow
url.substring=snkEXxCwpMA allow
url.substring=VphNtkJYWz0 allow       ; new line added allow Deny

<proxy> http.method=CONNECT ALLOW

In some cases, a YouTube video is embedded within another URL.  Assuming the URL hosting the embedded video is allowed by policy, but the video is denied based on your YouTube or streaming video deny rule, you can edit the above local policy slightly to allow the embedded video:

url.domain=// allow
url.domain=// allow
url.substring=snkEXxCwpMA allow
url.substring=crossdomain.xml allow   ; Allow video to play from domain other than allow Deny

<proxy> http.method=CONNECT ALLOW


NOTE: is available via HTTP and HTTPS, though on most modern browsers, it defaults to HTTPS. As a result, SSL Interception must be enabled for the above CPL code to function in all cases.

Additional Information
This article contains information previously documented in KB 000024392.
Bug Number
InQuira Doc IdKB3710

Article Feedback

Hide Properties
First Published      10/01/2014
Last Modified      07/12/2016
Last Published      03/17/2015
Article Audience
Product      ProxySG
Software      SGOS 5
Topic      Content Access, Content Filtering, Content Management, Control, Policy Management, Streaming
Article Number      000007861
Summary      This article provides steps for blocking all but a single YouTube video through the ProxySG.
Was this helpful?
Previous MonthNext Month