Small Business Blog
Home > Blog > How To Guides >
How to embed YouTube videos
Spread the word! Share this article:
Table of Contents
Introduction
Having videos on your site is a great way of increasing site engagement, and can be the perfect solution to supplying content for things such as courses or how-to videos.
Embedding videos onto your website, rather than hosting them yourself, is the best approach to getting your content on your site.
If you’re interested in learning more about why then you can have a read of our blog 7 reasons why you should never host your own videos.
Embedding a video is essentially a two-step process. First, you upload your video file to a third-party video hosting service like YouTube, Vimeo, or Wistia.
Then, you copy the URL to the video and paste it into a post or page on your own website. The video will appear on your site, wherever you pasted the URL. But the video itself is actually being streamed from the video host’s servers, instead of the webserver where your site is hosted.
Once set up you can choose how YouTube handles videos, setting them up in such a way that they appear only on your website and are not publicly viewable on Youtube itself.
Great for content such as courses for example, where you want to limit the videos to only people who have paid for the course.
Uploading videos to YouTube
The process is really quite straightforward.
First of all sign in using the Google username and password of the account you wish to upload to.
Uploading is then simple, hit create which is in the top right of YouTube, and then select ‘Upload Videos’
Once you have chosen to upload a video YouTube will prompt you for the file you want to use.
Drag and drop your file, or select the file from an explorer window and the video will begin uploading.
YouTube will then start processing your file immediately, While you are waiting you can fill in the title and description, and when done click next (the video will continue uploading if it has not finished yet).
Click next and select if your video is made for kids or not.
Set up your video elements
Lastly, you need to set your privacy settings.
Configuring so videos can only be viewed on your site
This is a great way of limiting who gets to see your video content. For example, if you have videos for courses you don’t want them to be on YouTube itself, or publically searchable.
First, sign in to YouTube Studio
Then, from the menu on the left, select Content
Scroll down the list until you find your video.
Hover just to the right of the video thumbnail and you’ll see an option to edit the details of the video.
Clicking n this will bring up the video details screen.
Keep scrolling down (press ‘more options’ when it appears) until you get to the ‘allow embedding’ checkbox and turn it on.
Lastly, you want to make sure that it can only be viewed on your website, in other words, set things up so that your video can’t be found or viewed on YouTube itself.
To do that you’ll need to set the privacy settings.
Scroll back to the top of the page, and on the right-hand side, just below the video preview, you’ll see where the access can be set.
If, as is the case with this example, your video is set to public click on the dropdown, and in the next dialog set your video to be private.
When finished click ‘DONE’.
And lastly, you’ll need to commit your changes. At the very top of the page on the right is the save button.
Embedding YouTube Videos onto your website
The following steps are for if your website is a WordPress website.
Embedding Youtube Videos on Posts or Pages
The first step is to get the URL for the video that you would like to share. Copy the URL from your address bar and navigate back to your WordPress site.
From the Page or Post, click on the section you want to add the video and insert a text control.
Depending on what theme you are using these may be named slightly differently. However, ALL solutions will use the built-in WordPress text controls, which will look something like this
Click on the ‘Add media’ button to bring up the next dialog box, where you select ‘Insert from URL’
This will open another dialog, where you will paste the video URL you copied from the above step.
Click save and the video will be embedded on your page or post
Embedding Youtube Videos using the Gutenberg video block
Gutenberg is WordPress’ way of authoring content on a WordPress website and is becoming more and more feature-rich.
It may be that you are using a WordPress theme to author pages, but when it comes to creating posts Gutenberg is well worth considering. This article is for example authored using Gutenberg.
First, you want to add a new content block. Do this by clicking on the white plus sign in the blue box found at the top left of your post.
From there you’ll want to select the video block
Finally, you’d have the option of how you want to place the video on your site.
The dialog offers a few choices.
While it is possible to directly upload the video to your library this is not recommended. For a recap on why hosting videos on your site is not the best course of action, you can refer to our article 7 reasons why you should never host your own videos.
The ‘media library’ option will open the media library. From there you can either upload a video via the library or choose a video that has been previously uploaded.
The option we are interested in that will allow us to embed a YouTube video is ‘insert from URL’
Embedding Youtube Videos using the Gutenberg custom HTML block
Embedding a YouTube video using the video block is super easy. It may be that for some reason you need to embed your YouTube video using HTML. This is also possible using a special Gutenberg block.
In the blocks dialog, scroll down to the widgets section, and select the custom HTML block.
This block looks a little like a text editor and is where you will copy in any HTML code you may want to use.
Prefer Vimeo as your video hosting choice?
If you prefer hosting your videos on Vimeo the process for embedding videos is similar and just as simple.
For a full run-through about how to embed videos hosted on Vimeo, you can head over to our blog how to embed Vimeo videos
Summary – How to embed a YouTube video
I hope this quick guide has shown you how easy it is to embed a youTube video onto your website.
Feel free to drop a comment in the box below, it would be great to hear from you.
If you’d like any assistance with your website we’d be happy to discuss your requirements at a time of your choosing. Click below to book a free 15-minute session. Alternatively, if you’d like to find out more about our website services click on the button below.
Spread the word! Share this article:
Scale, Survive & Thrive
ProfitAbility Virtual Assistance specialises in Small Business Support for Business Owners