Enforce Youtube Safety Mode

<< Back to Knowledge Search


Enable\enforce YouTube Safety mode using policy.

Enable\enforce YouTube Safesearch using policy.


NOTE:  For the latest Safe Search policy, see the ZIP file attached to knowledge article 000021435

To use policy to enable youtube Safety Mode, complete the following procedure.

  1. Navigate to the ProxySG Management Console: https://proxySG_IP:8082
  2. Go to Configuration -> Policy -> Policy Files
  3. In the Install Local File from  pulldown, select Text Editor.
  4. Click InstallEdit and Install the Local File window displays.
  5. Copy the following policy:
    ; === Safety Mode for YouTube ===
        <proxy BC_SafeSearch_YouTube_cookies>  url.domain=youtube.com
        request.header.cookie="PREF=" action.BC_SafeSearch_YouTube_Cookie_Rewrite(yes) 
              define action BC_SafeSearch_YouTube_Cookie_Rewrite
              rewrite( request.header.Cookie, "(PREF=[^,]+)", "$(1)&f2=8000000" )
              define action BC_SafeSearch_YouTube_Cookie_append
              append( request.header.Cookie, "PREF=f2=8000000" )
    ; === End of Safety Mode for YouTube ===
  6. Paste the policy into the Edit and Install the Local File window.
  7. Click Install

Note: This KB article was updated on 5.26.2011 as the previous policy has been rendered invalid by changes made to the YouTube Safety Mode process.

Additional Information
Some YouTube video will not work with this policy. So, we need to bypass those video from that policy by adding the Allow rule for that specific video before the "request.header.cookie" rule, as follows:

 <proxy BC_SafeSearch_YouTube_cookies>  url.domain=youtube.com
   url.domain="www.youtube.com/watch?v=2lPftckV_vo" Allow
    request.header.cookie="PREF=" action.BC_SafeSearch_YouTube_Cookie_Rewrite(yes) 

So, we've added the rule (url.domain="www.youtube.com/watch?v=2lPftckV_vo" Allow) to allow that specific video (www.youtube.com/watch?v=2lPftckV_vo) to be played and bypass the safe search for it.
Bug Number
InQuira Doc IdKB3333

Article Feedback

Hide Properties
First Published      10/01/2014
Last Modified      03/31/2015
Last Published      03/31/2015
Article Audience
Product      ProxySG
Topic      Content Filtering, Content Management, Usability
Article Number      000009214
Was this helpful?
Previous MonthNext Month