Block Specific Youtube Channel

Block Specific Youtube Channel

Overview

Prevent users to access specific YouTube Channel like 'T-Series'.
Note: Blocking of Specific YouTube channel and allowing all the other YouTube videos is a hypothetical scenario. YouTube website is not designed for such hypothetical situation. However, this how-to will demonstrate to block a specific YouTube Channel and one of its playlist videos.

Prerequisites

HTTPS Inspection should be enabled in SafeSquid. If not enabled, you can check our document - How to enable HTTPS Inspection
You need the YouTube Channel-ID and List-ID. You have to extract Channel-ID and List-ID from YouTube URL before creating rules in SafeSquid.

Policy Creation

We can achieve the above by following steps –

Extract Channel-ID from YouTube Channel

1. Open the YouTube channel you want to block. Here T-Series channel is taken as an example.
 Here you will get Channel-ID from the referrer URL. Channel-ID is the preceding portion of the URL after 'channel/' part. Save this part on notepad for reference.
 Channel-ID: UCq-Fj5jknLsUf-MWSy4_brA
For List-ID extraction click on PLAY ALL link on the page as shown below.
Extract Channel-ID from YouTube Channel to block specific YouTube channel 

Extract List-ID from YouTube Channel

2. Extract List-ID from any of the subsequent URL.
  List-ID is the preceding portion of the URL after '&list=' part. Save this part on notepad for reference.
 List-ID: PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy
Extract List-ID from YouTube Channel  to block specific YouTube channel
You will find every Video in the list contain List-ID of the channel.
 List-ID: PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy
Extract List-ID from any of the subsequent YouTube Channel  to block specific YouTube channel 
3. After extracting the Channel-ID and List-ID we have create policies in SafeSquid.
 Go to SafeSquid Web-GUI and click on Configure to create Policies.
Go to configure section under safesquid web interface to block specific YouTube channel 

Create Policy in Request Types Section

4. Click on Custom Settings to open Request Types Section.
Select custom setting to open Request types section under safesquid web interface to block specific YouTube channel 
6. Make sure the Global of Request Types Section is Enabled to True.
Enabled Global Request types as True to block specific YouTube channel 
7. Click on Request Types tab to create new policy.
Select Request types to create new policy to block specific YouTube channel 
8. Add YouTube Channels in Request Types Field. Create new Request Profile as T-SERIES CHANNEL in Added Request Types Field.
Create new Request Profile as T-SERIES CHANNEL in Added Request Types Field to block specific youtube channel 
9. You have to add Channel-ID and List-Id in File Field. You have already saved them in notepad for your reference. Refer to Channel-ID extraction and List-Id extraction.
 Here for T-Series channel we added (UCq-Fj5jknLsUf-MWSy4_brA|PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy) in File Field.
 Save the Policy created.
Add and save channel ID and List ID in policy to block specific youtube channel 

Create Policy in Access Profiles Section

10. Go to Access Profiles section.
Create policy in access profile section  to block specific YouTube channel 
11. Edit the Default Policy already created in SafeSquid named BLOCK YOUTUBE CHANNELS. Select T-SERIES CHANNEL in Request Types Field. Set Action Field as DO_NOT_BYPASS.
Edit T-series channel in request types field and set action field as DO not bypass to block specific youtube channel  
12. Save the policy created in Access Restrictions.
Save Block YouTube Channels policy to block specific YouTube channel  

Test the YouTube Channel Blocked

13.  Now try to open the YouTube Channel of T-Series https://www.youtube.com/channel/UCq-Fj5jknLsUf-MWSy4_brA.
 All the YouTube channel of T-series will be blocked and Access block Template will be shown.
Test result of  the YouTube Channel Blocked 
If you try to open any of the subsequent YouTube videos of T-Series Channel like https://www.youtube.com/watch?v=IgKdXLfxgQQ&list=PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy. 
It will be blocked and Access block Template will be shown.
Blocked and Access block Template will be shown
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 block every video 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 videos) of URL in the File field of Request Types Section.


    • Related Articles

    • Allow Specific YouTube Channel and its Playlist

      Client Scenario Ganpat University provides graduate programs to various colleges. Ganpat University distributes internet to their students. Ganpat University want to block entire www.youtube.com for their students, but wants some of the YouTube ...
    • YouTube API Integration With SafeSquid To Allow Specific YouTube Videos

      Overview YouTube is a video-sharing website which provides a wide variety of videos. YouTube video content categories organize channels and videos on YouTube website. YouTube has lots of videos for entertainment like comedy, music, movies, web ...
    • Block specific website through SafeSquid

      Client Scenario Stark tech is having 200 employees. Stark tech distributes all 200 employees into different 'User Groups'. Now Stark tech wants to blocked specific websites for defined 'User Group' say 'MANAGERS' Stark tech challenges are: All ...
    • Block Advertisements And Banners

      Client Scenario Ads are annoying and intrusive (64%) Ads are disruptive (54%) Ads create security concerns (39%) Ads affect load time and bandwidth usage (36%) Security was the main reason for blocking of Ads. Blocking of Ads include quicker loading ...
    • Provide Access To The Block Listed Website

      Overview When you are browsing through SafeSquid, one of the websites you are accessing is blocked due to configuration in SafeSquid. But you don't know why the website is blocked. Now you need to allow that website by changing the configuration in ...