close menu

The Ultimate Guide to Embedding Video on Your Website

The Ultimate Guide to Embedding Video on Your Website

It’s not know-how anymore that adding videos to your website will bring some real unmatched value to you and your site visitors. From enhancing the user experience – in our visual-driven culture, people do prefer viewing to reading – to bringing SEO benefits to your site. Increased time on site, higher click-through rates, boost conversions, and, thus, revenue are among the clear benefits of embedding videos on your website. Many website design companies across the world would vouch for the fact that adding videos to the website can go a long way in the user experience journey.

However, a simple upload won’t cut it in this case. Video embed to your website is really the way to go. Video embedding may seem like a routine job, however, it’s not that clear cut. With so much information here and there on how to embed a video from one place to another, we’ve aimed to create an ultimate guide to embedding video on your website, which covers it all.

Let’s jump right in!

What is a Video Embed?

First and foremost, it is important to understand what stands behind the main element of a video embed – an embed code. An embed code is a piece of HTML code that you can use to add video and other types of content to your website.

Embed code is a piece of HTML code that you can use to add video and other types of content to your website.

This snippet of code helps display the video on your website. It pulls the video from its original source, without actually “forcing” you to host it on your website.  This implies that you won’t have to worry that a video will affect your website load time, and it also opens up an array of choices between various video hosting services that best suit your needs.

Although most video hosting services offer auto-embed generation, it won’t hurt to understand the basic video embed code structure:

<iframe src=”URL’></iframe>

Instead of the URL part, just add the link to the video, and voila – there’s your HTML code. Knowing a bit of HTML will also allow you to adjust the embed code manually: adding the needed height and width, or block particular features of the video you don’t want to display on your page. It can look like this:

Example of an embed code

You may wonder at this point – why can’t you simply upload the video to your site and be done with the hassle? Google often says that videos add significant website load time, decrease site speed, and, thus, affect user experience and negatively impact your SEO. Hence, you may lose traffic, rankings et cetera. Not to speak about overloaded servers, extra costs, and so on. 

Embedding videos to a website will help you overcome most of these issues. Here’s why. 

Embed Your Videos Easily

with Wave.video HostingTry now

Embed Do Not Upload: The Key Advantages of an Embedded Video

1. Embed video on a website for higher video load times (and SEO)

When you upload a video to your site, your video may take ages to load, which, in turn, affects the page’s load time. So, your site visitors can experience slow video loading, unexpected pauses, and the overall refusal to play. Embedding videos can help you maintain your site speed at a balanced rate and bring no negative effect to user experience. And, according to Google’s John Mueller, site speed is one of the key ranking factors in our mobile-first era. 

Why should you worry about that? Here’s a graph that shows how site load time impacts conversions:

Loading time impact on conversion

Source: Crisp Video

So, basically, lower load time means lower rankings, decreased traffic, fewer conversions, and… lost revenue! 

But do not think that adding a video will only cause you trouble. Having a video play on your website will significantly impact the amount of time people spend on your site (positive ranking factor), and also the video itself may show up on Google’s #1 page, which brings traffic, and all the rest that follows. Thus, it’s all just a matter of doing things right and choosing the embed option over the upload.

2. Embed video on a website to overcome bandwidth limitations

Uploading a video exhausts your own server’s bandwidth (which comes at a cost). And every time someone links to or embeds your video on their website, your own site suffers as they’re using up your bandwidth once again. This is costly and inefficient. 

3. Embed video on a website to avoid file size and storage limits

Your site hosting always comes at a storage limit – so, by and large, every time you upload a video, you are taking up space on your server. By uploading multiple videos, you can potentially take up too much space, and if multiple users view your video simultaneously, your site load times could drastically slow down.

Moreover, there is also a matter of file size limitation to video uploading. Your site hosting platform will most likely have tight restrictions on the video format and file sizes, so you will find yourself compressing the video to a point of no use. Video embedding won’t get you these restrictions.

Embed video on website - Upload size limit

Source: ProPhoto

4. Embed video on a website for higher video quality

From file size restrictions, we’re getting to video quality limitations when it comes to uploading videos to a site. If you want to display your high-quality hard-worked-on video on your website, storing it on a third-party site ensures you will stay within your “inode limit,” the data structure that keeps the information about the file on your hosting account. So, you won’t have to think about converting your video files into multiple formats and versions to let your visitors view your videos in high definition or lower resolution.

Choosing a Video Hosting Site

Basically, by choosing to embed videos to your website, you’re leaving all the server load worries and file format changes to someone who has the time and resources for that. But, as you probably understand, to embed a video to your website, you have to, first, add it to a third-party video hosting platform. And here, you have plenty of choices.

There’s no best or worst video host concept, it’s really a matter of balance of the right features and cost. So, we’ve summed up the key features to consider before choosing the right video hosting site:

Responsive player

Your video hosting site should offer a responsive video player, a mobile-friendly rich media widget, that’s designed to provide your audience with the utmost user and viewing experience. Regardless of whether they watch from a desktop screen, smartphone, tablet or any other screen size, the video expands to fill the width of the screen but maintains the videos’ original aspect ratio. This helps avoid static sizing that can potentially distort page layouts, deform the image, or display black bars around the video.

Speed and quality of service

When you’re choosing a video hosting, you want to be sure they’re providing the utmost service. So, there’s a twofold understanding of what a good speed and quality of service imply:

  • Support for great video quality: In 2020, you cannot really afford grainy footage and animations in 360p or 480p. So, unless you are on a low budget and 1080p will cut it for your purposes, make sure the video hosting service you choose supports Ultra HD or more. The best platforms out there offer you to automatically switch between HD/SD quality.
  • Great support & customer service: Double-check the quality of the servers that the service uses. Does the site crash from time to time (this will affect the video display on your website!)? Is it at all prone to DDoS attacks? And, what’s more important, what’s the average response time to their customer’s queries?

Player configuration options

First impressions matter, so the first thing that catches your and your customers’ eye is the design of the video player. From colors to buttons, autoplays and configuring all the necessary commands – the more customizable the video player is, the better. 

Video Player customization in Wave.video

Video player customization options in Wave.video hosting

Lead generation features

If you’re adding a video to your website, it becomes a part of your lead generation machine. So, make sure that the video platform you’re choosing actually supports lead generation through the video. This feature includes things like calls-to-action and ways to capture your visitors (leads) information. Otherwise, it’s basically a video player you’re paying for.

Privacy

When operating online, privacy is an obvious factor to consider. The same applies to the privacy of your videos. It’s important that the video hosting platform of your choice does not allow everyone to watch or download your videos without your permission. Therefore, the hosting service should give you the option to impose strict rules on downloading things and an efficient way of enforcing those rules. The ability to protect your videos with a password is a feature to look for when choosing a video hosting platform.

SEO 

If you want to play with your own site’s ranking, you should be strategic in your choice of a video hosting platform. Look for a hosting service that is both stable and popular (as in, high in rankings in itself), and make use of their share of Google’s ranking. First of all, hosting your video on an external site will provide you with outbound links, or backlinks, and will potentially make it easier to get video rich snippets for your own domain.  Thus, this will give you a chance to impact your site’s ranking as well.

https://moz.com/blog/hosting-and-embedding-for-video-seo

Source: Moz

Analytics and data collection

Your videos are designed to attract and please the customer, so you would naturally want to know how pleased the customers are. Therefore, the service you host your video on should give you a plethora of analytics to look at. And not just simple things like views, comments, but a whole different kind of complex data. Embedding videos allows you to add a special tracking code – from Google Tag Manager – and get additional analytics within your Google Analytics account, like the average watch time, the moment people generally stop watching, and so on. You need all this data to know how and why your videos are successful (or not).

Cost

Once you’ve made sure you’ve considered all the features you need, you’re content with the platform and support, and you’ve got your head around the video quality, the final thing is to ensure the platform falls within your budget. And this depends on how many video views you anticipate, and how large your video files are. More views of larger videos will imply you’re using more bandwidth and so the price will increase. It’s also worth checking if the platform allows monthly or annual contracts. If you’re a small business or just starting out with video, you probably won’t want to be tied into long-term contracts.

How to Generate the Embed Code

Once you’ve picked your video hosting platform and uploaded all of your video content, there’s only one step that separates you from adding/embedding a video to your website – finding that embed code.  

Embedding videos from video hosting services 

Embedding from Wave.video

To embed a video from Wave.video, go to My Projects and find the video you want to embed. Then, hover over the three dots icon and click on “Player”.

Switch on the toggle that says “Embed video” and Wave.video will auto-generate an embed code for your video. Under the toggle, you will also find video size settings, so don’t forget to make use of this feature. 

Video embed

To customize the video player, open the “Appearance” tab and feel free to change the player color, define what controls are shown (if any), or choose a custom thumbnail. If you want to learn more about Wave.video hosting features, make sure to read this article.

There are several options of how you can embed videos with Wave.video on your website or blog.

  • Inline embed

This is a regular embed that will place your video within the surrounding text or other UI elements of your page.

Embedding a video this way will open it in a modal dialog that pops over the rest of the content.

There are three ways to integrate your video into your page’s content: thumbnail, highlight and text link.

Popover embed

Thumbnail

A thumbnail embed looks similar to the regular inline embed. The difference is – the video will play in a popover window that will appear atop of the other content.

Popover embed - thumbnail

Highlights

This type of embeds reminds the popular Instagram Stories Highlights. This is a great way to nicely integrate videos into your content to let your website visitors know about new arrivals, latest news, special deals, or some video from behind the curtains.

Popover embed - highlights

Text link

If you don’t want to break the text with any visuals but still want to provide your reader with an easy way to watch the video, use this way to embed the video.

Add a text phrase and link it your video. The video will appear atop of the page by clicking on that link.

Popover embed text link

Embedding from YouTube

Just go to your video’s YouTube play page, click on the “Share” button, and then “Embed.” You can just copy the embed code, or work on a few customizable options – displaying/covering player controls or playing the video from a certain point (not necessarily the beginning).

Embedding video from YouTube

If you want further customization, there are plenty of parameters – autoplay, color, language, looping, and more – that you can add within the iframe embed. They are all listed on Google’s Developer page.

How to embed a YouTube video

In this quick video, I’ll show you how to embed a YouTube video in HTML, how to make it responsive on any sized device and I’ll reveal how you can easily adjust embed options such as autoplay

Embedding from Vimeo

Vimeo embed code can be found by clicking on the Share icon on the right hand of the video. You’ll see a window with various frames, and one of them is your embed code.

By clicking on +Show Options, you can customize the way your video will be displayed with this embed code. You can alter the player’s color, its size (keep it Responsive, just in case), add an intro, and add some “special stuff” like looping, autoplay and more.

embedding video from Vimeo

By going Pro, Business, or Premium,  you can see some additional perks like customizing colors and components, adding end screens and logo.

Embedding from Wistia

Go to your media page, and click the Embed & Share button. You’ll see an Embed & Share screen, where you can copy your embed code type and alter it for your page.

embedding video from Wistia

Wistia offers two types of embed codes: Inline embeds and Popover embeds. Inline embed codes imply positioning the video in line with the rest of your content, while Popover embeds help your videos, well, pop over your page’s content.

Embedding from Vidyard

Note that for video embedding from Vidyard, you must have the Player Embeds feature with your plan. Vidyard supports two embed options – responsive embed and iframe embed. 

On your Vidyard’s dashboard, click on the Content>Player section, and hover your cursor over the player, and then click “share”. Under the Responsive Embed part, simply click on the Copy Code icon, and choose the Use Lightbox option to turn the code into a lightbox embed. You can manually enter the player dimensions to get the maximum width and height. 

embedding video from vidyard

If your website does not support JavaScript, you can select the Trouble embedding? checkbox and copy the iframe embed code instead.

Embedding videos from social media 

Embedding from Facebook

Each video on Facebook is supported with the embed feature. All you have to do is click on the “…” in the top right corner of the Facebook post and press “Embed.”

embedding video from facebook

If you’d like, you can choose the “Include full post” option (just press on the checkbox), and it will add the corresponding text from the Facebook post along with the video. 

Embedding from Instagram

Since Instagram is owned by Facebook, the embedding process is very similar. Open up Instagram from a desktop (not the app), and click on the “…” in the upper right corner.

Embedding video from Instagram

Press on “Embed” and copy the embed code. Once again, you’ll have a choice to add (or not) the caption to your embed. 

Embedding from Twitter

To embed a Twitter video, do not use the app. Open the tweet on a desktop and select “Embed Tweet” from the drop-down menu, located next to the “Follow” button on the Tweet. Then, choose the “Embed Tweet” option.

embedding video from twitter

Just copy/paste the embed code – but note, with Twitter’s embed, it will display the entire Tweet with the caption, there is no option to display a single video.

Embedding from TikTok

With TikTok, the “Get Embed Code” button appears right on the video. Although there are no options to choose from as all you’ll get is a link for 340×700 player with autoplay, you can tweak some settings when adding the embed code to your webpage.

embedding video from TikTok

Using an Alternative Method: Video Embed Code Generators

If for some reason, you don’t wish to follow the easy steps for getting the embed codes for your video from the video hosting sites or social media, there’s certainly a workaround. 

There’s an alternative method  – you can find plenty of special sites that are inherently just video embed code generators. Platforms like Embed.ly, Toolki, and Siege Media allow you to generate an embed code for your video: all you have to do is have the videos’ URL at hand and these sites will automatically create an embed code for your video.

But, this workaround comes with a few catches:

  • Usually, the newly embedded video on your site will have the platform’s watermark on it
  • There’s a very limited video customization capability
  • These platforms do not offer any analytics or even the possibility to add a tracking code to further track your video’s stats in Google Analytics or third-party analytical platforms.

Embed video on website via embed code generator

So, if you have the chance to use a video hosting platform, always go for this option. 

Part V: How to Embed a Video to Your Website

Now that you’re all equipped with the knowledge about the advantages of video embedding, know how to pick the right video hosting service and how to generate the embed code, we’ll quickly walk you through the details of how to actually embed a video to the most popular site hosting platforms.

Embedding Videos in HTML

STEP 1: EDIT YOUR HTML

Open up the page you want to embed the video on in the edit mode. Select the precise spot in the code you want your video to appear at and place your cursor there.

STEP 2: COPY & PASTE THE EMBED CODE

Copy your embed code and simply paste it into the spot you placed your cursor at. Press, “save” or “publish”, and that’s it.

Double-check if the video is displayed exactly where you placed the code and don’t forget to monitor your page’s and video’s performance.

Embedding Videos in WordPress

If your website runs on WordPress, there are two options to embed a video. 

#1 OPTION: COPY/PASTE THE URL

For the most popular video hosting platforms like Vimeo, YouTube, and a few others, you don’t need to look up the full embed code. Just copy the video’s URL and paste it into the Visual editor – the embed code will get automatically produced.

#2 OPTION: USE THE EMBED CODE

Sometimes you want to add some tweaks to the video display, or you may be hosting your videos on a platform that’s not being supported by WordPress’s automatic embed. That’s when you’ll have to use the video’s embed code.

Go to the WordPress Text editor (do not confuse with the Visual editor) and you’ll see the HTML version of your page. Then, just follow the steps we mention above in the HTML section of this guide on how to embed video on your website.

Embedding a video in WordPress

Embedding Videos in Shopify

STEP 1: COPY THE EMBED CODE

The first step is very simple – just copy the embed code from where you’re hosting your video.

STEP 2: LOG INTO YOUR SHOPIFY ADMIN DASHBOARD

Log into your Shopify admin dashboard. All your current pages should be listed under Online Store -> Pages. Navigate to the page you want to edit and make note of the symbols in the editor toolbar.

Step 3: CLICK THE “INSERT VIDEO” BUTTON

Choose the rich text editor, and in the toolbar, click on the video camera icon. A new window will pop up – just paste the video’s embed code and select the “Insert video” option. There you go!

Embedding Videos in Squarespace

When it comes to embedding, Squarespace is very similar to WordPress. You can choose between the option to use an embed code or to embed videos by copy/pasting the video’s URL (only possible when embedding from YouTube, Vimeo, Animoto, or Wistia).

Since Squarespace is a website builder, just add any block that supports video, and simply copy/paste your video URL, or press the embed icon (highlighted in a red circle), then you’ll see a pop-up window where you can copy/paste your embed code.

Embedding videos in squarespace

In Squarespace, you can tweak the video’s title and description, and by unchecking the “Use Thumbnail” option, you can also add a custom-made thumbnail for your video on that page.

Embedding Videos in Wix

Wix runs on similar principles as the previous site hosting platforms. Only the copy/paste URL option for video embed supports videos hosted on YouTube, Vimeo, DailyMotion, and Facebook. 

#1 OPTION: COPY/PASTE THE URL

Step 1: Open up the Editor

Click the “+” icon on the left side of the Editor and choose Video. Under Single Videos Player, pick the platform your video is hosted at — YouTube, Vimeo, DailyMotion, or Facebook.

Step 2: Copy your video’s URL

Click on “Change Video” and copy the URL of the video you’d like to showcase. In this step, you can tweak the playback and control options.

Step 3: Adjust the position of your video

Use the drag and drop to change the position and the size of your video. And just save the page!

#2 OPTION: USE THE EMBED CODE

If you’re not hosting your videos on the platforms supported by Wix, you’ll need to copy the embed code for your video. And then, instead of selecting to add a Video, you’ll have to press on “More”. This is where you’ll find the HTML iframe, where you can paste the embed code. Press “Save”, and you’re good to go. 

Final Words

Seems like we’ve covered pretty much everything related to embedding videos on your website. After such an extensive read, all we have to say is that adding a video to your site will bring value not just to your SEO, analytics, and revenue department. People love videos and appreciate the time you invest into creating content that’s valuable, entertaining, and easy-to-digest. All you have to ensure is that your videos aren’t affecting the user experience, and video embeds are a great tool for that.

Please, let us know in the comments whether there’s anything you’d like us to add to this guide. Which questions are still left unanswered? Which video hosting platforms or site hosting services you’d like us to update this guide with? What are your struggles and challenges when it comes to embedding videos to your website and providing the utmost user experience?

We’ll keep you in the loop!

Join 5,000 marketers who read our articles first