Skip to main content

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.

T-Series Channel URL: https://www.youtube.com/channel/UCq-Fj5jknLsUf-MWSy4_brA

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

  1. 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.

T-Series Channel subsequent URL: https://www.youtube.com/watch?v=IgKdXLfxgQQ&list=PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy

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.

T-Series Channel subsequent URL: https://www.youtube.com/watch?v=IgKdXLfxgQQ&list=PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy

List-ID: PL9bw4S5ePsEE2KMw53rY40A00t4I-otqy

Extract List-ID from any of the subsequent YouTube Channel to block specific YouTube channel

  1. 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

  1. 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

  1. Make sure the Global of Request Types Section is Enabled to True.

Enabled Global Request types as True to block specific YouTube channel

  1. Click on Request Types tab to create new policy.

Select Request types to create new policy to block specific YouTube channel

  1. 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

  1. 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

  1. Go to Access Profiles section.

Create policy in access profile section to block specific YouTube channel

  1. 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

  1. Save the policy created in Access Restrictions.

Save Block YouTube Channels policy to block specific YouTube channel

Test the YouTube Channel Blocked

  1. 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.

Feedback