You can add a YouTube video or playlist to a website or blog by embedding it.
If you are an educator, get in touch with your Educational Technology platform for info on how to embed YouTube content for your classes.
Embed a video or playlist
- On a computer, go to the YouTube video or playlist you want to embed.
- Click SHARE .
- From the list of Share options, click Embed.
- From the box that appears, copy the HTML code.
- Paste the code into your website HTML.
- For network administrators: You will need to add youtube.com to the firewall allowlist.
- Important: If your website or app is child-oriented and you embed YouTube content, you must self-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 be turned off in the embedded player.
Manage video embedding options
Turn on privacy-enhanced modeThe Privacy Enhanced Mode of the YouTube embedded player prevents the use 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 be used to personalize the YouTube browsing experience, either within your Privacy Enhanced Mode embedded player or in the viewerâs subsequent YouTube viewing experience.
If ads are served on a video shown in the Privacy Enhanced Mode of the embedded player, those ads will likewise be non-personalized. In addition, the view of a video shown in the Privacy Enhanced Mode of the embedded player will not be used to personalize advertising shown to the viewer outside of your site or app.
As a reminder, the YouTube API Terms of Service and Developer Policies apply to the access and use of the YouTube embedded player.
To use Privacy Enhanced Mode:
- Change the domain for the embed URL in your HTML from https://www.youtube.com to https://www.youtube-nocookie.com.
- For network administrators: You will need to add youtube-nocookie.com to the firewall allowlist.
- For use in applications, use a WebView instance of the embedded player. Privacy Enhanced Mode is available only for embedded players on websites.
- Important: If your website or app is child directed, you must self-designate your site or app using these tools, as required by the YouTube API Terms of Service and Developer Policies, even if you embed YouTube videos with the Privacy Enhanced Mode player.
Example:
Before
<iframe width="1440" height="762"
src="https://www.youtube.com/embed/7cjVj1ZyzyE"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
After
<iframe width="1440" height="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 as per that websiteâs or appâs policies and terms.
To make an embedded video autoplay, add "&autoplay=1" 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.
Example:
<iframe width="560" height="315" src="https://www.youtube.com/embed/D6Ac5JpCHmI?&autoplay=1"frameborder="0" allowfullscreen></iframe>
To have a video start playing from a specific point, add â?start=â to a videoâs embed code, followed by the time in seconds at which youâd like the video to begin playing.
For example, if you want a video to start at 1 minute and 30 seconds into the video, your embed code would look something like this:
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/UkWd0azv3fQ?start=90" width="420"></iframe>
Make captions automatically appear for an embedded video by adding "&cc_load_policy=1" to the video's embed code.
You can also choose a caption language for the embedded video. To specify the caption language for the video that you'd like to embed, just add "&cc_lang_pref=fr&cc_load_policy=1" 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. You can look up 2-letter language codes in the ISO 639-1 standard.
- Sign in to YouTube Studio.
- From the left menu, select Content.
- Next to the video youâd like to manage, select Details .
- From the bottom, select SHOW MORE.
- Uncheck the box next to âAllow embeddingâ and SAVE.