Video sitemaps and video sitemap alternatives

30/11/2019

A video sitemap is a sitemap with additional information about video hosted on your pages. Creating a video sitemap is an excellent way to help Google find and understand the video content on your site, especially content that was recently added or that we might not otherwise discover with our usual crawling mechanisms. Google Video Sitemap is an extension to the Sitemap standard.

While Google recommends using video sitemaps, we also support mRSS feeds.

You should follow the video best practices to get the best results in Google Search.

Guidelines for video sitemaps

Here are basic guidelines for video sitemaps:

  • You can create a separate sitemap just for video, or you can embed a video sitemap within an existing sitemap, whichever is more convenient for you.
  • You can host multiple videos in one web page.
  • Each sitemap entry is the URL of a page that hosts one or more videos. The structure of each sitemap entry is as follows:
    
       https://example.com/mypage      
       
       ... as many additional  ...
    
  • Don't list videos that are unrelated to the host page. For example, if the video is a small addendum to the page, or unrelated to the main text content.
  • Each entry in a video sitemap includes a set of required, recommended, or optional values that you supply. Recommended and optional values provide useful metadata that can enhance your video results and improve Google's ability to include your video in search results. See the table below for a list of sitemap elements
  • Google might use text on the video landing page rather than the text you supply in your sitemap, if the page text is deemed more useful than the information in the sitemap.
  • Google can't guarantee when or if your videos will be indexed, as Google relies on complex indexing algorithms.
  • If Google cannot discover video content at the URL you provide, the sitemap entry will be ignored.
  • Each sitemap file that you provide must have no more than 50,000 URL elements. If you have more than 50,000 videos, you can submit multiple sitemaps and a sitemap index file. You cannot nest sitemap index files. Keep in mind that if you are adding optional tags, you may hit the 50MB uncompressed limit before you hit the 50,000 video limit.
  • Google must be able to access the source file or player (that is, the file or player cannot be blocked by robots.txt, require a login, or be otherwise inaccessible to Googlebot). Metafiles that require a download of the source via streaming protocols are not supported.
  • All files must be accessible to Googlebot. If you want to prevent spammers from accessing your video content at the or URLs, verify that any bots accessing your server are really Googlebot.
  • Make sure that your robots.txt file isn't blocking any of the items (including the host page URL, the video URL, and the thumbnail URL) included in each sitemap entry. More information about robots.txt.
  • Google verifies that the information you provide for each video matches what is on the site. If not, your video might not be indexed.
  • You can specify pages from different sites in one sitemap. All sites, including the one containing your sitemap, must be verified in Search Console. More information about managing sitemaps for multiple sites.

Example sitemap

Here is a sample video sitemap with one page hosting one video. This example includes all of the tags that Google uses.


   
     http://www.example.com/videos/some_video_landing_page.html
     
       http://www.example.com/thumbs/123.jpg
       Grilling steaks for summer
       Alkis shows you how to get perfectly done steaks every
         time
       
           http://streamserver.example.com/video123.mp4
       
         http://www.example.com/videoplayer.php?video=123
       600
       2021-11-05T19:20:30+08:00
       4.2
       12345
       2007-11-05T19:20:30+08:00
       yes
       IE GB US CA
       1.99
       yes
       GrillyMcGrillerson
       
       no
     
   

XML namespace

The Video Sitemap tags are defined in the following namespace:

xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"

Video sitemap tag definitions

You can find more documentation on media sitemaps at rssboard.org.

Tag Required? Description
Required Parent tag for a single host page on your site. Defined by the basic sitemaps format.
Required

Specifies the host page where one or more videos are hosted. When a user clicks on a video result in Google Search, they will be sent to this page. This URL must be a unique within the sitemap. Defined by the basic Sitemaps format.

For multiple videos on a single page, create a single <loc> tag for the page, with a child  element for each video on that page.

Required

Parent element for all information about a single video on the page specified by .

Required

A URL pointing to the video thumbnail image file. See thumbnail requirements.

Required

The title of the video. All HTML entities should be escaped or wrapped in a CDATA block. Recommended that this match the video title displayed on the web page.

Required

A description of the video. Maximum 2048 characters. All HTML entities should be escaped or wrapped in a CDATA block. Must match the description displayed on the web page (need not be a word-for-word match).

Required: either
video:content_loc
or
video:player_loc

A URL pointing to the actual video media file. Should be one of the supported formats.

HTML is not a supported format. Flash is allowed, but no longer supported on most mobile platforms, and so may be indexed less well.

Must not be the same as the  URL.

This is the equivalent of VideoObject.contentUrl in structured data.

Best practice: If you want to restrict access to your content but still have it crawled, ensure that Googlebot can access your content by using a reverse DNS lookup.

Required: either
video:content_loc
or
video:player_loc

A URL pointing to a player for a specific video. Usually this is the information in the src element of an tag. Must not be the same as the  URL. For YouTube video, this value is used rather than video:content_loc. This is the equivalent of VideoObject.embedUrl in structured data.

Must not be the same as the  URL.

Attributes:

  • allow_embed [Optional] Whether Google can embed the video in search results. Allowed values are yes or no

Best practice: If you want to restrict access to your content but still have it crawled, ensure that Googlebot can access your content by using a reverse DNS lookup.

Recommended

The duration of the video, in seconds. Value must be from 1 to 28800 (8 hours) inclusive.

Recommended when applicable

The date after which the video will no longer be available, in W3C format. Omit this tag if your video does not expire. If present, Google Search will not show your video after this date.

Supported values are complete date (YYYY-MM-DD), or complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD).

Example: 2012-07-16T19:20:30+08:00.

Optional

The rating of the video. Supported values are float numbers in the range 0.0 (low) to 5.0 (high), inclusive.

Optional

The number of times the video has been viewed.

Optional

The date the video was first published, in W3C format. Supported values are complete date (YYYY-MM-DD) or complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD).

Example: 2007-07-16T19:20:30+08:00

Optional

yes (or omitted) if the video can be available with SafeSearch on.

no if the video should be available only with SafeSearch off.

Optional

Whether to show or hide your video in search results from specific countries.

Specify a space-delimited list of country codes in ISO 3166 format. Only one tag can be used for each video. If there is no tag, Google assumes that the video can be played in all locations. Note that this tag affects only search results; it does not prevent a user from finding or playing your video in a restricted location though other means. Learn more about applying country restrictions.

Attributes:

  • relationship [Required] Whether the video is allowed or denied in search results in the specified countries. Supported values are allow or deny. If allow, listed countries are allowed, unlisted countries are denied; if deny, listed countries are denied, unlisted countries are allowed.

Example: This example allows the video search result to be shown only in Canada and Mexico:

CA MX

Optional

Whether to show or hide your video in search results on  specified platform types. This is a list of space-delimited platform types. Note that this only affects search results on the specified device types; it does not prevent a user from playing your video on a restricted platform.

Only one tag can appear for each video. If there is no tag, Google assumes that the video can be played on all platforms. Learn more about applying platform restrictions.

Supported values:

  • web - Traditional computer browsers on desktops and laptops.
  • mobile - Mobile browsers, such as those on cellular phones or tablets.
  • tv - TV browsers, such as those available through GoogleTV devices and game consoles.

Attributes:

  • relationship [Required] specifies whether the video is restricted or permitted for the specified platforms. Supported values are allow or deny. If allow, any omitted platforms will be denied; if deny, any omitted platforms will be allowed.

Example: The following example allows users on web or TV, but not mobile devices:
web tv

Optional

The price to download or view the video. Omit this tag for free videos. More than one element can be listed (for example, in order to specify various currencies, purchasing options, or resolutions).

Attributes:

  • currency [Required] Specifies the currency in ISO 4217 format.
  • type [Optional] Specifies the purchase option. Supported values are rent and own. If this is not specified, the default value is own.
  • resolution [Optional] Specifies the resolution of the purchased version. Supported values are hd and sd.
Optional

Indicates whether a subscription (either paid or free) is required to view the video. Allowed values are yes or no.

Optional

The video uploader's name. Only one is allowed per video. String value, max 255 charactersc.

Attributes:

  • info [Optional] Specifies the URL of a webpage with additional information about this uploader. This URL must be in the same domain as the tag.
Optional

Indicates whether the video is a live stream. Supported values are yes or no.

Optional

An arbitrary string tag describing the video. Tags are generally very short descriptions of key concepts associated with a video or piece of content. A single video could have several tags, although it might belong to only one category. For example, a video about grilling food may belong in the "grilling" category, but could be tagged "steak", "meat", "summer", and "outdoor". Create a new element for each tag associated with a video. A maximum of 32 tags is permitted.

Optional

A short description of the broad category that the video belongs to. This is a string no longer than 256 characters. In general, categories are broad groupings of content by subject. Usually a video will belong to a single category. For example, a site about cooking could have categories for broiling, baking, and grilling.

Not used

Currently not used.

Sitemap alternative

While Google recommends using video sitemaps and schema.org's VideoObject to mark up your videos, we also support mRSS feeds.

mRSS

Google supports mRSS, an RSS module that supplements the element capabilities of RSS 2.0. mRSS feeds are very similar to video sitemaps and can be tested, submitted, and updated just like sitemaps.

Each mRSS feed must be under 50MB in size when uncompressed, and can contain no more than 50,000 video items. If your uncompressed file is larger than 50MB, or you have more than 50,000 videos, you can submit multiple mRSS feeds and a sitemap index file. Sitemap indexes can contain mRSS feeds.

RSS vs mRSS – mRSS is a RSS extension used for syndicating multimedia files. It allows for a much more detailed description of the content than the RSS standard.

mRSS Example

Here's an example of an mRSS entry that provides all the key tags that Google uses. This includes live-video, which you can use to identify live, streaming videos.




Example MRSS
http://www.example.com/examples/mrss/
MRSS Example
  
    http://www.example.com/examples/mrss/example.html
    
      
      Grilling Steaks for Summer
      Get perfectly done steaks every time
      
      
      
    
    us ca
    end=2020-10-15T00:00+01:00; scheme=W3C-DTF
    live-video
  


mRSS Tags

Tag Required? Description
Required

Encloses information about the video.

Attributes:

  • medium [Required] Type of content. This should be set to video.
  • url [Required] The direct URL to the raw video content. If this is not specified, you must specify the tag.
  • duration [Optional but recommended] Length of the video in seconds.

For all of the other optional attributes and child fields of the tag, see the mRSS specification.

Depends

You must specify at least one of or the url attribute in .

A URL pointing to a player for a specific video. Usually this is the information in the src element of an tag and should not be the same as the content of the tag. Cannot be the same URL as the tag. should point to the URL of the page hosting the video, while this tag should point to a player.

Required

The title of the video. Maximum 100 characters. All HTML entities should be escaped or wrapped in a CDATA bock.

Required

The description of the video. Maximum 2048 characters. All HTML entities should be escaped or wrapped in a CDATA block.

Required A URL pointing to a preview thumbnail. See thumbnail requirements.
Optional

The publication and expiration date of the video. Full specification of dcterms:valid.

Example:


  start=2002-10-13T09:00+01:00;
  end=2002-10-17T17:00+01:00;
  scheme=W3C-DTF

Optional

A space-delimited list of countries where the video may or may not be played. Allowed values are country codes in ISO 3166 format. If there is no tag, Google assumes that the video can be played in all territories.

The required attribute type should be set to country. Only country restrictions are supported.

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

Learn more about using country restrictions.

Optional

The price to download or view the video. Do not use this tag for free videos. More than one element can be listed (for example, in order to specify various currencies or purchasing options).

Attributes:

  • currency [Required] The currency in ISO 4217 format.
  • type [Required] The purchase option. Allowed values are rent, purchase, package, and subscription.

The full mRSS specification contains many more optional tags, best practices, and examples. Once you have an mRSS feed, you can test and submit it just like a video sitemap.

* Nguồn: Google Search Console