• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Watchman Advisors

Watchman Advisors

Liberation - Life Purpose - Legacy

  • Home
  • Marketing Services
  • 1-on-1 Mentoring
  • Blog
  • Reviews
  • Support
  • Free Training
You are here: Home / Blog / How to Autoplay a YouTube Video on Your Website and Stop Losing Visitors Before They Watch

How to Autoplay a YouTube Video on Your Website and Stop Losing Visitors Before They Watch

January 21, 2026 by Trent Jessee Leave a Comment

What You Will Learn
  • Why autoplay on your marketing and sales videos increases conversions
  • The exact 3-step process to add YouTube autoplay to any website page
  • The updated code snippet that works in 2026 — including the mute parameter modern browsers now require
  • Why the old autoplay code stopped working and how to fix it
  • Optional parameters to control looping, related videos, and video controls
How to autoplay a YouTube video on your website — 2026 code snippet guide

When someone lands on your sales page or squeeze page the first few seconds are everything. If your marketing video is sitting there waiting for a click — many visitors will leave before they ever see your message. Autoplay removes that barrier. Your video starts the moment the page loads and your message plays immediately.

This guide covers the exact steps to make your YouTube video autoplay on any website page — with the updated code that works in 2026. If you have tried autoplay before and found it stopped working, there is an important reason for that which is covered below.

Why the Old Autoplay Code Stopped Working

If you set up YouTube autoplay a few years ago using only ?autoplay=1 and it no longer works — you are not alone. Around 2018 major browsers including Chrome, Firefox, and Safari introduced new autoplay policies. The short version: browsers now block autoplay with sound by default.

The fix is straightforward. You need to add mute=1 alongside autoplay=1. A muted video will autoplay reliably across all major browsers. If the visitor wants sound they can unmute it with one click. This is the standard approach used across professional marketing pages today.

Browser Autoplay Rule in 2026

Muted autoplay is always allowed by all major browsers. Autoplay with sound is blocked unless the visitor has already interacted with your site. For marketing and sales pages, always use autoplay=1&mute=1 together. Your video will start playing immediately and viewers can choose to unmute.

Step 1: Get Your YouTube Video Embed Code

Go to the YouTube video you want to embed on your page. Click the Share button below the video, then click Embed. YouTube will show you an iframe code that looks like this:

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

Copy that code. Your VIDEO_ID will be the unique string of letters and numbers for your specific video — for example XkJUROD4TEQ.

Where to Find Your Video ID

Your YouTube video ID is the part of the URL after watch?v=. For example in the URL youtube.com/watch?v=XkJUROD4TEQ the video ID is XkJUROD4TEQ. It appears inside the embed code after /embed/.

Step 2: Add the Autoplay Parameters to Your Embed Code

Find the src value inside your iframe code. It will look like this:

src="https://www.youtube.com/embed/VIDEO_ID"

Add ?autoplay=1&mute=1 directly after the video ID, like this:

src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1&mute=1"

Your full updated embed code should now look like this:

<iframe width="560" height="315"
  src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1&mute=1"
  title="YouTube video player"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen>
</iframe>
Important: The allow Attribute

Make sure your iframe includes allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" in the tag. The word autoplay inside this attribute tells the browser to permit autoplay for this specific embed. YouTube’s current embed code includes this automatically — but if you are working with an older embed you may need to add it manually.

Step 3: Paste the Code Into Your Website

Now paste your updated embed code into the HTML area of your website page or post. How you do this depends on your platform:

WordPress (Block Editor / Gutenberg)
Add a Custom HTML block to your page. Paste the full iframe embed code into it. Switch to Preview to confirm the video autoplays when the page loads.
WordPress (Classic Editor)
Click the “Text” tab (not “Visual”) in the page or post editor. Paste the iframe code directly into the HTML. Switch back to Visual to preview.
Landing Page Builders (ClickFunnels, LeadPages, Kartra, etc.)
Look for a Custom Code or HTML element in your page builder. Drag it onto your page and paste the iframe code inside it. Most page builders support this natively.
Shopify
Use a Custom Liquid section or the HTML editor within a page. Paste the iframe code directly. The mute=1 parameter is especially important on Shopify stores as the platform’s default video sections do not support autoplay parameters.

Optional Parameters to Customize Your Autoplay Video

Once your basic autoplay is working you can add additional parameters to control how the video behaves. Add these to your src URL separated by &:

loop=1
Makes the video loop continuously from start to finish. Useful for background videos or product showcase loops.
controls=0
Hides the YouTube player controls (play/pause bar, volume, etc.). Good for background or decorative videos — not recommended for sales videos where viewers need control.
rel=0
Limits the related videos shown at the end to videos from your own channel only. Keeps visitors on your content rather than getting pulled away by competitor videos.
start=30
Starts the video at a specific second. Replace 30 with your desired start time in seconds. Useful if you want to skip an intro and start at your key message.

Example combining multiple parameters — autoplay, muted, looping, with related videos limited to your channel:

src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1&mute=1&loop=1&rel=0"

Quick Reference — Complete Autoplay Embed Code

Replace VIDEO_ID with your actual YouTube video ID and paste this into your website’s HTML editor:

<iframe width="560" height="315"
  src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1&mute=1&rel=0"
  title="YouTube video player"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen>
</iframe>

If you would like personal help setting up your marketing videos or building a website that converts visitors into customers, book a free 30-minute call with Trent here.

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Search Watchman Advisors

Categories

  • Dropshipping
  • Finance
  • Investing
  • Marketing
  • Mentoring
  • Passive Income
  • Sales Skills
  • Success Principles
  • Tech

Want Help?
Book a Free 30 Minute
Breakthrough Call With Me Here

Company

  • Home
  • Marketing Services
  • 1-on-1 Mentoring
  • Blog
  • Reviews
  • Support
  • Free Training

Footer

Services

  • Consulting
  • WordPress Integration Services
  • Internet Marketing Management
  • Drop Shipping

Top Articles

  • Free List of 86 USA Dropshipping Suppliers in 2026
  • To Do List Member WordPress Plugin

Legal

  • Privacy Policy
  • Disclaimer
  • DMCA Notice
  • Copyright Notice
  • Anti-Spam
  • Affiliate Disclosure
  • Terms of Service
  • Refund Policy

Copyright © 2007 - 2026 Watchman Advisors, LLC