Home
Dubb

How to Embed a Video on Your Website (Any Builder)

Darius

Darius

How to Embed a Video on Your Website (Any Builder)

How Do I Embed a Video on My Website or Landing Page?

You embed a video on a website by pasting an embed code into a block that renders HTML. On Dubb you open the video, go to the Embed tab, choose an inline player or a floating widget, copy the code, and paste it into your page builder. The video then plays on your page, on your domain, with your call to action at the end.

That is the short answer. The rest of this page is what decides whether the embed actually works: which block type to paste into, why autoplay often fails silently, how a floating widget behaves on a phone, and how to keep a video from slowing your page down.

What embedding actually means

An embed is a small piece of HTML that tells the browser to load a player from somewhere else and draw it inside your page. The video file is not on your server. It stays with whoever hosts it, and the code on your page is a frame that points at it.

This matters for three reasons. Your hosting bill does not grow with views, because the video is served from the host. Your page stays light, because it is loading a player rather than a file. And the host can report what happened inside the player, which your own analytics cannot see.

It also means the embed is only as good as the host. If the host is slow, your page is slow. If the host shows its own branding and recommendations, so does your page. Choose the host as carefully as you choose the video.

How it works in practice

You copy one snippet, paste it into a custom HTML block, publish, and load the page as a visitor. Four things then happen in order: the browser requests the frame, the frame loads the player, the player loads the video when the visitor interacts or when the page finishes loading, and the host records the session.

Most embed problems happen at step two or three. A rich text block escaped your code and showed it as text. A security policy on your site blocked the frame. Autoplay was set but the browser refused to play with sound. Knowing the sequence makes the symptom easy to place.

Step by step with Dubb

Step 1. Open the video and find the Embed tab

In Dubb Studio, open the video you want to use and select Embed. You will see the code for the style you have chosen, and the settings that change it.

Step 2. Choose the style

Inline sits in the page where you paste it. Floating follows the visitor down the page in a corner. Pick inline for a page where the video is the point, and floating for a long page where the video is a supporting argument.

Step 3. Set the behaviour

Decide on autoplay, controls, the call to action that appears when the video ends, and whether the player appears on mobile. These are covered in the options section below, and they matter more than the code itself.

Step 4. Copy and paste into a code block

In your page builder, add an HTML, code or embed block, paste the snippet, and save. Never paste it into a paragraph or a rich text block, because those will escape the tags and print the code on the page instead of running it.

Step 5. Load the published page on a phone

Not the preview, the published page. Builders render embeds differently in preview mode, and mobile is where sizing problems show up. If the player is taller than the screen or the button sits behind it, adjust before you send traffic.

Inline player or floating widget

Inline player

The video sits in the flow of the page, usually under the headline. It is the right choice when the video answers the main question of the page. It is calm, it does not chase the reader, and it works on every screen size without special handling.

Floating widget

The player follows the reader down the page in a corner, with a close control. It is the right choice for long pages where the video is proof rather than the main event, because the reader can keep scrolling and still see you talking.

Use it sparingly. One floating player on a page is a helper. Two is a hostage situation. On mobile, test the widget against your chat bubble and your cookie banner, which are usually in the same corner.

Options to set before copying the code

Autoplay

Browsers block autoplay with sound, and they always will. Muted autoplay usually works, but a silent video at the top of a page is a moving image nobody asked for. For a sales page, let the reader press play. The click is a tiny commitment that raises the chance they watch to the end.

Call to action after the video

This is the setting that turns a video into a campaign. When the video ends, a button appears on the player. Make it a real action with a real destination: book a call, see the pricing, start a trial. A video that ends in nothing is a video that ends in nothing.

Player controls

Leave the controls on. Hiding them looks tidy and frustrates anyone who wants to pause, scrub back or check a detail. If you are worried about the branding on the controls, use a host that lets you brand the player rather than stripping the controls.

Display on mobile

Decide deliberately. A floating widget on a phone can cover the main content and the button underneath it. If the page is a phone-first landing page, an inline player is almost always the better decision.

Where to paste it, builder by builder

BuilderBlock to useWatch out for
WordPressCustom HTML blockSome themes and security plugins strip iframes
WebflowEmbed elementSet the width to 100 percent and let height follow
WixEmbed HTML elementPositioning is absolute, so leave room in the layout
SquarespaceCode blockCode blocks are disabled on some plans
ShopifyCustom liquid blockProduct templates may strip script tags
Dubb landing pageVideo block, no code neededNothing, this is the native path

If your builder is not on the list, look for anything named HTML, code, embed or custom. Every serious builder has one, because every serious builder knows people need to paste things.

WordPress, step by step

WordPress deserves its own walkthrough because it is where most embeds get broken, usually by a plugin that means well.

In the block editor

Add a Custom HTML block where the video should appear, paste the snippet, then preview the post. Do not switch the block back to a paragraph, because that strips the formatting. If you see the code as text on the front end, the block was converted somewhere along the way.

In the classic editor

Switch the editor to the Text tab rather than Visual, paste, and update. Pasting into Visual will escape the tags. If the code contains a script tag, check that your user role is allowed to publish unfiltered HTML, which some multisite installs restrict.

When the player refuses to appear

Three usual suspects, in order. A security or optimisation plugin is stripping iframes: disable them one at a time on a staging copy. A content security policy is blocking the host: the browser console will name the blocked origin. A caching layer is serving an older version of the page: purge the cache and reload in a private window.

One more that catches people on slower hosts: a lazy load plugin decides the iframe is below the fold and never loads it, so the player is a blank grey box forever. Exclude the embed from lazy loading and it comes back.

Does an embed slow the page down

It can, and the cause is almost always loading the player before anyone wants to watch. A player brings its own scripts, fonts and styles. If it loads on page load, it competes with the content your reader actually came for.

The fix is the pattern every large site uses: put an image where the player will go, and load the player only when the visitor clicks it. The reader sees a still frame with a play button, the page finishes loading fast, and the heavy part arrives on demand.

Two more habits that help. Keep the embed near the top of the page rather than below three screens of scroll, because a player that loads late often never loads at all. And check your page speed after the embed, not before, because the number that matters is the one real visitors experience.

If speed is already tight, host the video rather than self hosting the file. A native video tag on your own server pulls bandwidth from the same machine that serves your page, and the first ten seconds of a slow video are ten seconds of your page not responding.

What to put around the video

The video does not sell on its own. The words around it tell the reader what they are about to get and what to do afterwards.

Above the player. One line naming the outcome, and one line naming the length. Not a paragraph of introduction. The reader has already decided to look at a video, so the job is to remove doubt, not to warm them up.

Beside or below the player. Three short bullets that repeat what the video covers, for the people who will not press play. Some visitors never watch a video on a work laptop with the sound off, and the page has to work for them too.

At the bottom. The same call to action that appears on the end card, written out as a button. The end card converts the people who watched to the end. The button catches everyone else.

A page built this way works whether the player loads or not, which is worth remembering when a corporate firewall blocks the frame and the visitor sees only your text.

A landing page example

A pattern that works for a single offer page: a headline that names the outcome, one sentence of context, the inline player, then the form or the booking link. The reader watches, then acts, without scrolling past anything else.

If the page is longer, keep the same order for the top third and put proof underneath: a short case study, a quote you can attribute, a pricing table. The video does the introducing. The page does the closing.

One detail that lifts completion rates: tell the reader the length of the video next to the player. A two minute commitment is easy to accept. An unknown one is not. For more on the words around the video, see personalized video messages.

Common mistakes

Pasting into a rich text block. You get the code printed on your page as text. Use an HTML block.

Autoplay with sound. Every modern browser blocks it. The player sits there looking broken and the reader assumes your site is broken too.

Hiding the controls. Nobody can pause. People who cannot pause leave.

A floating widget that covers the button. The video plays over the thing you wanted people to click.

Testing only in preview. Builders render embeds differently once published. Always check the live URL on a phone.

No end card. The video finishes and the reader has nothing to do. Add one clear action.

Get the embed code in two clicks

Dubb gives every video an Embed tab with an inline or floating player, a branded end card and per viewer tracking. Copy the code, paste it, done.

Start free with Dubb

Proving the embed earned its place

A video on a page is a hypothesis: that people would rather watch than read. Test it. Compare the conversion rate of the page with the player against the same page without it, over enough traffic that the difference is not noise.

Then look inside the player. Dubb reports who watched, how far they got and whether they clicked the end card. If completion is high and the end card clicks are low, the video is fine and the call to action is wrong. If completion is low, the first ten seconds are the problem.

That split is the reason to host the video rather than hand it to a platform that reports a single view count. Views tell you the page loaded. Completion tells you the message landed. If the page is part of an email or SMS campaign, pair this with the numbers in video emails for business, and if you are also sending the link by mail, my notes on sending video through Gmail and Outlook cover that side of it.

Tool comparison

HostEmbed optionsEnd card CTAPer viewer tracking
DubbInline and floating, plus a hosted pageYes, brandedYes
YouTubeIframe, their playerNo, only their overlaysAggregate only
VimeoIframe with colour and control optionsLimitedOn paid plans
Self hosted MP4Native video tagBuild it yourselfNo

FAQ

How do I embed a video into an HTML page?

Paste the host's iframe snippet into the body where the player should appear, set the width to 100 percent, and give the container a sensible height. If you are building by hand, wrap it in a div with a maximum width so it does not stretch on a desktop screen.

What is the difference between an inline and a floating embed?

Inline sits in the page layout. Floating follows the reader down the page in a corner. Inline suits a page where the video is the point, floating suits a long page where the video is supporting evidence.

Why is my embedded video not autoplaying?

Because the browser blocked it. Autoplay with sound is blocked by default in every major browser, and muted autoplay only works when the video has no audio track or is muted by the player. Let the reader press play instead.

Why are the player controls missing?

Either the controls setting is off in the embed options or the theme CSS has hidden them. Turn controls back on in the host first, then check your stylesheet.

How do I add a call to action after the video ends?

Set it in the embed options so a button appears on the player when the video finishes. Point it at one destination, not a menu, and make the label a verb.

Will the embedded video show on mobile?

If you set the frame width to 100 percent and do not fix the height in pixels, yes. Test the published page on a phone, because mobile is where sizing problems appear.

Can I track who watched an embedded video?

Only if the host reports it. Dubb records watch activity per viewer for both the hosted page and the embed, which a native MP4 tag cannot do.

Put the video on your page, then see who watched

Record once in Dubb, embed it on your site or landing page, and get a notification when a visitor opens the player.

Try Dubb free

About the Author: Darius
Darius

Co-founder and Chief Revenue Officer at Dubb. Passionate about helping people leverage the power of video in business to improve their livelihood and happiness.

Related Posts

View all posts
Dubb Agent

One less thing on your to-do list.

Dubb Agent researches prospects, writes your sales emails and follows up for you, so you can spend your time on the conversations that close.

  • Find and research new leads
  • Write and send follow-ups
  • Book meetings on your calendar
  • 7-day free trial
  • No credit card
  • 25,000 AI credits