Video sitemaps

You can use the Google Video extension to the sitemap protocol to give Google information about video content on your site. You can create a new video sitemap or add video information to an existing sitemap.

Adding video content to a sitemap

The entries in a video sitemap must include a link to a landing page for a video and some required information. Many of the elements in a video sitemap are optional, but they provide useful metadata that can enhance your video results and improve Google's ability to include your video in search results.

Once you have created your sitemap, you can submit it to Google using Search Console. Google doesn't guarantee that all videos included in a sitemap will appear in our search results, or that we will use all the video information included in your sitemap.

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

<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/some_video_landing_page.html</loc>
     <video:video>
       <video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc>
       <video:title>Grilling steaks for summer</video:title>
       <video:description>Alkis shows you how to get perfectly done steaks every
         time</video:description>
       <video:content_loc>http://www.example.com/video123.mp4</video:content_loc>
       <video:player_loc autoplay="ap=1">
         http://www.example.com/videoplayer.mp4?video=123</video:player_loc>
       <video:duration>600</video:duration>
       <video:expiration_date>2009-11-05T19:20:30+08:00</video:expiration_date>
       <video:rating>4.2</video:rating>
       <video:view_count>12345</video:view_count>
       <video:publication_date>2007-11-05T19:20:30+08: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://cooking.example.com</video:gallery_loc>
       <video:price currency="EUR">1.99</video:price>
       <video:requires_subscription>yes</video:requires_subscription>
       <video:uploader info="http://www.example.com/users/grillymcgrillerson">GrillyMcGrillerson
         </video:uploader>
       <video:live>no</video:live>
     </video:video>
   </url>
</urlset>

Guidelines for video content in sitemaps

  • Video content includes web pages which embed video, URLs to players for video, or the URLs of raw video content hosted on your site. If Google cannot discover video content at the URLs you provide, those entries will be ignored by Googlebot.
  • Each URL entry must contain the following information:
    • Title
    • Description
    • Play page URL
    • Thumbnail URL
    • Raw video file URL and/or the video player URL

    For more information about the required elements, see the table below.

  • 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. sitemaps does not support nesting of sitemaps 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 can crawl the following video file types: mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, .swf. All files must be accessible to Googlebot. Metafiles that require a download of the source via streaming protocols are not supported. If you want to prevent spammers from accessing your video content at the <player_loc> or <content_loc> 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 play page URL, the video URL, and the thumbnail URL) included in each sitemap entry. More information about robots.txt.
  • Google will verify that the information you include for each video matches what is on your site.
  • 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.
  • You can host multiple videos on one web page.
  • Don't include a page on a video sitemap where the video is unrelated to the page. For example, if the video is a small addendum to the page, or unrelated to the main text content.

Video sitemap tag definitions

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

Tag Required? Description
<loc> Required

This tag specifies the landing page (aka play page, referrer page) for the video. When a user clicks on a video result on a search results page, they will be sent to this landing page. Must be a unique URL.

If your landing page features multiple videos, don't create a separate <loc> tag for each video. Instead, create a single <loc> tag that includes a <video:video> element for each video on the landing page.

<video:video> Required

Encloses all information about the video.

<video:thumbnail_loc> Required

A URL pointing to the video thumbnail image file. Images must be at least 160x90 pixels and at most 1920x1080 pixels. We recommend images in .jpg, .png, or. gif formats.

<video:title> 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.

<video:description> Required

The 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).

<video:content_loc> Depends

You must specify at least one of <video:player_loc> or <video:content_loc>.

A URL pointing to the actual video media file. Preferred formats are: .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 allowed, but not preferred, and may be indexed less well.

Providing this file allows Google to generate video thumbnails and video previews, and can help Google verify your video. Must not be the same as <loc> or <video:player_loc>

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.

<video:player_loc> Depends

You must specify at least one of <video:player_loc> or <video:content_loc>.

A URL pointing to a player for a specific video. Usually this is the information in the src element of an <embed> tag and should not be the same as the content of the <loc> tag.

The optional attribute autoplay has a user-defined string (in the example above, ap=1) that Google may append (if appropriate) to the flashvars parameter to enable autoplay of the video. For example: <embed src="http://www.example.com/videoplayer.mp4?video=123" autoplay="ap=1"/>.

Example player URL for Dailymotion: http://www.dailymotion.com/swf/x1o2g

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.

<video:duration> Recommended

The duration of the video in seconds. Value must be between 0 and 28800 (8 hours).

<video:expiration_date> Recommended when applicable

The date after which the video will no longer be available, in W3C format. Don't supply this information if your video does not expire.

Allowed values are complete date (YYYY-MM-DD) and complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD). For example, 2012-07-16T19:20:30+08:00.

<video:rating> Optional

The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.

<video:view_count> Optional

The number of times the video has been viewed.

<video:publication_date> Optional

The date the video was first published, in W3C format. Acceptable values are complete date (YYYY-MM-DD) and complete date plus hours, minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD). For example, 2007-07-16T19:20:30+08:00.

<video:family_friendly> Optional

No if the video should be available only to users with SafeSearch turned off.

<video:tag> Optional

A tag associated with 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 <video:tag> element for each tag associated with a video. A maximum of 32 tags is permitted.

<video:category> Optional

The video's category. For example, cooking. The value should be 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.

<video:restriction> 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. Only one <video:restriction> tag can appear for each video. If there is no <video:restriction> tag, it is assumed that the video can be played in all territories.

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.

<video:gallery_loc> Optional

A link to the gallery (collection of videos) in which this video appears. Only one <video:gallery_loc> tag can be listed for each video. The optional attribute title indicates the title of the gallery.

<video:price> Optional

The price to download or view the video. Do not use this tag for free videos.

The required attribute currency specifies the currency in ISO 4217 format.

The optional attribute type specifies the purchase option. Allowed values are rent and own. If this is not specified, the default value is own.

The optional attribute resolution specifies the purchased resolution. Allows values are HD and SD.

More than one <video:price> element can be listed (for example, in order to specify various currencies, purchasing options, or resolutions).

<video:requires_subscription> Optional

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

<video:uploader> Optional

The video uploader's name. Only one <video:uploader> is allowed per video.

The optional attribute info specifies the URL of a webpage with additional information about this uploader. This URL must be on the same domain as the <loc> tag.

<video:platform> Optional

A list of space-delimited platforms where the video may or may not be played. Allowed values are web, mobile, and tv. Only one <video:platform> tag can appear for each video. If there is no <video:platform> tag, it is assumed that the video can be played on all platforms.

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

Learn more about using platform restrictions.

<video:live> Optional

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