Just because a video is publicly viewable doesn’t mean it should be up for grabs.
If someone can download your video or access the raw file, they can share it anywhere: on a site you don’t control, in competitor marketing, or in ways that misrepresent your brand.
Basic video privacy tools like password or login protection work well for gated content. But what about the videos you want to share publicly, without sacrificing control?
Use this guide to embed your videos securely on website platforms (like WordPress and Squarespace) while protecting them from downloads, leaks, and unauthorized sharing.Â
What Is a Video Embed Code?
A video embed code is a small snippet of HTML that displays a video on your website by “embedding” it from a video hosting platform.
Instead of uploading the video file directly to your site, the embed code links to the video hosted elsewhere and plays it within your webpage.Â
Why Use Embed Codes Over Direct Links?


Common website builders like WordPress, Squarespace, and Wix encourage adding videos to your website with direct links because these platforms prioritize simplicity and convenience.
The problem? Direct links are vulnerable to downloads, leaks, and theft. Furthermore, the benefits of using embed codes over direct links are numerous:Â
Examples of Adding Video to Website: Website Upload vs Direct Link vs Embedded Video
There are three ways to add videos to your website: direct website upload, direct link, or embed code. Let’s briefly compare your options with examples.
Website Upload
The video above was uploaded directly to the website without a video host. Notice there are no player customizations. You’re also able to download the video.Â
Direct Link Example
This video was added to the website using a direct link. Notice that the in-player CTA is still present; however, all other player customizations are lost.
Embedded Video Example
This video is embedded on the website privately while being available for anyone to watch. Notice the player customizations, including custom colors and an in-player CTA. Additionally, the video loops and the full-screen button is hidden.Â
How To Embed Videos on Your Website without Risking Downloads and Leaks
Embed videos on your website with the following features to prevent content downloads, leaks, and unauthorized distribution.Â
- Choose a private video host that prevents downloads.Â
- Create your embed code and use Allowed Domains to prevent unwanted distribution.
- Add the embed code to your website (usually via an Embed or Custom HTML block).
It’s that easy! Plus, every SproutVideo plan includes these features.Â
How To Create An Embed Code for Your Video
Your video embed code controls the player’s appearance and behavior. Most private video hosting platforms allow you to create a custom embed code, enabling you to:Â
And more!
How to Create an Embed Code with SproutVideo
- Select your settings from the Player Options menu of any video.
- Copy and paste the generated code into your site—no extra code or plugins required.
Discover all the ways you can customize your video player and learn more about creating a custom embed code for your video.Â
How to Embed Videos on Your Website (WordPress, Squarespace, Wix)
Whether your website uses blocks, widgets, or elements, this functionality is usually labeled “Embed” or “Custom HTML”.Â
Here’s how to embed a video on your website across the most common platforms:Â
- WordPress.org: Use a Custom HTML block to paste your embed code.
- Squarespace: Add a Code or Embed Block and paste your embed code.
- Wix: Add an Embed Code Element and paste your code.Â
- Webflow: Drag in a Code Embed Element and paste your code.
Most website builders allow you to add custom embed codes. However, some platforms (WordPress.com, Squarespace, Webflow) limit this option to certain paid plans.Â
5 More Ways To Protect Embedded Videos on Your Website
For high-value content, confidential internal communications, or pre-release collaborations, here are additional options to protect embedded videos, whether or not you restrict viewing access.
Online videos have multiple access points, which can lead to privacy leaks. Use our guide on Video Privacy to protect your content.Â
Ready To Embed Videos? A Private Video Host You Can Trust
With video embed codes, your website becomes a private channel you control, making it easy to treat your videos like the valuable assets they are.Â
While direct links expose your content, embed codes that include the right settings keep your videos protected without reducing discoverability.Â
With a private video host, like SproutVideo, you can share your content confidently while keeping your videos safe.
Ready for more? Discover our related resources: