YouTube Embeds

To embed a YouTube video, click Share under it, then Embed, and paste the HTML code into your site; swap youtube.com for youtube-nocookie.com for privacy-enhanced mode, add ?start= to begin at a second, and creators can stop others embedding by unticking Allow embedding in YouTube Studio.

To embed a YouTube video on a website, open it on a computer, click Share, then Embed, copy the HTML code, and paste it into your page (Embed videos & playlists). For privacy-enhanced mode, change https://www.youtube.com in that code to https://www.youtube-nocookie.com: views in it are not used to personalize the viewer's YouTube or ads. Add ?start=90 to begin at 1:30, and autoplay=1 to start by itself, though autoplayed embeds do not add to the view count. Creators who do not want their videos on other sites can untick Allow embedding in YouTube Studio.

Quick facts

Get the code Share > Embed under the video (computer)
Video embed address https://www.youtube.com/embed/VIDEO_ID
Playlist embed address https://www.youtube.com/embed/videoseries?list=PLAYLIST_ID
Privacy-enhanced mode https://www.youtube-nocookie.com/embed/VIDEO_ID
Start at a time ?start=90 (seconds)
Stop at a time end=120 (seconds)
Autoplay autoplay=1; autoplayed embeds do not count views
Captions on cc_load_policy=1, language with cc_lang_pref=fr
Turn off embedding Studio > Content > Details > Show more > untick Allow embedding
Missing referrer "Error 153"

Sources: Embed videos & playlists, YouTube Help, and YouTube embedded player parameters, Google for Developers, read Nov 6, 2026. The playlist and nocookie addresses were loaded in a test page on Nov 6, 2026.

How do I embed a YouTube video?

  1. On a computer, open the video or playlist on youtube.com.
  2. Click Share under the video.
  3. Click Embed.
  4. Copy the HTML code from the box (tick Start at first to begin at a moment).
  5. Paste it into your page's HTML, or into a website builder's embed or HTML block.

Many site builders and blog tools also turn a plain YouTube link into a player when you paste it on its own line. The right-click menu on youtube.com's player has Copy embed code too.

The code is an iframe whose address is https://www.youtube.com/embed/ plus the video ID. Options go after a ? and are joined with &, for example https://www.youtube.com/embed/VIDEO_ID?start=90&cc_load_policy=1.

What is youtube-nocookie.com?

Privacy-enhanced mode is the same player on a different domain, www.youtube-nocookie.com. YouTube Help says a view in it does not personalize the viewer's YouTube experience, inside the embed or later on youtube.com, any ads it shows are non-personalized, and the view is not used to target ads elsewhere. It works on websites only, not in apps. It does not cover what happens if the viewer clicks through to another site (Embed videos & playlists).

To use it, change https://www.youtube.com/embed/ to https://www.youtube-nocookie.com/embed/ in the code; nothing else changes. Network administrators need to allow youtube-nocookie.com through firewalls, as well as youtube.com.

George Vanous, who runs the Freedom! network, recommended it in a Jul 5, 2020 video for every YouTube embed, explaining that YouTube made it for privacy laws such as the EU's GDPR. It does not by itself make a site compliant: sites aimed at children must also self-designate as child-directed, even in privacy-enhanced mode.

Embed options

Option What it does
start=90 Starts 90 seconds in
end=120 Stops at 120 seconds from the start of the video
autoplay=1 Starts by itself (muted in most browsers; see Why Videos Autoplay Muted)
cc_load_policy=1 Captions on
cc_lang_pref=fr Caption language, as a two-letter code
controls=0 Hides the player controls
playlist=VIDEO_ID&loop=1 Loops a single video
rel=0 Related videos at the end come from the same channel

Sources: Embed videos & playlists, YouTube Help, and YouTube embedded player parameters, Google for Developers. Since Sep 25, 2018 related videos cannot be switched off: rel=0 only limits them to the same channel.

How do I stop people embedding my videos?

  1. Sign in to YouTube Studio.
  2. Select Content in the left menu.
  3. Next to the video, select Details.
  4. At the bottom, select Show more.
  5. Untick Allow embedding and click Save.

The video then plays only on YouTube itself: other sites' embeds of it stop playing.

Why won't an embedded video play?

  • "Error 153": the page did not send an HTTP Referer header, which YouTube's terms require. Opening an embed address straight in the address bar gives it too: embeds are meant to sit inside a page (Embed videos & playlists).
  • Age-restricted video: it cannot play on most other sites and sends viewers to YouTube (Age Restriction).
  • Embedding turned off by the creator, or the video is private, deleted or blocked in the viewer's country.
  • Live stream by channel: the old embed/live_stream?channel= form showed "This video is unavailable" in a test on Nov 6, 2026; see Share the Live Link.

Embeds, views and ads

An embed that a viewer starts counts as a view; one that autoplays does not (Embed videos & playlists). George Vanous's notes add that YouTube shows ads on embeds only on brand-safe sites, so some embedded plays earn nothing.

Teachers can use YouTube's own education embed, YouTube Player for Education. George Vanous of Freedom! explained it in a Jun 8, 2025 video: it shows no ads, schools and universities pay YouTube to use it, and that fee is shared with the creators whose videos play in it.

What creators say

In an Aug 30, 2020 video, George Vanous showed a YouTube link sitting still in a Twitter feed beside an uploaded video that played as people scrolled, and argued that on Twitter (now X), Facebook and LinkedIn you get more views by uploading the video natively, with the YouTube link in the post, than by embedding it. That is his advice from 2020, when those platforms' video rules were different; it is opinion, not YouTube's guidance.

Jacob LE, in a Jun 12, 2023 video, found the catch in start and end times: turning a shared link into an embed/ address with ?start= and end= made the start time work everywhere, but the end time worked only in a web browser, not in the YouTube app, so he tells people to paste such links into a browser.

Frequently asked questions

How do I get the embed code for a YouTube video? Under the video on a computer, click Share, then Embed, and copy the HTML code. Tick Start at first if the YouTube embed should begin at a certain time.

What is the difference between youtube.com and youtube-nocookie.com embeds? It is the same YouTube player, but in privacy-enhanced mode (youtube-nocookie.com) views do not personalize the viewer's YouTube experience or ads, and any ads shown are non-personalized.

How do I make a YouTube embed start at a certain time? Add ?start= and the number of seconds to the embed address, such as ?start=90 for 1:30. Add end= with seconds to stop it at a point.

Do embedded YouTube videos count as views? Yes, when the viewer plays them. YouTube Help says autoplayed embeds do not add to the view count.

How do I stop other websites embedding my YouTube videos? In YouTube Studio, open Content, then the video's Details, click Show more, untick Allow embedding and save.

Why does my YouTube embed say error 153? The page is not sending an HTTP Referer header, which YouTube requires, or the embed address was opened directly in the browser. Place the embed in a web page that sends a referrer.

Sources

Moments

How to Share a YouTube Video That Starts & Ends at a Specific Time

Jacob LE

  1. The code is an iframe whose address is https://www.youtube.com/embed/ plus the video ID. Options go after a ? and are…
  2. Jacob LE, in a Jun 12, 2023 video, found the catch in start and end times: turning a shared link into an embed/…

YouTube Player for Education ❤️ New revenue stream for you!

Freedom!

  1. Teachers can use YouTube's own education embed, YouTube Player for Education. George Vanous of Freedom! explained it…

Get more views by NOT embedding your videos off-YouTube!

Freedom!

  1. In an Aug 30, 2020 video, George Vanous showed a YouTube link sitting still in a Twitter feed beside an uploaded video…

See also

About this page

Last updated Nov 6, 2026 by the Vi.ki team. Page text CC BY-SA 4.0.

Edit History

Hotkeys

/
Jump to the search box
? or Ctrl + /
Open this list
Esc
Close this list, the photo viewer, or the account menu

Video

Space or K
Play or pause
← →
Back or forward 5 seconds
J L
Back or forward 10 seconds
0 to 9
Go to 0% to 90% of the video
, .
Previous or next frame, while paused
M
Mute or unmute
C
Captions on or off
F
Full screen on or off
A D
Previous or next moment

Photo viewer

← → or A D
Previous or next photo
↑ ↓ or W S
Previous or next photo
Home End
First or last photo
I
Show or hide the photo's info
Z
Clickless on or off: a pointer over a thumbnail shows it
N
Compare with the last photo: back to the one shown before this, and N again comes back
Q
Move the thumbnails to the next edge: top, bottom, left and round
, or Ctrl + ,
Open or close the viewer's settings
V
Clickless pan: a zoomed photo follows the pointer, rather than being dragged
Shift
Browse on or off
B
Show or hide the button bar
T
Show or hide the thumbnails
1
100% zoom on or off
0
Rate the photo as no opinion; again takes the answer back
+ -
Rate the photo a step higher or lower
F
Full screen: the photo alone. F again puts everything back.
Back to top