A video sitemap contains additional information about videos hosted on your pages. Video sitemaps help search engines such as Google to better find and understand your website’s video content. Newly added video content will mainly benefit from a video sitemap as search engines may not yet have discovered new content using the standard crawling mechanisms.
Our Online Video Platform (OVP) has an integrated video sitemap generator that delivers standard a compliant video sitemap XML. To create a video sitemap follow these steps:
1.0 | Create a Playlist
- Go to the Media Library
- Click “Playlists” in the left sidebar
- Create a new smart playlist
Create a new smart or static playlist. A smart playlist automatically adds new media clips based on the set filters. A static playlist remains the same unless you manually add a new media clip. Learn more about playlists.
We recommend creating a smart playlist based on a tag such as ‘sitemap’ and tagging every media clip you would like to add to the playlist with ‘sitemap’.
Alternatively; add a custom metadata field called “Include in video sitemap” and require your editors to fill in this field when saving clip metadata.
The created playlist can be used to automatically generate a XML file to be used as a video sitemap.
2.0 | Generate video sitemap XML
Add the video sitemap XML manually to your website or automatically by adding a piece of server side code to your website.
Issue /sitemap/{playlist_id}.xml to generate a sitemap containing the latest 10.000 published mediaclips (mediatype = video) served in video sitemap xml format.
https://yourcompanyname.bbvms.com/sitemap/1649942503758793.xml
In the XML output, the <loc> field contains the mediaclip deeplink, if set (learn more about managing mediaclip metadata).
Alternatively, dynamically generate valid URLs for the video’s location using the following (optional) parameters:
- forcePfx
- urlprefix
- urlpostfix
URL format:
/sitemap/{playlist_id}.xml?forcePfx=true&urlprefix={urlprefix}&urlpostfix={urlpostfix}
For example:
https://yourcompanyname.bbvms.com/sitemap/1649942503758793.xml?forcePfx=true&urlprefix=http://yourcompanyname.bbvms.com/view/p/default/c/&urlpostfix=.html?placementOption=default
Required parameters | Type | Description |
playlist_id | int | Playlist id that is used for the sitemap output |
Optional parameters | ||
forcePfx | string | True if prefix and/or postfix should be used for the clip urls |
urlPrefix | string | Will be included in front of the id of the clip in the generated url. Should start with a valid protocol identifier. |
urlPostfix | string | Will be pasted after the id of the clip in the generated url. |
3.0 | Add video sitemap to your website
The video sitemap should be served on your own domain. The following example code will place the XML output on your own web page using the ‘publication name’ (for example ‘yourcompanyname’) and ‘playlist id’ variables:
<?php
$pattern = '/^[a-zA-Z\d\-]+/';
preg_match($pattern, $_REQUEST['publication'], $matches);
$publication = $matches[0];
$clipList = (int) $_REQUEST['id'];
header("Content-type: text/xml");
echo file_get_contents('https://' .$publication . '.bbvms.com/sitemap/' .$clipList . '.xml');
?>
For example:
https://www.bluebillywig.com/videositemaps/videositemap.php?publication=yourcompanyname&id=1649942503758793
Lastly, add the video sitemap URL to Google Search Console.