- 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

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 not yet built the page you want to embed your video on, start with the tutorial on launching an ecommerce WordPress website and then come back here to add your video.
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 — including on high-converting dropship store designs that use video to explain their offer the moment a visitor lands.
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 in the URL youtube.com/watch?v=XkJUROD4TEQ the video ID is XkJUROD4TEQ. Before you embed your video make sure the content is worth watching — if you want a framework for scripting a video that actually converts viewers into buyers, the guide on 8 steps to creating a persuasive video that converts walks you through exactly how to structure it.
Your YouTube video ID is the part of the URL after watch?v=. It appears inside the embed code after /embed/. Copy it exactly — including capital letters — as the ID is case-sensitive.
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>Make sure your iframe includes autoplay inside the allow attribute. YouTube’s current embed code includes this automatically — but if you are working with an older embed you may need to add it manually. Without it some browsers will silently block autoplay even with the mute=1 parameter set.
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:
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.
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.
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.
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.Once your video is embedded and autoplaying, make sure the rest of your page is doing its job too. A great video on a poorly designed page still loses sales — the guide on finalizing your ecommerce site design covers exactly how to clean up your pages so they convert as well as your video does.
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 &:
Makes the video loop continuously from start to finish. Useful for background videos or product showcase loops.
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.
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.
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>Autoplay is most powerful when it is part of a complete marketing strategy — not just a technical trick. If you are building toward a store that generates consistent sales, understanding how influencer marketing and video work together for dropshipping is a natural next step for driving real traffic to the pages where your videos live.
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.

Leave a Reply