It is possible to block Youtube as a whole but allow certain videos. If you wanted to do this with most websites, this can be acheived by using Custom URL however since Youtube URLs contain dynamic characters then this would need to be done by using Keyword Lists.


1. Create a new Keyword List. For this example, we will just call it Allowed Youtube Videos - change match content to URL & App Action.


URL only will be fine if you are not using our CASB feature



2. In the field on the right, add your Youtube pattern. This can be the entire URL however for this example we will be using the last part of the URL, i.e. =2OJbXDuwniA. Change Match Type to Ends With



This means if anything in the URL bar ends with this specific keyword entry, the relevant filter rule will trigger for it - this Keyword List however needs to be included in a filter rule so that it can be triggered


3. We now need to configure our Filter Rules so that we can block Youtube as a whole but allow entries in this specific Keyword List.


Add the pattern youtube.com to an existing Custom URL list that is assigned to a block policy. Alternatively, create a new Custom URL list and add youtube.com to it. This new Custom URL category would need to be assigned to an existing BLOCK Filter Rule or you can create a new BLOCK filter rule.


4. You now need to place the Keyword List 'Allowed Youtube Videos' to an ALLOW filter rule that is placed higher in the filter rule table than the one you just placed the Custom URL containing youtube.com - this means this will trigger first so that the specific videos you want allowed will be viewable, and anything else will be blocked. If you don't have an existing ALLOW rule then you can simply create one:



You will also need to add the pattern googlevideo.com and youtube.com/s to a Custom URL group and have it assigned in an allowed Filter Rule placed above your rule blocking youtube.com This is because googlevideo.com and youtube.com/s are the URLs of the actual video player itself and if these URLs are blocked then video playback is not possible