Securing Cloudflare Stream videos

Apply certain sharing restrictions to your Cloudflare Stream videos.


By default, videos on Cloudflare Stream are viewable by anyone at any time, until you delete the video. Users can view the source of the embed code in their browser and get a URL to the video to share it with others.

There are two options to secure your Cloudflare Stream video: by enabling signed URLs or restricting the domains that can embed the video.

Enable Signed URLs

Enabling Signed URLs adds an additional layer of security to your video as it restricts the available viewing period to your desired time frame.

To enable Signed URLs in the Cloudflare dashboard:

  1. Log in to your Cloudflare account.
  2. Select the domain for which you would like to secure a Stream video.
  3. Click the Stream icon in the dashboard.
  4. Scroll down and click on the video that you would like to secure.
  5. In the menu that appears, click the Require Signed URLs checkbox.
  6. Before using the embed code to add the Stream video to your site, you must create a signing key and add that key to the embed code in the Cloudflare dashboard.

If Require Signed URLs is enabled and you do not add the signed key to the embed code, your video will not play. You must create a signing key and add it to the Stream embed code prior to embedding the video on your site.

To learn how to enable signed URLs via the API, see the Stream documentation.

Restrict domains that can embed Stream video

You can also use the Cloudflare Stream dashboard UI to restrict the domain(s) that can embed your video.

To do this, follow Steps 1-4 above, then:

5. Enter the domain(s) that are allowed to embed the video separated by commas.

Cloudflare Stream video preview in the dashboard is disabled when setting domain restrictions. However, the video will play when embedded.

For more information, review these security considerations.

Related resources

Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.