Skip to main content
XMLDir

Search 309 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, blog and product.

Sitemap index

<sitemapindex>

The root element of a sitemap index: a list of sitemaps rather than a list of URLs, in the same namespace as an ordinary sitemap.

A sitemap index shares its namespace with a sitemap and differs only in its root element and children. That is what makes the two easy to confuse and easy to detect: whichever root element is present decides which set of rules applies.

An index may point at up to 50,000 sitemaps, and it may not point at another index. One level of nesting is all the protocol allows.

Parent
None — this is the document element
How many
Exactly one, as the document element.

What it contains

Attributes

  • xmlnsrequiredThe sitemaps.org 0.9 namespace, exactly as on a sitemap.

Cardinality and constraints

Exactly one, as the document element.

  • Same namespace as a sitemap: http://www.sitemaps.org/schemas/sitemap/0.9.
  • At most 50,000 <sitemap> children and 50 MB uncompressed.
  • An index may not contain another index — nesting is one level deep.

What our validator does

Detected by its root element and checked separately from a sitemap: child count, missing <loc> and lastmod coverage.

Broken and fixed

Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.

broken
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</sitemapindex>
Sitemap index contains no child sitemaps.
fixed
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-1.xml</loc>
    <lastmod>2026-08-10</lastmod>
  </sitemap>
</sitemapindex>
No errors. Warnings may remain — a conforming feed can still be missing a self link — but nothing here is wrong.

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.