YouTube Video Embed Not Working or Showing an Error on Your Website
The embedded video is blank, blocked or says unavailable. Check embedding permissions, the link and privacy settings.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Video settings
- The video must be Public or Unlisted. Private videos cannot be embedded for visitors.
- In YouTube Studio, make sure Allow embedding is on.
- Age-restricted or some music-rights videos may block embedding.
The embed code
Use the Share > Embed code, or an address of the form https://www.youtube.com/embed/VIDEO_ID. A normal watch link (/watch?v=) does not work inside an iframe.
Page problems
- Make sure the iframe is not blocked by your own security header. See our iframe guide.
- Fix mixed content. See our mixed content guide.
- Cookie or consent tools may block embeds until visitors agree.
Speed
Load embeds lazily to keep pages fast. See our vitals guide.
Related guides
- WordPress XML Sitemap Gives 404 or Is Not Generating
- Changed the WordPress Address (URL) and Now the Site or Login Is Broken
- wp-config.php Explained: The Settings That Matter and How to Edit Them Safely
- WordPress White Screen of Death: How to Fix a Blank Page
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.