Forum Moderators: phranque

Message Too Old, No Replies

Embedded Youtube videos, "video unavailable"

         

csdude55

11:30 pm on Dec 15, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've had people embedding Youtube videos on my site for years. They simply provide the link, and my script automagically embeds it.

Suddenly, about 90% of my embedded videos simply aren't embedding; they just show:

Video unavailable
Watch on YouTube

This is the exact code I'm using, which is identical to what I see when I view the video on Youtube then Share > Embed:

<iframe width="560" height="315" src="https://www.youtube.com/embed/EwKc05_6ItY?si=THVh7s4Xg_zfQ5fa" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>


I had someone in another state verify that they're seeing the same thing, so it's not my computer or home internet provider. I tried disabling Cloudflare, too, and that had no impact (although I didn't change the DNS to block proxying).

Any thoughts?

csdude55

5:17 am on Mar 28, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For the sake of posterity, I figured out the problem! When I un-proxied Ezoic and Cloudflare, the videos immediately started working again :-O

I haven't figured out a way to fix the problem yet while having the sites proxied, but at least I have somewhere to start. I'll update again if I figure something out.

tangor

7:05 am on Mar 28, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Please let us know what you discover on this great adventure!

csdude55

7:46 pm on Apr 18, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Update: a guy on Reddit discovered that the issue is related to Ezoic pushing a "same-origin" Referrer policy! Which YouTube doesn't like, because it keeps them from seeing where the video is embedded.

I manually added this meta tag to the header, and it fixed the problem immediately:

<meta name="referrer" content="no-referrer-when-downgrade">

For future readers, here is an explanation of the different policies:
[developer.mozilla.org...]

tangor

7:16 am on Apr 19, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks! I always like to see these problem posts end with real solutions!

engine

7:29 am on Apr 19, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I've also seen many more "not available in your area" responses on sites with embedded YouTube videos.

mack

4:14 pm on Apr 23, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Glad you were able to get this resolved!

I will add this in case anyone later finds this post and is looking for a possible solution. Within YouTube Creator Studio there is an option to disable embedding. If a creator has this unwittingly set it would also cause the video to be blocked from playing.

Mack.