Fix a video iframe blocked by Content Security Policy

Updated: November 18, 2026

If the watch page opens but the embedded player is blocked with a Content Security Policy message, inspect the page containing the iframe. The restriction may be on your website rather than the video file.

Identify which page is rejecting the frame

Open developer tools on the parent page and reload. Record the blocked URL and directive named in the console. A frame-src restriction controls which origins that page can load in frames; if absent, another applicable fallback directive may apply.

Merge the embed origin into your existing policy

This is one directive fragment, not a complete replacement security header. Keep your other allowed frame origins and all unrelated directives. Ask the person maintaining your site configuration to merge it in a staging environment first.

frame-src 'self' https://dembed.cc;

Retest the full embedding chain

  1. 1Confirm the iframe src uses the intended HTTPS embed URL, not the watch-page URL.
  2. 2Reload and check the console again. Multiple policies can remain restrictive; adding a second permissive header does not erase the first.
  3. 3Test other embedded widgets and, when your site is inside another frame, check that outer page too.

When frame-src is not the answer

A provider refusing embedding through frame-ancestors is a different direction of control. Do not remove your whole CSP or broaden every source to solve one message. If direct playback also fails, investigate that separate failure first.

Primary reference

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-src

Frequently asked questions

No. The fragment names that origin plus your own; preserve any other origins your site actually needs.

You might also like

Host your videos for free and earn from every view

Create your account in under a minute, upload your first video and start earning from day one.