Video sitemaps and alternatives
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. A video sitemap is an extension to the Sitemap protocol.
While Google recommends using video sitemaps, we also support mRSS feeds.
Guidelines for video sitemaps
Here are basic guidelines for video sitemaps:
- You can create a separate sitemap just for video, or you can embed video sitemap tags within an existing web 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:
<url> <!-- URL of the host page --> <loc>https://example.com/mypage</loc> <!-- Information about video 1, like the title and URL for the video's media file --> <video:video> <video:title>Grilling steaks for summer</video:title> <video:content_loc> http://streamserver.example.com/video123.mp4</video:content_loc> </video:video> <!-- As many additional <video> entries as you need --> <video></video> </url>
- 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. Refer to the list of sitemap tag definitions.
- 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 can't discover video content at the URL you provide, the sitemap entry is ignored.
- Google must be able to access the source file or player (that is, the file or player can't 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
<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 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.
- Learn how to submit your sitemap to Google. For large sites, we recommend using the Search Console API to submit your sitemaps.
- Our documentation on sitemaps also applies to the sitemap extensions. Make sure to follow general sitemap guidelines.
Example sitemap
Here is a sample video sitemap with one page hosting one video. This example includes all of the tags that Google uses.
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> <url> <loc>https://www.example.com/videos/some_video_landing_page.html</loc> <video:video> <video:thumbnail_loc>https://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://streamserver.example.com/video123.mp4</video:content_loc> <video:player_loc> https://www.example.com/videoplayer.php?video=123</video:player_loc> <video:duration>600</video:duration> <video:expiration_date>2021-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:price currency="EUR">1.99</video:price> <video:requires_subscription>yes</video:requires_subscription> <video:uploader info="https://www.example.com/users/grillymcgrillerson">GrillyMcGrillerson </video:uploader> <video:live>no</video:live> </video:video> </url> </urlset>
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
Required tags | |
---|---|
<url> |
The parent tag for a single host page on your site. This tag is defined by the basic sitemaps format. |
<loc> |
Specifies the host page where one or more videos are hosted. When a user clicks on a video result in Google Search, they are sent to this page. This URL must be a unique within the sitemap. This tag is defined by the basic sitemaps format.
For multiple videos on a single page, create a single |
<video:video> |
The parent element for all information about a single video on the page specified by
the |
<video:thumbnail_loc> |
A URL pointing to the video thumbnail image file. Follow the video thumbnail requirements. |
<video:title> |
The title of the video. All HTML entities must be escaped or wrapped in a
|
<video:description> |
A description of the video. Maximum 2048 characters. All HTML entities must be escaped
or wrapped in a
|
<video:content_loc> |
A URL pointing to the actual video media file. The file must be one of the supported formats. Additional guidelines
|
<video:player_loc> |
A URL pointing to a player for a specific video. Usually this is the
information in the Additional guidelines
|
Recommended tags | |
---|---|
<video:duration> |
The duration of the video, in seconds. Value must be from |
<video:expiration_date> |
The date after which the video is no longer be available, in W3C format. Omit this tag if your video does not expire. If present, Google Search won't show your video after this date. For recurring videos at the same URL, update the expiration date to the new expiration date. Supported values are complete date ( Example: |
Optional tags | |
---|---|
<video:rating> |
The rating of the video. Supported values are float numbers in the range 0.0 (low) to 5.0 (high), inclusive. |
<video:view_count> |
The number of times the video has been viewed. |
<video:publication_date> |
The date the video was first published, in
W3C format.
Supported values are complete date ( Example: |
<video:family_friendly> |
Whether the video is available with SafeSearch. If you omit this tag, the video is available when SafeSearch is turned on. Supported values:
|
<video:restriction>
|
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 Attributes:
Example: This example allows the video search result to be shown only in Canada and Mexico:
|
<video:platform> |
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 Supported values:
Attributes:
Example: The following example allows users on web or TV, but not mobile
devices: |
<video:requires_subscription> |
Indicates whether a subscription is required to view the video. Allowed values are
|
<video:uploader> |
The video uploader's name. Only one Attributes:
|
<video:live> |
Indicates whether the video is a live stream. Supported values are |
<video:tag> |
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
|
Deprecated tags and attributes
We removed the following tags and attributes from our documentation:
<video:category>
, <video:gallery_loc>
, the
autoplay
and allow_embed
of the
<video:player_loc>
tag, the <video:price>
tag and its
attributes, and the <video:tvshow>
tag and its attributes. See the
deprecation announcement
for more information.
Sitemap alternative: mRSS
While Google recommends using video sitemaps and schema.org's
VideoObject
to mark up your videos, we also support mRSS feeds.
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.
You can find more documentation on media feeds at rssboard.org.
mRSS Example
Here's an example of an mRSS entry that provides all the key tags that Google uses.
This includes <dcterms:type>live-video</dcterms:type>
, which you can
use to identify live, streaming videos.
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/"> <channel> <title>Example MRSS</title> <link>https://www.example.com/examples/mrss/</link> <description>MRSS Example</description> <item xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/"> <link>https://www.example.com/examples/mrss/example.html</link> <media:content url="https://www.example.com/examples/mrss/example.flv" fileSize="405321" type="video/x-flv" height="240" width="320" duration="120" medium="video" isDefault="true"> <media:player url="https://www.example.com/shows/example/video.swf?flash_params" /> <media:title>Grilling Steaks for Summer</media:title> <media:description>Get perfectly done steaks every time</media:description> <media:thumbnail url="https://www.example.com/examples/mrss/example.png" height="120" width="160"/> <media:price price="19.99" currency="EUR" /> <media:price type="subscription" /> </media:content> <media:restriction relationship="allow" type="country">us ca</media:restriction> <dcterms:valid xmlns:dcterms="http://purl.org/dc/terms/">end=2020-10-15T00:00+01:00; scheme=W3C-DTF</dcterms:valid> <dcterms:type>live-video</dcterms:type> </item> </channel> </rss>
mRSS Tags
The full mRSS specification contains more optional tags, best practices, and examples. Once you have an mRSS feed, you can submit it just like any other sitemap.
Required tags | |
---|---|
<media:content> |
Encloses information about the video. Attributes:
For all of the other optional attributes and child fields of the |
<media:player> |
You must specify at least one of A URL pointing to a player for a specific video. Usually this is the
information in the |
<media:title> |
The title of the video. Maximum 100 characters. All HTML entities must be escaped or wrapped in a CDATA bock. |
<media:description> |
The description of the video. Maximum 2048 characters. All HTML entities must be escaped or wrapped in a CDATA block. |
<media:thumbnail> |
A URL pointing to a preview thumbnail. Follow the Video thumbnail requirements. |
Optional tags | |
---|---|
<dcterms:valid> |
The publication and expiration date of the video. Here's the
Full
specification of the Example: <dcterms:valid> start=2002-10-13T09:00+01:00; end=2002-10-17T17:00+01:00; scheme=W3C-DTF <dcterms:valid> |
<media:restriction> |
A space-delimited list of countries where the video may or may not be played, in
ISO 3166 format. If
there is no Attributes:
Learn more about using country restrictions. Example: <media:restriction relationship="allow" type="country">us ca</media:restriction> |
<media:price> |
The price to download or view the video. Don't use this tag for videos that are available without payment. More
than one Attributes:
|