Cookies disclaimer

I agree Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.

Video Sitemaps

Video Sitemaps

Video SitemapsContents:

 

XML Video Sitemaps

XML video sitemaps are vital for the indexation of your videos by search engines; they should be a concise list of all videos that you want to be indexed. These sitemaps can also include embedded videos on your site that are hosted on YouTube or Vimeo.

XML Video Sitemap Benefits

They improve your chances of having your videos appear in the Video Search results. This can help Google to discover videos that may have otherwise not been found; or point them to areas of your site where there are more videos.

Validation

Ensure the XML file is properly formatted and passes validation tests. Simply run the file through a sitemap validator to test. Once submitted to Google Search Console, Google will inform you of problems with the XML sitemap but it is better to pre-empt this with your own tests first.

Example Code

The code below is an example of how a single entry should look in an XML video sitemap along with the opening code. It is worth noting that Google uses all of the tags in the code below:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>http://www.example.com/videos/page-1.html</loc>
<video:video>
<video:thumbnail_loc>http://www.example.com/thumbs/thumb1.jpg</video:thumbnail_loc>
<video:title>Example video title</video:title>
<video:description>Example video description</video:description>
<video:content_loc>http://www.example.com/video1.mp4</video:content_loc>
<video:player_loc autoplay="ap=1">
http://www.example.com/videoplayer.mp4?video=video1</video:player_loc>
<video:duration>600</video:duration>
<video:expiration_date>2018-08-05T13:30:30+05:00</video:expiration_date>
<video:rating>4.8</video:rating>
<video:view_count>12345</video:view_count>
<video:publication_date>2017-06-05T13:30:30+05:00</video:publication_date>
<video:family_friendly>yes</video:family_friendly>
<video:restriction relationship="allow">IE GB US CA</video:restriction>
<video:gallery_loc title="Cooking Videos">http://video.example.com</video:gallery_loc>
<video:price currency="GBP">9.99</video:price>
<video:requires_subscription>yes</video:requires_subscription>
<video:uploader info="http://www.example.com/users/exampleface">Example Face
</video:uploader>
<video:live>no</video:live>
</video:video>
</url>
</urlset>

Video Sitemap Tags

We describe in more detail below what each of the above tag means and how they should be used.

<loc>

Requirement: Required

This tag is where you stipulate the page containing the video, but there are a few points to consider:

  • This must be a unique URL
  • This is a mandatory attribute
  • Be consistent with your URLs, ensure that you use the canonical URL (www, https, lowercase, etc)

If the URL stipulated contains multiple videos:

  • don't create a separate <loc>tag for each video / create a single <loc> tag
  • Includes a <video:video> element for each video on the stipulated URL.

What this means is that if you have a page with say two videos on it, you would use these components in the following way:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>http://www.example.com/videos/page-1.html</loc>
<video:video>
<video:thumbnail_loc>http://www.example.com/thumbs/thumb1.jpg</video:thumbnail_loc>
<video:title>Example video title</video:title>
<video:description>Example video description</video:description>
<video:content_loc>http://www.example.com/video1.mp4</video:content_loc>
</video:video>
<video:video>
<video:thumbnail_loc>http://www.example.com/thumbs/thumb2.jpg</video:thumbnail_loc>
<video:title>Example video title</video:title>
<video:description>Example video description</video:description>
<video:content_loc>http://www.example.com/video2.mp4</video:content_loc>
</video:video>
</url>

<video:video>

Requirement: Required

This attribute encloses all the data we are specifying about a particular video. Only one video should be describes with attributes within the opening and closing video:video tag. As is shown in the example above this attribute opens and closes like this:

<video:video>…</video:video>

<video:thumbnail_loc>

Requirement: Required

This is where to specify the URL of the video thumbnail image file.

  • Images must be at least 160x90 pixels
  • Images must be at most 1920x1080 pixels

It is recommended that images appear in any of the following formats:

  • .jpg
  • .png,
  • .gif

<video:title>

Requirement: Required

This is where to specify the title of the video:

  • If you are using HTML within the title, this should be escaped or wrapped in a CDATA block to allow it to be read. This is because the sitemap is in an XML format, to read more about CDATA, read this guide.
  • Google recommends that the title specified in this tag matches the video title used on the web page that contains the video.

<video:description>

Requirement: Required

This is where to specify the description of the video:

  • Maximum 2048 characters.
  • If you are using HTML in the description, this should be escaped or wrapped in a CDATA block to allow it to be read. This is because the sitemap is in an XML format, to read more about CDATA, read this guide.
  • Google recommends that the description specified in this tag broadly matches the video title used on the web page that contains the video.

<video:content_loc>

Requirement: Varies

This is where to specify the URL or location of the video itself, if you are hosting a video on your site; use this tag… If you are embedding the video use the <video:player_loc> tag described in the next section.

You have to specify at least one of two tags for any video:

  • <video:content_loc>.
  • <video:player_loc> 

This must be a URL pointing to the video file.

The following are the video formats that Google prefer:

  • .3g2
  • .3gp2
  • .3gp
  • .3gpp
  • .asf
  • .avi
  • .divx
  • .f4v
  • .flv
  • .m2v
  • .m3u8
  • .m4v

 

  • .mkv
  • .mov
  • .mp4
  • .mpe
  • .mpeg
  • .mpg
  • .ogv
  • .qvt
  • .ram .rm
  • .vob
  • .webm
  • .wmv
  • .xap

 

  • HTML is not a supported format
  • Flash is technically allowed, but is not preferred, and may not be indexed properly
  • This component cannot be the same as <loc> or <video:player_loc>
  • The URL must be an actual video file

Perform a reverse DNS lookup to verify that the video can be accessed by Google.

<video:player_loc>

Requirement: Varies

This is where to specify the URL or location of the video itself, if you are embedding the video; use this <video:player_loc> tag to define its location.

You have to specify at least one of two tags for any video:

  • <video:content_loc>.
  • <video:player_loc> 

Perform a reverse DNS lookup to verify that the video can be accessed by Google.

<video:duration>

Requirement: Recommended

This is where to specify the duration of the video, in seconds:

  • The value used has to be between 0 & 28800 (which is 8 hours!)

<video:expiration_date>

Requirement: Recommended when applicable

This is where to specify the date last that the video will be available:

  • Use the W3C format.
  • Only provide this data if your video will expire (such as with sales, seasonal or promotional offers)

The only values available to you are:

  • The complete date (YYYY-MM-DD) For example: 2017-08-10
  • The complete date plus hours, minutes, seconds, and includes a time zone, eg; YYYY-MM-DDThh:mm:ss+TZD. For example: 2017-08-10T14:11:30+11:00

<video:rating>

Requirement: Optional

This is where you can specify a rating for the video:

  • This must bear some relationship to an actual rating of your video.
  • Use a number value between 0.0 & 5.0

<video:view_count>

Requirement: Optional

This represents number of times the video has been viewed.

<video:publication_date>

Requirement: Optional

This is where you can specify the date the video was published:

  • Use a W3C format

The only values available to you are:

  • The complete date (YYYY-MM-DD) For example: 2017-08-10
  • The complete date plus hours, minutes, seconds, and includes a time zone, eg; YYYY-MM-DDThh:mm:ss+TZD. For example: 2017-08-10T14:11:30+11:00

<video:family_friendly>

Requirement: Optional

  • If you select ‘Yes’, the video will be available to users with SafeSearch turned on.
  • If you select ‘No’, the video will only be available to users with SafeSearch turned off.

<video:tag>

Requirement: Optional

Use this attribute to tag your videos with short descriptive words relevant to the videos content:

  • A video can have multiple tags
  • Add a different <video:tag> attribute for each tag you want to add to the video
  • 32 Tags is the maximum amount you can add to any one video

<video:category>

Requirement: Optional

This is where you can specify the ‘category’ of the video. This can be any category you want, we produce videos on SEO, so we give most videos the category of ‘SEO’ and tags like ‘sitemaps’ and ‘backlinks’.
The ‘category’ should not exceed 256 characters.

<video:restriction>

Requirement: Optional

This is a list of countries where the video should or shouldn’t be played:

  • This needs to be in the format of a space-delimited list
  • ISO 3166 format country codes are the only values allowed (these are 2-letter country codes)
  • You can only use one <video:restriction> tag per video
  • If you do not specify or use the <video:restriction> tag, Google will assume the video can be played in any regions

The required attribute relationship specifies whether the video is restricted or permitted for the countries specified. The values available to you are; allow or deny.

<video:gallery_loc>

Requirement: Optional

If a video appears in a collection of videos listed on a ‘gallery’ page, you are able to specify a URL pointing to that gallery or collection of videos, with this tag:

  • You can only use one <video:gallery_loc> tag per video
  • You can also add another optional attribute of ‘title’ which specifies the title of the gallery you are linking to

<video:price>

Requirement: Optional

If you have a cost for accessing or downloading the video, you can specify it in this tag:

  • If the video is free, do not use this tag at all (do not set a value of 0 for example)
  • The currency is a required attribute that is specified in ISO 4217 format.
  • The attribute type, which is optional, allows you to specify a purchase option. The choices you have here are either; rent or own. If you do not specify a value, it will default to ‘own’
  • Another optional attribute is ‘resolution’, which allows you to specify the resolution of the purchased video. The options are either HD or SD
  • Multiple <video:price> tags can be added… Should you have varying prices for different currencies, purchasing options, or resolutions

<video:requires_subscription>

Requirement: Optional

This tag allows you to specify if the user needs a subscription (either paid or free) in order to view the video content.

  • The only values are: yes or no

<video:uploader>

Requirement: Optional

This tag allows you to specify the video uploader's name:

  • You can specify only one uploader per video

The optional attribute ‘info’ allows you to specify the URL of a page with more information about this specified uploader.

  • The ‘info’ URL must be located on the same domain as that specified in the <loc> tag

<video:platform>

Requirement: Optional

This is not very common, as its sole purpose is to specify what platforms the video should or shouldn’t be played. The options for this are:

  • TV
  • Web
  • Mobile

This must be in the form of a list of space-delimited platforms:

  • Only one ‘platform’ tag can be used for any individual video.
  • If you do not use the ‘platform’ tag, it will be assumed that the video can be played on any / all of the platform (unless you have a reason to do so, leave this tag out)

The required attribute ‘relationship’, allows you to specify if the video is restricted or permitted for the specified platforms:

  • Options allowed for this are either: allow or deny

<video:live>

Requirement: Optional

This tag allows you to specify whether the video is a live stream or not.

  • Options allowed for this are either: yes or no (with yes = it is a live stream)
  • The default if you do not use this tag is ‘no’

Multiple Sitemaps

If a site has thousands of videos it becomes more important to distribute these videos over several sitemaps, this makes it easier to identify indexing issues.
By having smaller sitemaps, you can more easily see what videos are not being indexed.

For example, you could have XML sitemaps for videos used in your blog, for products, infographics, etc… If you have a single sitemap with all videos listed in it, and you notice that only 50% of them are indexed, you have no way to easily dive deeper into the issue. Vs a series of smaller video sitemaps, you could more easily and quickly see where the problem exists (most of the time).

Sitemap Size

There should be no more than 1,000 links per sitemap and the maximum file size should not exceed 10MB, Sitemaps.org confirm this. This helps prevent your web server from being weighed down serving large files. 1,000 URLs is a good amount of URLs, see the section on site structure below for more information on how to break this up.

Multiple Sitemap Structure

Sitemap structure should reflect site structure, for example:

  • Master Category (sitemap) – contains links to all other category sitemaps
  • Category 1 (sitemap) – contains all products in this category
  • Category 2 (sitemap) – contains all products in this category

Group similar content or content located in a similar location into sitemaps to create consistency and logical structure.

Sitemap Index

A Sitemap Index is the master XML sitemap that links to all other sitemap files or all of the files that contain links to all the other sitemaps.

Google Webmaster Tools

We cover this in more detail in another part of the knowledge base that addresses SEO Tools and how to use them. But for now, it is worth noting that the video sitemap should be submitted to Google Webmaster Tools.

Common Mistakes

We have listed below the most common mistakes that we see in video sitemaps.

Obsolete Entries

Ensure the sitemap is up to date and does not include duplicate entries or links to pages that are no longer present on the site. This can be an issue if you use a tool to create a sitemap and you do not filter out duplicate entries such as with trailing slashes and upper and lower case URL characters.

Including Disallowed Videos

Do not include videos in the video sitemaps that you have disallowed from being crawled by the robots.txt; this wasted Google’s time and provides no benefit to you. In fact, if this happens on bulk it can also cause other problems; such as seeing increased volumes of videos not being indexed.

Incorrect Parameters

Stipulating incorrect parameters such as ‘loc’ or ‘title’ can slow or impede proper indexing of the videos by Google.

Too Many Entries

Having too many links in a sitemap makes problem solving difficult when it comes to indexing errors, also if the total sitemap is too big it can cause performance issue.

Sign Up For Early Access
& Earn a Chance to Win 1 Years Free Subscription!

What You Get...

There's no obligation to become a full member after your trial, but we think that once you've seen what's available, you'll want to join us.

We are in the process of building our software and are ramping up to launch the Technical Auditing component in early 2018, soon to be followed by a suite of other components such as keyword ranking and backlink analysis.

Sign up today for 1 months free access and get a further 10% off of any package price when we launch for the first year as a reward for being an early subscriber.

Also, you will be entered into a lottery, where we will be giving away five 1-year subscriptions for free!

Sign up for early access today!