Embed videos & playlists

You can add a YouTube video or playlist to a website or blog by embedding it.

Embed a video or playlist

  1. On a computer, get to the YouTube video or playlist you want to embed.
  2. Click SHARE Share.
  3. From the list of Share options, click Embed.
  4. From the box that appears, copy the HTML code.
  5. Paste the code into your website HTML.
  6. For network administrators: You will need to add youtube.com to the firewall allowlist.
  7. Of import: If your website or app is child directed and yous embed YouTube content, you must cocky designate your site or app using these tools. This self designation will ensure Google does not serve personalized ads on these sites or apps and some features will exist disabled in the embedded player.

Note:Age-restricted videos can't exist watched on about 3rd party websites. These videos will redirect viewers dorsum to YouTube when played.

Manage video embedding options

Turn on privacy-enhanced mode

The Privacy Enhanced Mode of the YouTube embedded actor prevents the apply of views of embedded YouTube content from influencing the viewer's browsing experience on YouTube. This means that the view of a video shown in the Privacy Enhanced Mode of the embedded player will not exist used to personalize the YouTube browsing feel, either within your Privacy Enhanced Mode embedded player or in the viewer's subsequent YouTube viewing feel.

If ads are served on a video shown in the Privacy Enhanced Mode of the embedded player, those ads will as well be non-personalized. In addition, the view of a video shown in the Privacy Enhanced Style of the embedded player volition not be used to personalize advertising shown to the viewer outside of your site or app.

Every bit a reminder, the YouTube API Terms of Service and Developer Policies utilise to the access and use of the YouTube embedded role player.

To utilize Privacy Enhanced Mode:

  1. Change the domain for the embed URL in your HTML from https://www.youtube.com to https://www.youtube-nocookie.com.
  2. For network administrators: Y'all will need to add together youtube-nocookie.com to the firewall allowlist.
  3. For use in applications, use a WebView example of the embedded actor. Privacy Enhanced Mode is available only for embedded players on websites.
  4. Of import: If your website or app is child directed, you must self designate your site or app using these tools, every bit required by the YouTube API Terms of Service and Developer Policies, even if yous embed YouTube videos with the Privacy Enhanced Style histrion.

Example:

Earlier

<iframe width="1440" height="762"

src="https://www.youtube.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

After

<iframe width="1440" summit="762" src="https://www.youtube-nocookie.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Note: If the viewer clicks or taps out of the embed and is redirected to another website or app, that website or app may track the viewer's behavior equally per that website's or app's policies and terms.

Make an embedded video play automatically

To brand an embedded video autoplay, add together "&autoplay=ane" to the video's embed code right after the video ID (the series of letters that follows "embed/").

Embedded videos that are autoplayed don't increment video views.

Instance:

<iframe width="560" pinnacle="315" src="https://www.youtube.com/embed/D6Ac5JpCHmI?&autoplay=ane"frameborder="0"  allowfullscreen></iframe>                  

Get-go an embedded video at a certain fourth dimension

To have a video outset playing from a specific point, add "?kickoff=" to a video'south embed lawmaking, followed by the time in seconds at which you'd like the video to begin playing.

For instance, if you want a video to start at 1 minute and 30 seconds into the video, your embed code would look something similar this:

<iframe allowfullscreen="" frameborder="0" meridian="315" src="http://www.youtube.com/embed/UkWd0azv3fQ?star                                          t=xc                    " width="420"></iframe>

Add captions to an embedded video

Make captions automatically announced for an embedded video by adding "&cc_load_policy=i" to the video'southward embed lawmaking.

You lot can as well choose a caption language for the embedded video. To specify the caption linguistic communication for the video that you'd like to embed, just add together "&cc_lang_pref=fr&cc_load_policy=ane" to the video's embed code.

  • "cc_lang_pref" sets the language for the captions shown in the video.
  • "cc_load_policy=1" turns captions on by default.
  • "fr" represents the language code for French. Y'all tin can look up 2-letter of the alphabet linguistic communication codes in the ISO 639-1 standard.

Turn off embedding for your videos

If you lot've uploaded a video and don't want to allow others to embed your video on external sites, follow these steps:

  1. Sign in to YouTube Studio.
  2. From the left menu, select Content.
  3. Side by side to the video you'd like to manage, select Details .
  4. From the superlative, select Testify More than.
  5. Uncheck the box next to "Allow embedding" and Save.

Was this helpful?

How can we improve it?