The FBI says over 1,000 hacked WordPress sites hid ransomware lures in Google. You can open yours and see a normal page.

Details

Troubleshooting

YouTube error 153 (video player configuration error): how to fix it

YouTube error 153 means the embed sent no referrer. Fix it by setting Referrer-Policy to strict-origin-when-cross-origin and allowing YouTube in your CSP.

Last updated ( published )

Error 153 means YouTube could not verify your page as a referrer. On WordPress we usually see a strict Referrer-Policy from a security plugin, the CDN, or the theme. The video ID is often fine anyway. Set Referrer-Policy to strict-origin-when-cross-origin, allow YouTube in CSP frame-src, and clear the page cache.

What is YouTube error 153?

YouTube shows this when the embed fails: “This player cannot be embedded with referrerpolicy=“no-referrer”. Remove the referrer policy from your iframe or use referrerpolicy=“origin”.”

Error 153 is YouTube’s “Video player configuration error.” On WordPress it usually means the player did not get a usable referrer. The video ID can be correct and the player still fails. Security headers from Security Ninja or another plugin are a common cause.

Quick checklist

Work through these in order:

  1. Referrer-Policy on the page: use strict-origin-when-cross-origin, not no-referrer or same-origin.
  2. CSP frame-src / child-src: allow https://www.youtube.com, https://www.youtube-nocookie.com, and https://*.ytimg.com.
  3. Iframe referrerpolicy: add referrerpolicy="strict-origin-when-cross-origin" on the YouTube <iframe>.
  4. Conflicts: temporarily disable other security or caching layers if headers look correct but the player still fails.

For header setup in WP Security Ninja, see security headers.

Understanding Error 153

YouTube’s embedded player expects a usable HTTP Referer (and related header policy) so it can validate the embed. Strict referrer policies, Content Security Policy gaps, or odd iframe settings can trigger Error 153 on YouTube in WordPress even when the video ID is fine.

How to check for YouTube embed issues

Inspect the page’s HTTP headers and the embed HTML.

1. Inspect HTTP Referrer-Policy

The Referrer-Policy header controls what referrer data is sent. Too strict, and YouTube cannot validate the embed.

  1. Open the page that shows Error 153.
  2. Right-click and choose Inspect.
  3. Open the Network tab, then refresh.
  4. Select the main HTML document request (your domain).
  5. Under Response Headers, find Referrer-Policy.

Problematic: no-referrer or same-origin.
Recommended: strict-origin-when-cross-origin (YouTube’s usual recommendation; also the WP Security Ninja default for new installs and the setup wizard).

2. Check for X-Frame-Options

X-Frame-Options stops pages from being framed. It is less often the sole cause of Error 153, but a harsh setting on embed-heavy pages can add friction.

  1. Use the same Network / Headers steps as above.
  2. Look for X-Frame-Options in Response Headers.

Problematic: DENY or SAMEORIGIN on pages where third-party iframes must load.
Configure carefully when you mix security headers with embeds.

3. Review Content Security Policy (CSP)

If CSP is on (via WP Security Ninja or elsewhere), missing YouTube hosts in frame-src / child-src will block the player.

  1. Same Headers inspection as above.
  2. Find Content-Security-Policy.
  3. Check frame-src, child-src, and if needed script-src and img-src.

Allow YouTube hosts, for example:

  • frame-src / child-src: https://www.youtube.com https://www.youtube-nocookie.com https://*.youtube.com https://*.ytimg.com
  • If you use the IFrame API: script-src includes https://www.youtube.com https://*.ytimg.com
  • Thumbnails: img-src includes https://i.ytimg.com https://*.ytimg.com

4. Examine the YouTube embed code

The iframe may be missing referrerpolicy.

  1. Right-click the player area and Inspect.
  2. Find the YouTube <iframe>.

Add referrerpolicy="strict-origin-when-cross-origin":

<iframe
  src="https://www.youtube.com/embed/VIDEO_ID"
  referrerpolicy="strict-origin-when-cross-origin"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"
  allowfullscreen
  loading="lazy"
  width="560" height="315">
</iframe>

Common solutions

Adjust Referrer-Policy

  • WP Security Ninja: the default for new installs and the setup wizard is strict-origin-when-cross-origin. If an older saved setting still uses same-origin or no-referrer, change Referrer-Policy under Security Headers / Fixes to strict-origin-when-cross-origin (or another policy that still sends a usable cross-origin referrer).
  • Apache .htaccess:
<IfModule mod_headers.c>
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>
  • Nginx:
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
  • HTML meta (less precise, sometimes enough):
<meta name="referrer" content="strict-origin-when-cross-origin" />

Update the YouTube embed

  • Add referrerpolicy="strict-origin-when-cross-origin" on the iframe.
  • Try youtube-nocookie.com in the src (www.youtube-nocookie.com/embed/...). That privacy domain often clears referrer-related failures.

Configure CSP

Whitelist YouTube in frame-src and child-src (and related directives if you use the API). Adjust CSP in WP Security Ninja or your host config to match the hosts listed above.

Check conflicting plugins or services

Temporarily disable other security plugins, caching plugins, or CDN/WAF layers (for example Cloudflare) one at a time. If one of them “fixes” Error 153 when off, configure that layer to allow YouTube embeds instead of leaving security off.

Work through headers first, then the iframe, then CSP. That order usually finds the cause of YouTube embed error 153 without guessing.

Common questions

What is error 153 on YouTube? +

Error 153 is YouTube's Video player configuration error. It appears when an embedded video cannot verify where it is being played, usually because the page sends no referrer. The video and its ID are fine. On WordPress the usual cause is a strict Referrer-Policy header set by a security plugin, a CDN or the theme.

How do I fix YouTube error 153 on an embedded video? +

Set the page's Referrer-Policy header to strict-origin-when-cross-origin, allow youtube.com, youtube-nocookie.com and ytimg.com in your Content Security Policy frame-src, and add referrerpolicy="strict-origin-when-cross-origin" to the iframe. Then clear your page cache and any CDN cache, and test in a private window. This fixes most cases we see in WordPress.

What does "This player cannot be embedded with referrerpolicy=no-referrer" mean? +

It means your page or the iframe tells the browser to send no referrer, and YouTube refuses to play without one. Remove referrerpolicy="no-referrer" from the iframe, or change the Referrer-Policy header to strict-origin-when-cross-origin. YouTube's own message suggests "origin" as another option.

Can a security plugin cause YouTube error 153 in WordPress? +

Yes. Security headers from any security plugin, including Security Ninja, can set a strict Referrer-Policy. In Security Ninja, new installs and the setup wizard use strict-origin-when-cross-origin, which works with YouTube. If you changed it to no-referrer or same-origin, switch it back in the security headers settings .

Is error 153 a problem with the video itself? +

No. The video ID, privacy setting and upload are usually fine. If the same video plays on youtube.com but not on your site, the cause is how your page sends headers or how the iframe is set up. Check the Referrer-Policy and Content Security Policy first.

Still stuck? Get help or contact us.

Larger screenshot

Enlarged image