How do I allow specific YouTube videos?

Article #: Product Castle
1278 Guardian All


This article describes how to allow access to specific YouTube videos, while YouTube in general remains blocked.


Allowing individual videos for YouTube can be time-consuming and tedious — finding then listing each video's URL in a category.


Please note: This solution will not work if the content modification 'Youtube restricted mode' is enabled. This solution is most appropriate for customers who do not use GSuite for education.

Note: As YouTube defaults to HTTPS, you will need to enable HTTPS Decrypt and Inspect for YouTube — see

  1. You need the 11-digit YouTube video code for each video you want to allow access to. The video code forms part of the URL. For example,

    has the video code mPI0bCXiF3U

  3. From the Smoothwall administration user interface, go to Guardian > Policy Objects > Categories.
  4. Create a new custom category with the following contents:
  5. Domain / URL filtering:


    URL patterns (click Advanced):

    • cache[0-9]\.c\.youtube\.com
    • youtube\.com/.*<11_digit_YouTube_video_code>

    where 11_digit_YouTube_video_code is the video code copied from the URL.

  6. Within the same category, repeat:
  7. URL patterns (click Advanced):

    • youtube\.com\/.*<11_digit_YouTube_video_code>

    for every video you want to allow access.

Tip: To allow embedded videos, use youtube\.com\/embed/.*<11_digit_YouTube_video_code> instead.

Tip: To allow YouTube playlists, use youtube\.com\/.*<22_digit_YouTube_playlist_code> instead


Last updated: Author: Contributions by:
27th March 2017