By SitemapFixer Team
Updated October 2026

Sitemap Index: What It Is, When You Need One, and How to Build It

Check your sitemap index and the sitemaps inside itCheck My Sitemap

Short answer: a sitemap index is an XML file that lists other sitemaps instead of pages. You need one when a single sitemap would go over the limit of 50,000 URLs or 50 MB, or when you want one sitemap per section (posts, products, languages). You submit only the index, and search engines find the sitemaps inside it. Most platforms, including WordPress, Shopify and SEO plugins, already serve one.

Sitemap index vs sitemap

SitemapSitemap index
ListsPage URLsSitemap URLs
Root tag<urlset><sitemapindex>
Entry tag<url><sitemap>
Max entries50,000 URLs50,000 sitemaps
Optional tagslastmod (plus changefreq, priority, which Google ignores)lastmod only

An index can’t mix the two: it holds only <sitemap> entries, and each child must be a normal sitemap with a <urlset> root.

When you need one

  • You pass the limits. One sitemap holds up to 50,000 URLs and 50 MB uncompressed. Google’s guide says to split a sitemap that is too big and submit the parts together through an index.
  • You want reports per section. With separate sitemaps for posts, products or languages, Search Console shows numbers for each one.
  • Your sitemaps are built in parts. A large shop can rebuild only the product sitemap that changed.

A site with a few hundred pages and one sitemap gains nothing from an index.

The format

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2026-10-12</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products-1.xml.gz</loc>
    <lastmod>2026-10-13T06:00:00+00:00</lastmod>
  </sitemap>
</sitemapindex>
  • <sitemapindex>, <sitemap> and <loc> are required. <lastmod> is optional and marks when that child sitemap file changed.
  • Every <loc> is a full URL. Child sitemaps must be on the same site as the index, in the same folder or a deeper one. So keep the index at the root.
  • Child sitemaps can be gzipped (.xml.gz). Limits count the uncompressed size.

Where platforms put theirs

PlatformIndex URL
WordPress core/wp-sitemap.xml
Yoast SEO, Rank Math/sitemap_index.xml
Shopify/sitemap.xml (links to product, collection, page and blog sitemaps)
BigCommerce/xmlsitemap.php

Next.js: generateSitemaps splits a sitemap into files at /…/sitemap/[id].xml. The docs don’t describe an index file for them, so list those URLs in an index yourself (a route that returns <sitemapindex>), or submit each one. See our Next.js sitemap guide.

How to build one by hand

  1. Split your URLs into sitemaps of at most 50,000 URLs each, ideally by section.
  2. Upload them, for example /sitemap-posts.xml and /sitemap-products-1.xml.
  3. Write the index file listing each one, and upload it to your site root.
  4. Open every child URL once. Each must return 200 and valid XML.
  5. Add Sitemap: https://example.com/sitemap_index.xml to robots.txt and submit the index.

Submitting it

In Search Console, open Sitemaps, enter the index URL and submit. The report labels it “Sitemap index”, and its discovered pages count all URLs in its child sitemaps (each URL counted once). You can submit up to 500 index files per site. In Bing Webmaster Tools, submit the index the same way. See submit to Google and submit to Bing.

Errors Google reports for sitemap indexes

Nested sitemap indexes

Search Console’s help says this means an entry in your index “uses its own URL or the URL of another sitemap index file.” Remove those entries so the index lists only regular sitemaps, then resubmit.

Too many sitemaps

The index lists more than 50,000 sitemaps. Split it into several index files.

A child sitemap fails

A child that returns 404 or 5xx, or isn’t valid XML, can’t be read. Open each child URL and check. Our sitemap not working guide covers “Couldn’t fetch” and “could not be read”.

The free sitemap checker reads an index, follows it into the child sitemaps, and tests 30 of the URLs it finds live.

Frequently asked questions

Do I need a sitemap index?

Only if one sitemap is not enough: more than 50,000 URLs, more than 50 MB uncompressed, or you want separate sitemaps per section. Small sites can use a single sitemap.

Should I submit the index or each child sitemap?

Submit the index. Google reads it and finds the child sitemaps. Submitting a child sitemap as well is allowed if you want its own line in the Sitemaps report.

Can a sitemap index list another sitemap index?

No. Search Console reports that as "Nested sitemap indexes". An index can list only regular sitemaps.

How many sitemaps can one index hold?

Up to 50,000. Above that, Search Console shows a "Too many sitemaps" error; split it into several index files. You can submit up to 500 index files per site.

What does lastmod mean in a sitemap index?

The time the child sitemap file changed, in W3C Datetime format. It is optional.

Test your sitemap index
Free - reads the index, its sitemaps, and tests 30 URLs live
Check My Sitemap Free

Related guides