YouTube Embeds
YouTube Embeds refers to placing YouTube's video player on an external website — a blog, news article, or landing page — using an <iframe> embed code, instead of only linking out to the video on youtube.com. Embed codes can be customized with URL parameters (autoplay, start time, captions, related-video behavior, and more), and creators can control whether their videos can be embedded at all.
For creators, the practical questions usually aren't about the HTML — they're about growth and money: does an embedded play count as a real view, does it count toward watch time and monetized playbacks, and can someone else profit from your video by embedding it on their site? This entry covers both.
What Is a YouTube Embed?
An embed is a small <iframe> window that streams the YouTube player directly from YouTube's servers and displays it inside another page. The video itself isn't copied or re-hosted — the embedding site just loads YouTube's player, which is why embedding a video doesn't use the embedder's own bandwidth or storage.
A basic embed code 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>
Google requires embedded players to be at least 200×200 pixels, and recommends 16:9 players be at least 480×270 pixels so the controls display properly — this also matters for ad eligibility (see "Do Embedded Views Count Toward Monetization?" below).
How to Embed a YouTube Video (Step-by-Step)
- On a computer, open the YouTube video or playlist you want to embed.
- Click Share.
- Select Embed from the share options.
- Copy the HTML code shown in the pop-up box.
- Paste the code into your website's HTML — in a text/HTML/code block, not a visual/rich-text editor (visual editors will often strip the
<iframe>tag). - If you're on a managed network, ask the network administrator to allowlist
youtube.com(oryoutube-nocookie.comif using Privacy-Enhanced Mode — see below) in the firewall, or the embed may fail to load for users on that network.
For a responsive player that scales to any screen width, wrap the iframe in a container div and use CSS (padding-bottom: 56.25% for 16:9 video) rather than fixed pixel width/height values.
YouTube Embed Parameters Reference
Parameters are appended to the embed URL as a query string, e.g. https://www.youtube.com/embed/VIDEO_ID?autoplay=1&start=90. The first parameter follows a ?; additional parameters are joined with &.
| Parameter | Values | What it does | Status |
|---|---|---|---|
autoplay |
0 / 1 (default 0) |
Starts playback automatically on load. Most browsers block autoplay with sound, so it's almost always paired with mute=1. |
Active |
mute |
0 / 1 |
Mutes the player on load. Not in Google's official parameter list, but works reliably and is the standard workaround for browser autoplay-with-sound restrictions. | Undocumented but functional |
start |
seconds (integer) | Begins playback at a specific timestamp. | Active |
end |
seconds (integer) | Stops playback at a specific timestamp, measured from the start of the video. | Active |
controls |
0 / 1 (default 1) |
Shows or hides the player's control bar. | Active |
loop |
0 / 1 |
Loops content. For a single video, loop=1 alone does nothing — you must also set playlist=VIDEO_ID using the same video's ID. |
Active (with caveat above) |
rel |
0 / 1 (default 1) |
Historically hid related videos at the end of playback when set to 0. Since September 25, 2018, this no longer disables related videos — rel=0 now only limits end-screen suggestions to videos from the same channel. |
Changed 2018 — commonly misreported |
cc_load_policy |
1 |
Turns captions on by default. | Active |
cc_lang_pref |
ISO 639-1 code (e.g. fr) |
Sets default caption language (use with cc_load_policy=1). |
Active |
hl |
ISO 639-1 code or locale | Sets the player interface language. | Active |
disablekb |
0 / 1 |
Disables keyboard shortcuts (spacebar, arrow keys, etc.). | Active |
fs |
0 / 1 (default 1) |
Hides the fullscreen button when set to 0. |
Active |
iv_load_policy |
1 / 3 |
Shows (1, default) or hides (3) video annotations. |
Active |
list / listType |
playlist ID / playlist or user_uploads |
Loads a playlist or a channel's uploads instead of a single video. | Active |
playsinline |
0 / 1 |
Controls inline vs. fullscreen playback on iOS. | Active |
origin |
your domain | Security parameter required when using the IFrame Player API (enablejsapi=1). |
Active |
enablejsapi |
0 / 1 |
Allows the player to be controlled via JavaScript (IFrame Player API). | Active |
color |
red / white |
Sets the progress-bar color. | Active |
widget_referrer |
your domain | Identifies the true traffic source in YouTube Analytics when the player is embedded inside a widget that's itself embedded elsewhere. | Active |
showinfo |
— | Used to toggle title/uploader info before playback. | Deprecated since 2018 — removed from Google's docs, has no effect |
modestbranding |
— | Used to hide the YouTube logo. | Deprecated since August 2023 — has no effect |
Fact-check note: A lot of embed guides still list rel=0 as "hides related videos" and modestbranding=1 as "removes the YouTube logo." Neither is true anymore. Related-video suppression ended in 2018, and modestbranding stopped doing anything in 2023. If you copy embed code from an older tutorial, don't expect these two to work.
Privacy-Enhanced Mode (youtube-nocookie.com)
Swapping the domain in the embed src from youtube.com to youtube-nocookie.com turns on Privacy-Enhanced Mode:
<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" ...></iframe>
What it actually changes: a view played in Privacy-Enhanced Mode isn't used to personalize the viewer's YouTube browsing experience or the ads they see, either inside that embed or afterward on YouTube itself. If ads run on the video, they'll be non-personalized.
What it doesn't change: this is not a zero-tracking mode. YouTube's own player still communicates with Google's servers when the page loads and when the viewer presses play (including sending the viewer's IP address), and normal cookies are set once playback starts. If the viewer clicks through to YouTube from the embed, standard tracking resumes there. Treat Privacy-Enhanced Mode as a meaningful reduction in personalization, not a complete privacy or GDPR solution on its own.
If your site or app is itself child-directed, you're required to self-designate it through Google's compliance tools regardless of which domain you embed from — this turns off personalized ads and disables some embedded-player features, and is a separate requirement from the video's own Made for Kids status.
Do Embedded Views Count Toward Analytics and Monetization?
Short answer: yes, largely the same as any other playback — with one specific exception.
- View count: YouTube's own guidance states that embedded videos which are autoplayed do not increment the video's view count. A view counts when a viewer actively engages with playback, not simply because the page loaded with the video auto-running.
- Watch time: Watch time accumulated from a properly embedded, public video counts toward the channel's total watch time, including YouTube Partner Program eligibility hours — the same as watch time from youtube.com or the mobile app.
- Traffic source reporting: Plays from an embedded player show up in YouTube Analytics as their own traffic source category, distinct from search, suggested videos, or direct/channel traffic — useful for seeing how much of a video's performance comes from being embedded elsewhere versus watched on YouTube.
- Ad monetization: Embedded videos "honor the same ad enablement settings as videos on youtube.com" — if ads are turned on for a video, they can also show on embedded plays of it, counted as monetized playbacks the same as on-platform plays. Requirements include a reasonably sized player (200×200px minimum) and standard click-to-play embedding rather than scripted/forced autoplay of ads.
- Who gets paid: This is the most commonly misunderstood part. Only YouTube and the video's owner earn ad revenue from ads shown on an embed — the website where the video is embedded earns nothing from those YouTube ads. A site owner who wants to make money from an embedded video needs to run their own separate ads or sponsorships around it; embedding someone else's monetized video does not entitle the embedding site to a cut.
Can Creators Disable Embedding?
Yes. To stop other sites from embedding a specific video:
- Sign in to YouTube Studio.
- Select Content from the left menu.
- Next to the video, open Details.
- Click Show more.
- Uncheck Allow embedding.
- Click Save.
This is an all-or-nothing switch per video — there's no setting to allow embedding everywhere except specific sites, and no way to allow the embed but block only the ads on it. If embedding is disabled, viewers on third-party pages see a message that playback has been disabled by the video owner and can only watch on YouTube itself.
Embedding Restrictions to Know
- Private videos can't be embedded or played by the public at all, even with the embed code.
- Unlisted videos can be embedded and played by anyone who has the link or embed code, even though the video won't appear in search or on the channel page — a distinction that trips up creators who assume "unlisted" behaves like "private."
- Age-restricted videos cannot be watched inside a third-party embed. Clicking play redirects the viewer to youtube.com, where they must sign in and verify they're 18 or older.
- Made for Kids videos carry their contextual (non-personalized) ad settings into any embed of them, since embeds inherit the video's own youtube.com ad settings.
- Missing HTTP Referer: YouTube's terms require the embedding page to send an HTTP Referer header. Without one — such as opening the embed URL directly in a browser address bar rather than inside a page — viewers hit a blocked-playback "error 153" screen, with an option to click through and watch on YouTube.
Creator finances handled by someone who gets YouTube.
Tax prep and bookkeeping built for YouTubers — every income stream, every deduction, done right.
Tax Services for Creators Bookkeeping for CreatorsFAQ
Does embedding my video on another website hurt my YouTube views?
No — it's a genuine playback source. Watch time and (for non-autoplayed plays) view count from embeds add to your channel totals the same as views from youtube.com, and they show up separately in your traffic source reports.
Can I stop other people from embedding my videos?
Yes. In YouTube Studio, open the video's Details, click Show more, and uncheck "Allow embedding," then save. It applies to the whole video everywhere, not select sites.
Do I earn extra money when someone embeds my monetized video on their blog?
You earn the same ad revenue share you'd earn from any other watch — YouTube and you split it. The blog or site owner hosting the embed does not get a cut of those YouTube ad earnings.
What does youtube-nocookie.com actually do?
It reduces personalization: the view won't be used to personalize the viewer's YouTube experience or ad targeting, and any ads served will be non-personalized. It does not eliminate all data being sent to Google, so don't rely on it alone for full privacy or cookie-consent compliance.