How to Embed a YouTube Video on Your Website

Under the video on youtube.com, click Share, then Embed, and copy the iframe code. Paste it into an HTML block, or paste the plain video link into a builder's video block. Swap youtube.com for youtube-nocookie.com for privacy-enhanced mode, and add ?start=90 to begin at 1:30.

YouTube player parameters worth knowing
ParameterEffectCatch
start=90Starts at 90 secondsMay land up to about 2 seconds early, on a keyframe
end=120Stops at 120 secondsCounted from the video's start, not from start=
autoplay=1Plays on loadAutoplayed embeds do not count as views
loop=1&playlist=IDLoops one videoloop alone does nothing for a single video
rel=0Related videos come from your channelCannot hide related videos entirely since 2018
cc_load_policy=1Captions on by defaultOverrides the viewer's own setting

Updated

Embedding a YouTube video costs you no storage or bandwidth and gives visitors a player they already know. The decisions are small but they matter: privacy mode, whether it autoplays, and where it starts.

Embed YouTube on We.Inc, WordPress, Wix, Squarespace or plain HTML

We.Inc

  1. Open Add-ons from the "..." menu and switch on YouTube with your video link.
  2. Ask the AI chat where it belongs, for example "put my YouTube video under the hero on the home page".
  3. Publish once it looks right in the preview.

WordPress

  1. Add a YouTube block (or the generic Embed block).
  2. Paste the video URL and click Embed.
  3. Update the page.

Public and unlisted videos embed; private ones do not. The block works on every WordPress.com plan.

Wix

  1. Click Add Elements and open the video options.
  2. Add a video player and set its source to the YouTube link.
  3. Resize, then publish.

Squarespace

  1. Add a Video block where you want it.
  2. Paste the YouTube URL into the block.
  3. Save and preview.

Plain HTML

  1. Paste the iframe from Share, Embed where the video should appear.
  2. Change the domain to youtube-nocookie.com if you want privacy-enhanced mode.
  3. Add parameters after the ID with ? and join extras with &.

A tidy embed URL

Privacy-enhanced, start at 1:30, own-channel suggestions

Replace VIDEO_ID with the 11-character ID after watch?v=. Responsive sizing is covered in our iframe guide.

<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID?start=90&rel=0"
  title="Product walkthrough" width="560" height="315"
  allow="encrypted-media; picture-in-picture" allowfullscreen></iframe>

Sources

  • YouTube Help: Embed videos and playlists, https://support.google.com/youtube/answer/171780, checked October 28, 2026, for the YouTube steps
  • YouTube IFrame Player parameters, https://developers.google.com/youtube/player_parameters, checked October 28, 2026, for the YouTube steps
  • WordPress.org: Embeds, https://wordpress.org/documentation/article/embeds/, checked October 28, 2026, for the YouTube steps

Privacy-enhanced mode

YouTube says that with youtube-nocookie.com, embedded views do not shape the viewer's YouTube recommendations and ads are non-personalised. It is a better default for a business site. It does not make the embed consent-free in every jurisdiction, so if you run a consent banner, load video embeds after consent or behind a click.

When an embed refuses to play

The owner can switch off embedding in YouTube Studio (Content, Details, Show more, Allow embedding). Private videos never embed; public and unlisted ones do. Strict tracking protection in some browsers can also block the player, so give the area a fallback link to watch on YouTube.

The player needs at least 200 by 200 pixels. YouTube recommends at least 480 by 270 for 16:9.

How it works

  1. Open the video on a computer and click Share, then Embed.
  2. Tick or untick the offered options, such as start time.
  3. Copy the code, or copy just the video URL for a builder's video block.
  4. Paste it, publish and press play on the live page.

Tips

  • Use rel=0 so suggestions at the end come from your own channel rather than a competitor's.
  • For a child-directed site, YouTube asks you to designate it as made for kids, which turns off some player features.
  • Playlist embeds come from the same Share, Embed menu on the playlist page.

Frequently asked questions

How do I get the YouTube embed code?

On a computer, open the video, click Share under it, choose Embed and copy the HTML. You can tick the start-at box before copying.

Why does my YouTube embed say video unavailable?

The owner may have turned off Allow embedding, the video may be private, or it may be blocked in the viewer's country. Unlisted videos still embed.

Can I hide related videos at the end?

Not fully. Since September 2018, rel=0 only limits suggestions to the same channel as the video that played.

Does youtube-nocookie.com remove the need for cookie consent?

Not necessarily. YouTube describes it as not personalising ads or recommendations from the view. Many sites still load it after consent or behind a click to play.

Related: HTML iframes and video, Embed a Vimeo video, HTML embed code generator, Add a cookie banner, Iframe refused to connect.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap