YouTube Embeds No Longer Working
-
I’m not sure if this happened with the recent update to 6.9 or something else, but YouTube embeds are no longer working for any of my sites. Also, all previous embeds have been turned into plain text on every post.
I’ve tried disabling all plugins and switching to the Twenty Twenty Five theme, no luck.
Disabling Cloudflare also didn’t help. Not sure what the issue is.
-
Hi there,
I tried to replicate the issue but was unable to reproduce it on a fresh WordPress installation. Could you please create a new website and try again to reproduce the issue? Also, ensure your server configuration matches the recommendations provided in the following link.


-
This reply was modified 3 months, 1 week ago by
Faisal Ahammad. Reason: updated broken image
I’m still working on reproducing the issue with a fresh install. So far I’ve noticed that it only occurs when using links in the embed block.
No issues with iFrame embeds.
Any ideas?
I tried to recreate this on my end and couldn’t find any problems. However, I’m also unsure what exactly you did.
I used the YouTube Embed Block on a new page in a fresh WordPress 6.9 installation with TwentyTwentyFive as the theme and no plugins activated, and entered the URL of a public YouTube video there. Immediately after clicking “Embed,” the video was already visible in the editor and online when I saved it.
What did you do differently?
Are the websites affected by this issue hosted on the same server, where security tools may be in use? Or perhaps a CSP header?
Are the websites affected by this issue hosted on the same server, where security tools may be in use? Or perhaps a CSP header?
Both websites are hosted on different servers. Similar stacks but one uses NGINX while the other uses Apache with NGINX as a reverse proxy.
Only one uses a CSP header which was set to allow content from YouTube. It worked before and the policy hasn’t been changed. No CORS, and all other security headers worked with YouTube embeds previously.
I found the conflict. It is the Memcached Object cache drop-in provided by https://wordpress.org/plugins/memcached-redux/
It may also be Memcached in whole that is preventing embeds, not the drop-in.
Are you aware of any changes to the WP core that are causing this?
-
This reply was modified 3 months, 1 week ago by
SomeRandomGuy.
No, WordPress itself doesn’t know anything about that. The plugin you mentioned is also six years old. It’s possible that it is no longer compatible with WordPress and the necessary server components. I would recommend not using it.
I decided to go ahead and drop Memcached in place of Redis, was long overdue anyways. The embeds still fail on both servers/sites with the currently maintained plugin/drop-in.
https://wordpress.org/plugins/redis-cache/
Are you able to reproduce this? My test environment did.
So, it was looking like the
X-Content-Type-Options: nosniffheader which is implemented on both sites was causing oEmbed to fail and that the object cache was not the real culprit. After disabling the header, I got the videos to embed, but they stopped working again.Browser console shows that proxied oEmbed requests are failing and returning a 404.
For example:
domainname.tld/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTRikFgD2TyY%26themeRefresh%3D1&_locale=user
So, I disabled my CDN (Cloudflare) and disabled any caching plugins to see if that made a difference, of which it didn’t.
I also tested with no Referrer policy as well. Still nothing.
Edit: Removing proxy from the URL works.
-
This reply was modified 3 months, 1 week ago by
SomeRandomGuy.
UPDATE: Been pulling my hair out trying to figure out how to fix this since I have nearly a thousand articles written and quite a lot of them now have dysfunctional YouTube embeds.
Steps taken
- Disabling all plugins
- Switching to default Twenty Twenty Five theme
- Disabling DNS (Cloudflare)
- Removing security headers
- Disabling all caching plugins
- Disabling object cache and backend (Memcached/Redis)
- Clearing server cache (NGINX – Apache/NGINX)
- Reinstalling WordPress 6.9
- Downgrading to WordPress 6.8
- Using third party plugins (Such as Better YouTube Embed Block and EmbedPress) which do work
I was able to reproduce the issue with my old Memcached drop-in on a test environment but not with Redis, although the issue persists on the production environment with Redis.
For some reason, the embeds were restored for a moment when removing the X-Content-Type header but then they failed again and I haven’t been able to reproduce the results again either. This issue does not occur on the test environment.
The web console/developer tools show that the oEmbed API is failing to retrieve proxied content for the embeds from YouTube and removing proxy from the URL does allow it to show up, but this can’t be implemented sitewide or at the very least, I don’t know how as the proxy seems to be ingrained in WordPress’s core.
Search engines pull up some similar events of this happening with older WordPress versions which were resolved with updates or figuring out where a conflict was, although there’s not much else to go on.
Example 1:
https://wordpress.org/support/topic/not-allowed-to-make-proxied-oembed-requests/
Example 2:
https://siteorigin.com/thread/unable-to-add-video-could-be-wp-json-rest-api/
If anyone with more skills can help a brother out, that’d be great. Otherwise, I think a bug submission with Gutenberg on GitHub is the right step.
Will update if I find a solution.
-
This reply was modified 3 months, 1 week ago by
SomeRandomGuy.
-
This reply was modified 3 months, 1 week ago by
SomeRandomGuy.
If you want to report this as a bug, a reproducible scenario is required that a developer can use to investigate the issue. This is relatively difficult due to the individual system you seem to have. However, if you are able to reproduce the problem in a completely new WordPress environment, possibly even on a different host without any caching headers, that would be a start.
It would be even easier if the problem could be reproduced in the playground: https://playground.wordpress.net – but my tests there always work without any problems.
The path would then be here: https://core.trac.wordpress.org/newticket
Incidentally, the URL of the oEmbed proxy is set here: https://github.com/WordPress/WordPress/blob/master/wp-includes/js/dist/core-data.js#L4431 and processed from here: https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-oembed-controller.php#L63
By the way, these are the HTTP headers from one of my test systems where it works without any problems. “x-content-type-options” is also included here.
HTTP/2 200
server: nginx/1.18.0
date: Fri, 26 Dec 2025 22:16:39 GMT
content-type: application/json; charset=UTF-8
x-robots-tag: noindex
x-content-type-options: nosniff
access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
x-wp-nonce: 649784c743
allow: GET
expires: Wed, 11 Jan 1984 05:00:00 GMT
cache-control: no-cache, must-revalidate, max-age=0, no-store, private
X-Firefox-Spdy: h2Best I have right now is the error message.
{"code":"rest_forbidden","message":"Sorry, you are not allowed to make proxied oEmbed requests.","data":{"status":401}}There are some scenarios in the past that may help the developers.
https://github.com/WordPress/gutenberg/issues/22104
https://wordpress.org/support/topic/twitter-oembed-error-after-wp-6-4-update/
Yes, the consensus seemed to be that it was/is a core issue, not Gutenberg.
https://github.com/WordPress/gutenberg/issues/51119
Ticket was issued, of course this is related to X, which works fine for me now.
https://core.trac.wordpress.org/ticket/59142
I can try the solution that worked at https://support.advancedcustomfields.com/forums/topic/youtube-oembed-field-not-working/ regarding YouTube.
Although not sure it is still relevant or applicable to my setup.
I will try my best to reproduce it, although, as you said, the playground doesn’t let me alter web server/DNS/headers/etc. which could certainly be the reason.
The message
Sorry, you are not allowed to make proxied oEmbed requests.
only appears if the currently logged-in user does not have permission for “edit_posts”. So either your permissions are set incorrectly (in which case you should not be able to edit any posts) or your user’s session is not opened at all when the request is made. The latter can also happen if the wrong protocol (
httpinstead ofhttps) is used or the security token for the request cannot be processed. There may be several reasons, but it definitely has to do with the session.So, apparently, even on a valid request, that response is sent. The test site has the same output but embed is successful. It’s the admin account and both have full permissions to edit posts. Not sure if there is some other kind of misconfiguration.
The only difference I can see is that the failed request results with a 404. The proxied URL is still processed over https however isn’t covered by the SSL certificate.
Ex.
Successful Embed
https://domain.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZJ4DLIuxjvw&_locale=user still responds with
{"code":"rest_forbidden","message":"Sorry, you are not allowed to make proxied oEmbed requests.","data":{"status":401}}Failed Embed
https://domain.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZJ4DLIuxjvw&_locale=user responds with
The webpage at https://domain.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZJ4DLIuxjvw&_locale=user might be temporarily down or it may have moved permanently to a new web address.and
{"code":"oembed_invalid_url","message":"Not Found","data":{"status":404}}Test site is running the same headers.
It’s got to be something blocking the request from reaching the endpoint?
Not sure how to verify the security token.
-
This reply was modified 3 months ago by
SomeRandomGuy.
-
This reply was modified 3 months ago by
SomeRandomGuy.
-
This reply was modified 3 months ago by
SomeRandomGuy.
-
This reply was modified 3 months ago by
SomeRandomGuy.
The proxied URL is still processed over https however isn’t covered by the SSL certificate.
Why not? That could be precisely why it fails. It may be related to the browser, which does not allow the session for security reasons because it is an unsecure connection.
The URL not being covered by the certificate magically resolved itself. I’m not sure what was causing it. No mixed content as far as I can see.
Still, the embeds refuse to work.
-
This reply was modified 3 months, 1 week ago by
You must be logged in to reply to this topic.