Webmasters

Video Search - Webmaster EDU

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 Webmaster Tools. 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.flv</video:content_loc>
       <video:player_loc allow_embed="yes" autoplay="ap=1">
         http://www.example.com/videoplayer.swf?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 entries. 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 via HTTP. Metafiles that require a download of the source via streaming protocols are not supported.
  • 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. To see how your site will appear to Google, you should view your play pages in a text-only browser such as Lynx, or a more conventional browser with Flash and JavaScript disabled.
  • You can specify pages from different sites in one Sitemap. All sites, including the one containing your Sitemap, must be verified in Webmaster Tools. More information about managing Sitemaps for multiple sites.

Video Sitemap tag definitions

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. Maximum 100 characters. All HTML entities should be escaped or wrapped in a CDATA block.

<video:description> Required

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

<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. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format.

Providing this file allows Google to generate video thumbnails and video previews, and can help Google verify your video.

Best practice: Ensure that only Googlebot accesses 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 allow_embed specifies whether Google can embed the video in search results. Allowed values are Yes or No.

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.swf?video=123" autoplay="ap=1"/>.

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

Best practice: Ensure that only Googlebot accesses 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.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.