ContentForceBlogStart free trial

Glossary

What Is a Video Sitemap? Complete Guide

Definition

A video sitemap is an XML file that lists the videos on your pages and gives search engines the metadata for each one: title, description, thumbnail, duration and the location of the video file. Google recommends it for helping its crawlers find recently added videos or videos they might not otherwise discover.

  • A video sitemap adds video tags in their own namespace to a standard XML sitemap, inside the same url entries
  • Every video needs a thumbnail, title and description plus either a content_loc or a player_loc
  • A sitemap does not guarantee indexing: the host page must be indexed and the video visible with a valid thumbnail
  • VideoObject schema describes the same video as JSON-LD on the page, so field values should match the sitemap

A video sitemap is an XML file that lists the videos on your pages and gives search engines the metadata for each one: title, description, thumbnail, duration and the location of the video file. It is a normal sitemap with an extra set of video tags, and Google recommends it for helping its crawlers find content that was recently added or that they might not otherwise discover.

This guide covers what goes into the file, how to create it by hand, with a short script or with a WordPress plugin, how to submit it in Google Search Console, and what Google checks before a video is indexed. If you are new to sitemaps in general, the guide to sitemaps and SEO explains the basics first.

What Is a Video Sitemap?

A video sitemap is a sitemap that carries additional information about videos hosted on your pages, and it's easier to build than it sounds. Each <url> entry points to a page, and nested <video:video> blocks describe the videos on that page. The video tags live in their own namespace, http://www.google.com/schemas/sitemap-video/1.1, which you declare at the top of the file.

A sitemap itself is simply a file that lists the URLs of a site so search engines can find them. A video XML sitemap does the same for videos, and because the format is plain XML you can write it in a text editor, generate it with a script or let a plugin output it. Google's video sitemap format is the one this guide covers.

You can run a separate video sitemap, or add the video tags to a sitemap you already have. Both work, so pick whichever is easier to maintain. Don't overthink it. An alternative format, the mRSS feed, is also supported and is covered in the FAQ below.

Why Video Sitemaps Matter for SEO

A sitemap hands Google a list of videos instead of leaving it to find them through links and rendering. That really helps in three situations:

  • New videos. It's common for a freshly published video to wait for a crawl; here a freshly published video appears in the file with its metadata, so Google doesn't have to wait until it stumbles across the player.
  • Videos that are hard to discover. Players that load through JavaScript or sit deep in a site are easy to miss, but the sitemap names the page and the video explicitly.
  • Large video libraries. A structured list keeps hundreds of videos consistent, and the Search Console reports show which ones Google processed.

A sitemap clearly doesn't guarantee anything, and it isn't a ranking lever on its own. Google decides whether a video is indexed and shown, of course, and the checks it applies are listed further down. It's a very useful aid for discovery and metadata, but nothing more.

Four checks before Google indexes a video: indexed page, visible embed, valid thumbnail, reachable files.
Google applies these checks to every video, whether it comes from a sitemap, structured data or plain markup.
Test your title tag
SEO Title Generator: eight title tag variations, sized for the SERP and matched to your topic. Free, no signup.
Generate title tags

Video Sitemap vs Standard XML Sitemap

A standard XML sitemap lists page URLs so search engines know what exists on your site. A video sitemap adds video fields to those entries (thumbnail, duration, content URL and more), which tells Google what each video is and where to fetch it.

FeatureStandard XML SitemapVideo Sitemap
PurposeList crawlable page URLsDescribe the videos on those pages
Extra fieldsNoneThumbnail, title, description, content or player URL, optional duration, dates and restrictions
NamespaceSitemap namespace onlyAlso xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
Size limit per file50 MB uncompressed or 50,000 URLsSame limit
Can be combinedYes, with image and news extensionsYes, inside the same <url> entries

Image and news sitemaps follow the same extension pattern. If a page has a video and images, you can put both kinds of tags into the same <url> entry instead of maintaining three files. The image optimization guide covers the image side.

Required and Optional Video Sitemap Tags

According to Google's video sitemap reference, every video needs a <video:video> parent element plus four required child tags. For the media location you must supply either <video:content_loc> or <video:player_loc>.

Required tags

TagWhat it holdsRules
video:thumbnail_locURL of the thumbnail imageMust be crawlable and sit at a stable URL
video:titleTitle of the videoEscape HTML entities or wrap in CDATA; should match the title shown on the page
video:descriptionDescription of the videoMaximum 2,048 characters; must match the description on the page, though not word for word
video:content_locURL of the actual video fileRecommended; supported file formats only; must differ from the page <loc>
video:player_locURL of a player for the videoUse when there's no file URL, for example an embed; must differ from the page <loc>

You'll need at least one of content_loc and player_loc. Google recommends content_loc whenever you have it, though it's not the only option, because that's the most effective way for Google to fetch the file. For videos from YouTube, Vimeo or other embeddable hosts, use player_loc with the embed URL.

Optional tags

Optional tags give Google more context about each video. Add the ones that are true for your content, but leave the rest out; it's better to skip a tag than to guess.

TagWhat it holdsRules
video:durationLength in seconds1 to 28,800 (8 hours)
video:publication_dateDate first publishedW3C format: YYYY-MM-DD or with time and time zone
video:expiration_dateDate after which the video is no longer availableGoogle Search stops showing the video after this date; omit if the video doesn't expire
video:ratingRating of the video0.0 to 5.0
video:view_countNumber of viewsInteger
video:family_friendlySafeSearch availabilityyes or no; omitted means available with SafeSearch on
video:restrictionCountries where the video may or may not appearSpace-separated ISO 3166 codes with relationship="allow" or "deny"
video:platformDevice types where the video may or may not appearweb, mobile, tv with relationship="allow" or "deny"
video:requires_subscriptionWhether a paid or free subscription is neededyes or no
video:uploaderName of the uploaderMaximum 255 characters; the optional info URL must be on the same domain as <loc>
video:liveWhether the video is a livestreamyes or no
video:tagShort descriptive tagOne element per tag, up to 32 per video

Restrictions and platform tags only affect search results. They don't stop anyone from playing the video by other routes.

Deprecated tags

Google removed these from its documentation, so don't use them in new files:

  • video:category
  • video:gallery_loc
  • video:price and its attributes
  • video:tvshow and its attributes
  • the autoplay and allow_embed attributes of video:player_loc

How to Create a Video Sitemap

Manual XML creation

Here's the plain approach: start with an XML file. Declare the sitemap namespace and the video namespace, then add one <url> entry for each page that contains a video. This minimal example uses the required tags plus a duration, so you'll see the shape of the file at a glance:

<?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://example.com/videos/product-setup/</loc>
    <video:video>
      <video:thumbnail_loc>https://example.com/thumbs/product-setup.jpg</video:thumbnail_loc>
      <video:title>How to set up Example Product</video:title>
      <video:description>A three minute walkthrough of the main setup steps.</video:description>
      <video:content_loc>https://example.com/media/product-setup.mp4</video:content_loc>
      <video:duration>180</video:duration>
    </video:video>
  </url>
</urlset>

If a page holds several videos, add several <video:video> blocks inside the same <url> element. Each tag can appear only once per video, except video:tag.

Videos from YouTube or Vimeo

When the video is hosted on a third-party platform and embedded on your page, there's no file on your server to point to. Use the embed address in player_loc instead of content_loc:

<video:video>
  <video:thumbnail_loc>https://example.com/thumbs/demo.jpg</video:thumbnail_loc>
  <video:title>Product demo</video:title>
  <video:description>A short demo of the dashboard.</video:description>
  <video:player_loc>https://www.youtube.com/embed/VIDEO_ID</video:player_loc>
</video:video>

The <loc> of the entry stays the address of your own page that embeds the player, which isn't the YouTube address. Still, check with the video host that it allows Google to fetch the file if you want eligibility for more video features.

Generating the file from a list

A sitemap generator that crawls a site can't know your video titles, descriptions and thumbnails, so for custom setups the practical route is a script that builds the file from a table you maintain. This Python example reads videos.csv with the columns page_url, thumbnail, title, description, video_file, seconds and writes sitemap-video.xml. It escapes special characters, trims descriptions to 2,048 characters and groups several videos under one page:

import csv
from xml.sax.saxutils import escape

rows = csv.DictReader(open("videos.csv", encoding="utf-8"))
pages = {}
for r in rows:
    pages.setdefault(r["page_url"], []).append(r)

out = ['<?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">']
for page, videos in pages.items():
    out.append(f"  <url>\n    <loc>{escape(page)}</loc>")
    for v in videos:
        out.append("    <video:video>")
        out.append(f"      <video:thumbnail_loc>{escape(v['thumbnail'])}</video:thumbnail_loc>")
        out.append(f"      <video:title>{escape(v['title'])}</video:title>")
        out.append(f"      <video:description>{escape(v['description'][:2048])}</video:description>")
        out.append(f"      <video:content_loc>{escape(v['video_file'])}</video:content_loc>")
        out.append(f"      <video:duration>{int(v['seconds'])}</video:duration>")
        out.append("    </video:video>")
    out.append("  </url>")
out.append("</urlset>")
open("sitemap-video.xml", "w", encoding="utf-8").write("\n".join(out))

Run it on every deploy, but don't skip the check afterwards. A script like this is also the free route, since it costs nothing and needs no plugin licence. host the result in your site root and reference it from your sitemap index. Platforms such as video hosts and CMS plugins do the same job automatically, and that's the better choice when you publish videos regularly, although a script gives you full control.

Size limits and sitemap index files

A single sitemap can hold up to 50,000 URLs and may not exceed 50 MB uncompressed. The limit counts page URLs, and one page can carry several video entries. If you go over, split the entries across several files and list them in a sitemap index file.

Submitting your video sitemap to Google

  1. Upload the file to your site and open it in a browser to confirm it loads.
  2. Open Google Search Console and select your property.
  3. Go to Sitemaps in the left menu, enter the sitemap URL and click Submit.
  4. Check the status in the Sitemaps report, then open the Video indexing report once Google has processed the file to see which videos it indexed.

While it's optional, you can also reference the file in robots.txt with a Sitemap: line, which lets any crawler find it without a manual submission.

Four steps to submit a video sitemap: upload, submit in Search Console, check Sitemaps report, check Video indexing.
Submitting takes minutes. The Video indexing report fills in once Google has processed the file.

How to Create a Video Sitemap in WordPress

If you run WordPress, an SEO plugin usually creates and updates the video sitemap for you, so you won't write XML by hand. The four common options differ in where the feature sits and in what you pay for:

PluginWhere the feature livesNotes
Yoast SEOYoast Video SEOIncluded in Yoast SEO Premium, Yoast WooCommerce SEO and Yoast SEO AI+. Creates and updates XML video sitemaps and adds VideoObject schema.
Rank MathVideo Sitemap moduleEnable it under Rank Math SEO, Dashboard, Modules. It needs the Schema and Sitemap modules switched on. Choose the post types and optional custom fields to scan.
SEOPress PROXML/HTML Sitemap settingsTick Enable XML Video Sitemaps. The file appears as video1.xml on your domain. Video details can be set per post.
All in One SEOSitemaps, Video Sitemap tabAvailable in the Pro plan and above. Supports specific video embed types.

Yoast SEO

Yoast Video SEO is part of Yoast SEO Premium. It generates the XML video sitemap in the background and adds VideoObject schema to pages with embedded videos. It supports embeds from platforms such as YouTube, Vimeo and Wistia. Videos that are set to private before the plugin indexes them may not be recognized.

Rank Math

Rank Math scans your posts for video content and adds each post or page to the video sitemap when it finds one. In the module settings you can hide the sitemap from normal visitors, pick the post types, add custom fields to scan and enter a YouTube API key. Without a key, the default public API is used, which can be less reliable. The same detection also adds Video schema with fields such as thumbnail, embed URL and duration.

SEOPress PRO

SEOPress PRO generates the video sitemap once you enable it under SEO, XML/HTML Sitemap. Each post gets video fields in the SEO box, and a post marked noindex or with a missing video URL is left out. Since version 5.7, the PRO version detects embedded YouTube videos and pulls the title, description and thumbnail from YouTube. If a video is missing, regenerate the sitemap under SEO, Tools, Video Sitemap.

All in One SEO

All in One SEO Pro builds a video sitemap index with one sitemap per content type, for example posts and pages. You open it from Sitemaps, Video Sitemap tab, and you control which content types are included. Only specific video embed types are supported, so check the plugin documentation for your player.

Video Sitemaps for Online Stores

Product pages often carry a demo or an unboxing clip, but that doesn't make them watch pages. Google doesn't treat such a page as a watch page, because the video is complementary: the main purpose of the page is the product, not the video. Examples Google gives for non-watch pages are a product page with a 360 video and a blog post that reviews an embedded video. A non-watch page can still appear as a normal text result and as an image result with a video badge, and you can list its videos in a video sitemap, and there's no penalty for doing so.

To be eligible for the main video features, such as video results and Video mode, a video needs a dedicated watch page, if that makes sense for your business. A shop with many product videos can therefore, although it's extra work, give the most important ones their own landing page and list both in the sitemap, with a unique title and description on each.

Video Sitemap Best Practices

Google applies the general sitemap rules to video sitemaps and adds a few of its own. Frankly, a technical SEO audit is the right place to catch blocked URLs or missing tags before they affect indexing; the technical SEO audit guide walks through it.

  • Thumbnails. Provide a valid thumbnail at a single, stable URL, and don't let it change. The minimum size is 60x30 pixels and larger is preferred. Supported formats are BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. Googlebot and Googlebot Images must be able to fetch it. If a CDN rotates thumbnail URLs quickly, Google may not be able to index the video.
  • Titles and descriptions. Make them unique for each video and consistent with what the page shows; it's a rule Google states directly. The description may be up to 2,048 characters.
  • Relevance. Only list videos that relate to the content of the host page; you shouldn't add clips that don't. A small addendum or an unrelated clip should stay out of the file.
  • Crawl access. Every URL in the file must be reachable without a login and without a firewall block, must not be disallowed in robots.txt, and must use HTTP or FTP. Streaming protocols aren't supported.
  • Supported files. Google can process 3GP, 3G2, ASF, AVI, DivX, M2V, M3U, M3U8, M4V, MKV, MOV, MP4, MPEG, OGV, QVT, RAM, RM, VOB, WebM, WMV and XAP. Data URLs aren't supported.
  • Stable file URLs. Keep video file URLs stable too if you want eligibility for features such as key moments and video previews.
  • Protect against scrapers. If you worry about spammers fetching your file URLs, verify that a request really comes from Googlebot before you serve them.

Why Your Videos May Not Be Indexed

Submitting a sitemap doesn't make a video eligible by itself, however complete it is. Several requirements apply, and any one of them can keep a video out. These indexing requirements apply to every video:

  • The page that hosts the video must itself be indexed, and it needs to perform well in Search before its video can be considered.
  • The video must be embedded on the page and not hidden behind other elements.
  • Content behind a paywall or login needs paywall structured data so that Google can still find the video.
  • The video needs a valid thumbnail at a stable URL.
  • A page that only embeds a video next to other content isn't a watch page, and that limits which video features it can qualify for.

The Video indexing report in Search Console shows how many of your indexed watch pages contain an indexed video and gives reasons for videos that were not indexed. The Performance report has a Videos search appearance filter to monitor how they perform.

Video Sitemap vs VideoObject Schema

Both give Google metadata about the same video, but they sit in different places. The sitemap is a file that lists videos across your site. VideoObject schema is JSON-LD on the page that describes the video next to the content. Google supports structured data, video sitemaps and the Open Graph protocol as ways to provide video metadata, and recommends structured data for your own watch pages, with the sitemap as an optional addition.

Table mapping video sitemap tags to their VideoObject schema properties for thumbnail, file and embed URL.
Same video, two places: the field names differ, the values should not.
Video SitemapVideoObject Schema
Where it livesSeparate XML fileJSON-LD on the video page
ScopeMany videos across the site in one fileOne page and its video
Thumbnail fieldvideo:thumbnail_locthumbnailUrl
File URL fieldvideo:content_loccontentUrl
Embed URL fieldvideo:player_locembedUrl

If you provide the same metadata in both places, it's important to keep the values consistent, and use the same thumbnail URL for each video. Conflicting titles, descriptions or thumbnails between sitemap and markup make it harder for Google to trust either.

How to Test and Validate Your Video Sitemap

First, check the file itself; it's the cheapest test. Open the sitemap URL in a browser and confirm the XML is well formed and every <video:video> block has its required tags. Then use Search Console:

  • Sitemaps report. Shows whether Google fetched the file and how many URLs it found, and lists errors.
  • Video indexing report. Shows which watch pages have an indexed video and why other videos were not indexed.
  • Video rich result report. Lists issues with the VideoObject structured data on your pages.
  • URL Inspection. Confirms that Google can fetch and render a single watch page.

For markup on a single page, run the URL through Google's Rich Results Test. It checks whether Google detects VideoObject markup, yet that's a separate check from the sitemap submission status.

Google Rich Results Test tool interface showing URL input field for structured data validation
Google's Rich Results Test checks whether VideoObject markup is detected on a page, separate from the sitemap submission status. (Source: Google)

If the sitemap shows errors, the usual causes are URLs blocked by robots.txt, thumbnails that return a 404 and missing required tags. Fix the cause and resubmit; you won't need to rebuild anything else. That's usually all it takes.

Frequently Asked Questions

Do I need a video sitemap if I use YouTube?

Your videos on YouTube already have their own watch page there, so you don't need a sitemap for that. If you embed YouTube videos on your own pages, Google may index the video on your page and on YouTube. For your own watch page with an embedded third-party player, Google still recommends structured data, and you may also include these pages in your video sitemap, using the embed URL in player_loc.

Can one page list several videos?

Yes. Put one <video:video> block per video inside the same <url> entry, and give each its own thumbnail, title and description. Each tag appears once per video, so a second video needs its own full set of required tags rather than a shared one.

No, though it helps. The sitemap gives Google the location and metadata of your videos, and Google decides whether to index and show them. That's because the hosting page must be indexed, the video must be visible on it and the thumbnail must be valid and stable.

Can I add video sitemap tags to my existing XML sitemap?

Yes, and it's simple: no second file, no second submission. Declare the video namespace once on the urlset element of your current sitemap and your existing index keeps listing it as before. Separate files only pay off when the video entries are managed by a different system.

What is mRSS and how does it differ from a video sitemap?

mRSS is an RSS extension for syndicating multimedia, and Google supports it as an alternative to the video sitemap. It uses media:content, media:title, media:description and media:thumbnail instead of video:* tags, and Google says it can be tested, submitted and updated like a sitemap. The mRSS title is limited to 100 characters. Google recommends video sitemaps, so mRSS mainly makes sense when you already publish media RSS feeds.

How often should I update my video sitemap?

Indeed, update it whenever you publish a new video or change an existing one, for example a new title, thumbnail or URL. Plugins and video platforms do this automatically, so you don't have to. For a hand-built file, rebuild it in your publishing workflow so it never lags behind the pages.