How to Allow a Single YouTube Video and Block All Other Videos

How to Allow a Single YouTube Video and Block All Other Videos

Created On 09/25/18 17:36 PM - Last Modified 11/10/20 22:05 PM

If you are wanting to allow one YouTube video and block all other YouTube videos, I will explain how to accomplish this.

  • Any PAN-OS.
  • Palo Alto Firewall.
  • SSL decryption configured.
  • URL Filtering configuration.


How to Allow a Single YouTube Video and Block All Other Videos

​​​​​​In order to get this to work correctly, you need the following:

  1. SSL decryption needs to be enabled.
  2. QUIC protocol needs to be disabled because it bypasses SSL decryption.

In this example, we only want to allow just one of the YouTube videos: and block all of the other videos on YouTube. Please follow these steps to accomplish this.


  1. Create a new Custom URL Category to allow only the wanted YouTube video(s).
Get to your URL filtering policy inside of the WebGUI > Objects > Custom Objects > URL Category.
Then click Add to create a new Custom URL Category.
A new window will pop up. Inside that new window, Give it a Name (youtube-allowed) and Description if you like, and then click Add again and put in the one YouTube URL to be allowed: (No HTTPS:// needed), Then hit OK.
Custom URL Screen for the 1 video that you want to allow.
  1. Next, you will want to create a new second URL category in order to represent the rest of the YouTube videos.
  • While still inside that URL Category window, click Add again, and then put in a name (youtubeWatch) and description if needed
  • Then insert the following URL under Sites: (with no video number to represent all videos).
  • Click OK.
Custom URL Screen for all YouTube videos

Note: To block the videos for mobile devices, add these two URLS in the block cateogry: .*  and .*
  1. Now onto the Firewall rules needed. You first need to block the QUIC protocol. Please create a new rule in your rulebase to Deny outbound protocol "quic".
     Rule blocking QUIC protocol
  1. Please verify that you have a decryption policy of type SSL Forward Proxy. The decryption policy should cover youtube traffic. One way is to define a decryption policy for the "streaming-media" URL category. Please see the following article about configuring SSL Decryption: How to Implement and Test SSL Decryption or see the SSL Decryption Resource List on Configuration and Troubleshooting.
  1. Next are the 2 rules needed to allow and deny the traffic.
    The first rule will be used to allow youtube-base and google-base apps for the allowed youtube custom url category - "youtube-allowed".
    The second rule will then deny the same youtube-base and google-base apps for the rest of youtube custom url category - "youtubeWatch". 
2 rules showing allow and then block of Youtube
  1. Commit and test.

When testing, you should be able to visit and the links should appear to be active. But when you click on any video (other than the allowed video) you should get a block screen.

Block screen when trying to view a blocked youtube video

Otherwise, if you launch the allowed youtube link, you should be able to watch the video withtout issues.

Screen showing the allowed YouTube video


Additional Information
Note: There appear to be some changes in the youtube streaming app which may cause the above solution not to work. If the above steps do not work add the following

Step 1 - add * to the custom URL
Step 5 - add youtube-streaming to the security policy app (Allow Policy)

  • Print
  • Copy Link

Choose Language