> ## Documentation Index
> Fetch the complete documentation index at: https://docs.safesquid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Allow Specific YouTube Channel and its Playlist

> Block general YouTube but allow specific channels and playlists in SafeSquid for education.

## Problem

Security teams need predictable control over app and web usage to reduce policy bypass and data-risk exposure.

## Benefits

You can enforce policy decisions consistently with SafeSquid while preserving legitimate business workflows.

## Advantages

You keep actionable policy control close to operations, with verifiable outcomes in logs and policy behavior.

## Call to action

Use the steps in this guide to implement the control, then validate behavior with a real user-flow test.

## Client Scenario

Ganpat University provides graduate programs to various colleges. Ganpat University distributes the internet to its students. Ganpat University wants to block entire [www.youtube.com](http://www.youtube.com) for their students, but wants some of the YouTube channels allowed which are helpful for students.

Ganpat University's challenges are:

All Students should not be allowed to access [www.youtube.com](http://www.youtube.com). If any student tries to access YouTube, the student receives a blocked template.

Only a few of the specified YouTube channels and their playlists should be allowed. This YouTube channel contains educational and knowledge-sharing videos.

## Solution

You can achieve this by creating a policy in the Request Profiles Section and binding it with policies in the Access Profiles Section.

## Prerequisites

HTTPS Inspection should be enabled in SafeSquid. If not enabled, refer to the document - [How to enable HTTPS Inspection](/SSL_Inspection).

You need the YouTube **Channel-ID** and **List-ID** of the playlist you want to allow. You have to extract the Channel-ID and List-ID of the playlist from the YouTube URL before creating rules in SafeSquid.

## Channel-ID and List-ID Extraction

### Extract Channel-ID from YouTube channel

1. Open the YouTube channel to allow. This example uses the CBT Nuggets channel. The **Channel-ID** appears in the referrer URL as the portion after **'channel/'**. Save it for reference.

CBT Nuggets Channel URL: [https://www.youtube.com/channel/UClIFqsmxnwVNNlsvjH1D1Aw](https://www.youtube.com/channel/UClIFqsmxnwVNNlsvjH1D1Aw)

**Channel-ID: UClIFqsmxnwVNNlsvjH1D1Aw**

Select any playlist of the channel and click **PLAY ALL**. This example uses the **CBT Nuggets Webinars** playlist.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image1.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=623ef3f076a4e3a042b32f05d25b51ab" alt="Extract Channel-ID from YouTube Channel to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image1.webp" />

2. You can extract List-ID from the selected playlist.

**List-ID** is the preceding portion of the URL after the **'\&list='** part. Save this part on a notepad for reference.

In our case we have taken playlist **CBT Nuggets Webinars** and its URL is [https://www.youtube.com/watch?v=PcB0j6uBJCA\&list=PLQVJk9oC5JKo\_bMWae3xsavpPMKAzIeGb](https://www.youtube.com/watch?v=PcB0j6uBJCA\&list=PLQVJk9oC5JKo_bMWae3xsavpPMKAzIeGb)

Extracted **List-ID: PLQVJk9oC5JKo\_bMWae3xsavpPMKAzIeGb**

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image2.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=ea0b57fdb29e3161d857c418e4e59f28" alt="Extract List-ID from YouTube Channel to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image2.webp" />

Every video in the playlist URL contains the same List-ID.

URL for next video in CBT Nuggets Webinars playlist: [https://www.youtube.com/watch?v=q802E2jsByI\&list=PLQVJk9oC5JKo\_bMWae3xsavpPMKAzIeGb\&index=2](https://www.youtube.com/watch?v=q802E2jsByI\&list=PLQVJk9oC5JKo_bMWae3xsavpPMKAzIeGb\&index=2)

**List-ID: PLQVJk9oC5JKo\_bMWae3xsavpPMKAzIeGb**

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image3.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=3aed842a53f599e2a487cf81b5e423b7" alt="Verify List-ID from YouTube Channel to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image3.webp" />

## Policy Creation

### Create policy in Request Types section

3. After extracting Channel-ID and List-ID, create policies in SafeSquid.

Go to SafeSquid Web-GUI and click on Configure to create Policies.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image4.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=034e91bd261fd2cf31a7fae6416d955c" alt="Click on Configure to create policy that will allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image4.webp" />

4. Click on Custom Settings to open the Request Types Section.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image5.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=18c6a28707f694c777711141df00a373" alt="Click on Custom Settings to open Request Types Section to allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image5.webp" />

5. Click on the Request Types Section to create the policy.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image6.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=0b2908997278b4b9055e6da1c42cceec" alt="Click on Request Types Section to create the policy to allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image6.webp" />

6. Make sure the Global of Request Types Section is Enabled to True.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image7.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=ce142403d3d69a51248cf61e09604f14" alt="Select Global of Request Types Section is Enabled to True to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image7.webp" />

7. Click on the Request Types tab to create a new policy.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image8.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=bef409ab60b5515f96b05f9592a5f3bf" alt="Click on Request Types tab to create new policy to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image8.webp" />

8. Insert appropriate comments for future use.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image9.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=d3af035f2db17816f4f711d2f0de9444" alt="Insert appropriate comment for future use that describe policy of Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image9.webp" />

9. Select **YouTube** Channels in the Request Types field.
   <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image10.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=26bfe84b9cb08cafda924813358ac205" alt="Select YouTube Channels in Request Types field to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image10.webp" />

10. Add Channel-ID and List-ID in the File field and save the policy. Use the values saved earlier. For the CBT Nuggets channel example, use **(UClIFqsmxnwVNNlsvjH1D1Aw|PLQVJk9oC5JKo\_bMWae3xsavpPMKAzIeGb)** in the File field.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image11.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=7075d1ce78fd3389b31d929a454d2b34" alt="add Channel-ID and List-Id in File Field and Save the policy to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image11.webp" />

11. Create new Request Types as **NUGGET CHANNEL** in the Added Request Types Field.
    <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image12.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=21d9c46fb0e8b2291403d9f72a7e4e03" alt="Create new Request Types as NUGGET CHANNEL in Added Request Types Field to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image12.webp" />

12. Save the Policy Created in the Request Types Section.
    <img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image13.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=81c17ba09e930dc59aec77c2f9d45ca2" alt="Save the Policy Created in Request Types Section to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image13.webp" />

### Create policy in Access Profiles section

13. Go to the Access Profiles section to bind with Profiles.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image14.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=f8835ddc0aeb060470a0a098935776c1" alt="Select Access Profiles section to bind with Profiles to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image14.webp" />

14. Edit these two default policies with the profile name **BLOCK YOUTUBE CHANNEL** as shown below.

:::note
Create two new policies instead of modifying the default policies if preferred.
:::

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image15.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=9a45bd978f1c004e1ae73fc81fcf6358" alt="Edit these two default policies with profiles name BLOCK YOUTUBE CHANNEL to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image15.webp" />

15. Edit the 1st, Policy. Set Enabled to TRUE and Save the Policy.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image16.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=27627a642096d902ee1d72d831ee4e0c" alt="Edit one out of two default policy as True with profiles name BLOCK YOUTUBE CHANNEL to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image16.webp" />

16. Edit the 2nd, Policy. Set this policy Enabled to TRUE.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image17.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=f1263ff6d5556dc893d523ea45af956b" alt="Edit second one out of two default policy as True with profiles name BLOCK YOUTUBE CHANNEL to Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image17.webp" />

17. Insert appropriate comments for future use.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image18.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=52d197e30f15a3ac3e574b93f8a4e6de" alt="Insert appropriate comment for future use in policy which made to allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image18.webp" />

18. Select **NUGGET CHANNEL** in the Request Types field (created in Step 10). Save the policy.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image19.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=0a68e09747666e81585daf7f5fbec9b0" alt="Select NUGGET CHANNEL in Request Types field in policy that allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image19.webp" />

19. After saving, verify the modified policies to confirm they were created correctly.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image20.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=ca9508ba5e4129704b7c89ec53ea1fe5" alt="saving to confirm whether its created properly or not policy that allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image20.webp" />

## Test the Scenario

Now try to open videos other than the CBT Nuggets Webinars playlist of the YouTube Channel CBT Nuggets.

All the other videos will be blocked and the below template will be shown.

<img src="https://mintcdn.com/safe-squid-labs-12a0916f/bKN0qknYDU59o_YX/images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image21.webp?fit=max&auto=format&n=bKN0qknYDU59o_YX&q=85&s=68fbc984e1573880bcd130af45c4d3b6" alt="Test policy that Allow Specific YouTube Channel and its Playlist" width="1280" height="720" data-path="images/How_To/Allow_Specific_YouTube_Channel_and_its_Playlist/image21.webp" />

You can check the videos from the CBT Nuggets Webinars playlist of the CBT Nuggets channel. Only these videos will be allowed.

:::note
This configuration will work only for videos sourced from the channel page and not from the feeds links or YouTube Videos embedded in website.

To allow all the videos of any specific YouTube Channel you have to insert List-ID's (of every playlist in that channel) and file part (of each individual unlisted video) of the URL in the File field of the Request Types Section.
:::


## Related topics

- [Block Specific YouTube Channel](/use_cases/access_restriction/block_specific_youtube_channel.md)
- [YouTube API Integration](/use_cases/access_restriction/youtube_api_integration_with_safesquid_to_allow_specific_youtube_videos.md)
- [Header Filter Configuration and Reference](/use_cases/header_rewrite/header_filter_configuration.md)
- [Profiling Engine](/use_cases/profiling_engine/profiling_engine.md)
- [Content rewrite](/admin_guide/filtering_and_privacy/content_modifier.md)
