{"id":33888,"date":"2026-09-23T16:18:55","date_gmt":"2026-09-23T16:18:55","guid":{"rendered":"https:\/\/folnova.com\/embed-youtube-video\/"},"modified":"2026-09-23T16:18:55","modified_gmt":"2026-09-23T16:18:55","slug":"embed-youtube-video","status":"publish","type":"post","link":"https:\/\/folnova.com\/en-au\/embed-youtube-video\/","title":{"rendered":"How to embed a YouTube video on your website or in WordPress"},"content":{"rendered":"<p>You embed a YouTube video by pasting the embed code into an HTML block on your website. Open the video on your computer and select Embed under Share. Copy the complete code there. In WordPress, you can usually paste the regular video link into a YouTube block. Visitors can then watch the video on your page.<\/p>\n<p>Below, you\u2019ll learn which approach suits your website and how to test the video on your phone.<\/p>\n<nav aria-label=\"Table of contents\">\n<ul>\n<li><a href=\"#link-of-code\">Using a YouTube link or embed code<\/a><\/li>\n<li><a href=\"#insluitcode-plaatsen\">Adding the YouTube embed code<\/a><\/li>\n<li><a href=\"#wordpress\">Embedding a YouTube video in WordPress<\/a><\/li>\n<li><a href=\"#privacy\">Embedding a YouTube video with privacy mode<\/a><\/li>\n<li><a href=\"#mobiel\">Making your embedded YouTube video suitable for mobile<\/a><\/li>\n<li><a href=\"#starttijd\">Setting a start time for your embedded YouTube video<\/a><\/li>\n<li><a href=\"#toegankelijk\">Making your embedded YouTube video accessible<\/a><\/li>\n<li><a href=\"#problemen\">Your embedded YouTube video is not working<\/a><\/li>\n<\/ul>\n<\/nav>\n<h2 id=\"link-of-code\">Using a YouTube link or embed code<\/h2>\n<p>Embedding is also called embedden. It places a video player on your page while the video remains hosted on YouTube. So you do not need to upload the video file to your website.<\/p>\n<p>A regular link sends your visitor to the video. With embed code, you display the player on your own page. Some website builders automatically create a player from a regular video link.<\/p>\n<table>\n<thead>\n<tr>\n<th>What do you want to do?<\/th>\n<th>What are you using?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Add a clickable link to the video<\/td>\n<td>The regular video link<\/td>\n<\/tr>\n<tr>\n<td>Add a video using a video block<\/td>\n<td>Usually the regular video link<\/td>\n<\/tr>\n<tr>\n<td>Place the player in HTML yourself<\/td>\n<td>The embed code with an iframe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>An <code>iframe<\/code> is a window that displays content from another website. In this case, it is the YouTube video player. HTML is the code used to place content on a web page.<\/p>\n<h2 id=\"insluitcode-plaatsen\">Adding the YouTube embed code<\/h2>\n<p>Open the video on a computer. You can then copy the code and test it on your website straight away.<\/p>\n<ol>\n<li><strong>Check the video.<\/strong> Check the title and play a section.<\/li>\n<li><strong>Select Embed under Share.<\/strong> Copy the complete code.<\/li>\n<li><strong>Open your website editor.<\/strong> Go to the page where you want to place the video.<\/li>\n<li><strong>Add an HTML or custom code block.<\/strong> Paste the embed code there, not into a regular text box.<\/li>\n<li><strong>Preview your page.<\/strong> Can you see the player? Also test the play button.<\/li>\n<\/ol>\n<p>Buttons and screens can change. Can\u2019t you see the Embed option? Compare your screen with the <a href=\"https:\/\/support.google.com\/youtube\/answer\/171780?hl=nl\">official YouTube explanation of embedding<\/a>.<\/p>\n<p>Does your website builder only ask for a video URL, meaning a web address? Use the regular video link. That field should not contain HTML code.<\/p>\n<h2 id=\"wordpress\">Embedding a YouTube video in WordPress<\/h2>\n<p>Are you working with blocks in WordPress? A YouTube block is usually the simplest choice. If you want to edit the embed code yourself, use a custom HTML block.<\/p>\n<h3>With a YouTube block<\/h3>\n<ol>\n<li>Open your post or page in the editor.<\/li>\n<li>Add a block and search for YouTube.<\/li>\n<li>Paste the regular video link into the field.<\/li>\n<li>Confirm the input and preview your page.<\/li>\n<\/ol>\n<p>Are you using another editor or a separate page builder? Search for a video block. The name and location may vary between websites.<\/p>\n<h3>With a custom HTML block<\/h3>\n<p>Add a custom HTML block and paste the complete embed code into it. You can then edit the code, for example to display the player properly on a phone. You\u2019ll find an example of this further down.<\/p>\n<p>Does the code disappear after saving? Ask your website administrator whether your account is allowed to add iframe code and whether the website permits that code.<\/p>\n<h2 id=\"privacy\">Embedding a YouTube video with privacy mode<\/h2>\n<p>For privacy mode, use the domain <code>www.youtube-nocookie.com<\/code> in the embed code. It is already included in the code example below.<\/p>\n<p>This mode does not guarantee that the video will work completely without cookies. It also does not automatically mean that your website meets all privacy rules. When you load the player also matters.<\/p>\n<p>According to the <a href=\"https:\/\/www.gegevensbeschermingsautoriteit.be\/professioneel\/thema-s\/cookies\">Belgian explanation of cookies and consent<\/a> prior consent is generally required for cookies and trackers that are not strictly necessary. Visitors must know what they are consenting to and actively choose it themselves.<\/p>\n<p>Does your website need to ask for consent before loading the player? Set up your website so that the iframe only loads after that consent. A cookie notice above a player that has already loaded does not stop the player.<\/p>\n<p>You can first show an empty video box with an explanation, such as: \u201cThis video is loaded through YouTube.\u201d Ask your website administrator to check that the player really only loads after consent. The example code below does not arrange this.<\/p>\n<h2 id=\"mobiel\">Making your embedded YouTube video suitable for mobile<\/h2>\n<p>A player with a fixed width can extend beyond the page on a phone. This example code makes the player the same width as the box where you place it.<\/p>\n<pre><code>&lt;div style=\"width:100%; aspect-ratio:16\/9;\"&gt;\n  &lt;iframe\n    src=\"https:\/\/www.youtube-nocookie.com\/embed\/VIDEO_ID\"\n    title=\"Uitleg over het verzorgen van kamerplanten\"\n    style=\"width:100%; height:100%; border:0; display:block;\"\n    allowfullscreen&gt;\n  &lt;\/iframe&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<p>Replace <code>VIDEO_ID<\/code> with your video\u2019s code. You\u2019ll find it in the copied embed code, directly after <code>\/embed\/<\/code> and before any question mark. Also change the text after <code>title<\/code> to a short description of your video.<\/p>\n<p>The ratio <code>16\/9<\/code> gives you a landscape video box. For a portrait video, you could use, for example, <code>9\/16<\/code> Afterwards, check that the box does not become unnecessarily large on a wide screen.<\/p>\n<p>Then test the page on your phone:<\/p>\n<ul>\n<li>Check that the video fits within the page without scrolling sideways.<\/li>\n<li>Test the play button and the full screen button.<\/li>\n<li>Check that a cookie notice or another window does not cover the buttons.<\/li>\n<\/ul>\n<h2 id=\"starttijd\">Setting a start time for your embedded YouTube video<\/h2>\n<p>Do you want to skip the beginning of a video? Add <code>start<\/code> to the address after <code>src<\/code>with the start time in seconds. This lets you choose where the video begins. It does not make the video play automatically.<\/p>\n<p>A fictional example: the explanation you want to show begins after 1 minute and 30 seconds. Convert it as follows: <strong>1 \u00d7 60 + 30 = 90 seconds<\/strong>.<\/p>\n<pre><code>src=\"https:\/\/www.youtube-nocookie.com\/embed\/VIDEO_ID?start=90\"<\/code><\/pre>\n<p>Is there already a question mark with a setting after the address? Do not use a second question mark. In your HTML code, add <code>&amp;amp;start=90<\/code> after the existing setting.<\/p>\n<p>Save the page and check where the video begins. Do you want the video to play again afterwards? Read <a href=\"https:\/\/volgers-kopen.io\/youtube-video-herhalen\/\">how to repeat a YouTube video<\/a>.<\/p>\n<h2 id=\"toegankelijk\">Making your embedded YouTube video accessible<\/h2>\n<p>Also put important information from the video into text on your page. This allows visitors to read that information if they cannot hear the sound or use the player.<\/p>\n<ul>\n<li><strong>Give the iframe a clear title.<\/strong> For <code>title<\/code> write, for example, \u201cExplanation of caring for indoor plants\u201d instead of \u201cVideo\u201d. This helps assistive technologies explain what the window contains.<\/li>\n<li><strong>Test the subtitles if they are available.<\/strong> Turn them on and watch for names, numbers and incorrectly recognised words.<\/li>\n<li><strong>Write out the most important explanation.<\/strong> For an instructional video, you can put the steps briefly on the page.<\/li>\n<li><strong>Test without a mouse.<\/strong> Use the Tab key. Check that you can reach the player and see which button you have selected.<\/li>\n<\/ul>\n<p>Preferably let visitors press play themselves. That way, no sound starts while they are still reading.<\/p>\n<h2 id=\"problemen\">Your embedded YouTube video is not working<\/h2>\n<p>First open the video on YouTube. Does it not work there either? Check the video itself first. If it does play there, look at your website\u2019s code and settings.<\/p>\n<table>\n<thead>\n<tr>\n<th>What do you see?<\/th>\n<th>What can you do?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>The code appears as text on the page<\/td>\n<td>Paste the code into an HTML block, not a text block.<\/td>\n<\/tr>\n<tr>\n<td>You only see a clickable link<\/td>\n<td>Use a video block or put the embed code in an HTML block.<\/td>\n<\/tr>\n<tr>\n<td>The player displays an error message<\/td>\n<td>Read the message. Also check that the complete code for the video, the video ID, is included in the embed code.<\/td>\n<\/tr>\n<tr>\n<td>The video is not allowed to play on your website<\/td>\n<td>Ask the owner whether embedding is allowed. You cannot resolve this using the player\u2019s regular settings.<\/td>\n<\/tr>\n<tr>\n<td>The video box remains empty<\/td>\n<td>Check whether you still need to give consent to load the player. Also test in another browser.<\/td>\n<\/tr>\n<tr>\n<td>The player disappears after saving<\/td>\n<td>Ask the administrator whether the editor or security settings remove iframe code.<\/td>\n<\/tr>\n<tr>\n<td>The video is too wide on your phone<\/td>\n<td>Use code that follows the page width. Also check the width of the box around the player.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Do you want to remove one of your own videos? First check which pages you embedded it on. Read <a href=\"https:\/\/volgers-kopen.io\/youtube-video-verwijderen\/\">how to delete a YouTube video<\/a> and then update the references on your website as well.<\/p>\n<h3>Check the page before publishing it<\/h3>\n<p>Also view the page while logged out, preferably in a private window. This way, you see more than an administrator who is logged in.<\/p>\n<p>Check that you see the correct video and that the start time is right. Test the display on your phone and any consent requirement. Finally, play a section and check the sound.<\/p>\n<p>Do you want to upload your own videos first and then use them on your website? Read <a href=\"https:\/\/volgers-kopen.io\/youtube-kanaal-starten\/\">how to start a YouTube channel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Put a YouTube video on your website or in WordPress. With steps, example code, information about privacy and mobile viewing, plus help if the video does not work.<\/p>\n","protected":false},"author":1,"featured_media":23929,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/posts\/33888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/comments?post=33888"}],"version-history":[{"count":0,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/posts\/33888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/media\/23929"}],"wp:attachment":[{"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/media?parent=33888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/categories?post=33888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folnova.com\/en-au\/wp-json\/wp\/v2\/tags?post=33888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}