Fix Broken YouTube Auto Embed with WordPress

Robin ScottWordPress Tutorials1 Comment

On WordPress blogs, there has for a number of versions been a really handy trick which automatically embeds YouTube videos when you post the URL on it’s own on a new line.

Traditionally(!) this was a real time saver, as it allowed busy WordPress webmasters the opportunity to grab YouTube URLs and simply paste them where they wanted them in the website.

Even better, the Settings > Media options allowed us to style how the videos look on all pages in one go – much better than having to go in and update everything in one go, and also pretty cool for those on a fluid page width, as we can set “max height” or “max width” and have the videos resized to fit the user’s browser!

But recently, automatic YouTube embeds have become broken. 🙁 Looking around on the WordPress support forum is not that much help, either, because most of the best answers in Google recommend installing (yet another) plugin to fulfill this relatively simple task.

The Problem? HTTPS!

YouTube switched from using “http://” to using “https://” not so long ago. WordPress does not recognise these HTTPS addresses as being videos.

The Solution?!

Simple! Copy the YouTube URL as normal, then simply remove the “s” in “https” and you should find that you’ve now, once again, got a working video embed from YouTube!

No fuss. No worry. No additional plugins adding cruft to your database and files. Perfect solution, in other words.

Or, simply wait for the team who helps with WordPress to roll the https into it’s code, in the next version or two!

One Comment on “Fix Broken YouTube Auto Embed with WordPress”

Leave a Reply

Your email address will not be published. Required fields are marked *