Sitemap Index vs Sitemap: What Is the Difference?
The Core Difference
An XML sitemap is a file that lists URLs you want Google to crawl and index. It contains <url> entries with <loc>, optional <lastmod>, <changefreq>, and <priority> elements. A single sitemap can contain up to 50,000 URLs and must be under 50MB uncompressed.
A sitemap index is a file that references multiple XML sitemaps. It contains <sitemap> entries — each pointing to a child sitemap file with its own URL — instead of <url> entries pointing to your pages. You submit the sitemap index to Google Search Console once, and Google fetches all the child sitemaps it references.
In short: a regular sitemap contains your pages; a sitemap index contains links to your sitemaps.
When Do You Need a Sitemap Index?
You need a sitemap index when any of these apply:
- Your site has more than 50,000 indexable URLs
- Your sitemap file would exceed 50MB uncompressed
- You want to submit separate sitemaps per content type (products, blog posts, categories) for cleaner GSC reporting
- You want to submit separate sitemaps per language or region for international sites
- Your site generates sitemaps automatically per section (most CMS platforms and framework generators do this)
For sites under 50,000 URLs that do not need per-section reporting, a single sitemap is simpler and works equally well. The sitemap index adds a layer of indirection — there is no SEO benefit to using it purely for organizational preference on a small site.
Sitemap Index XML Format
A sitemap index file uses the sitemapindex root element instead of urlset:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-posts.xml</loc>
<lastmod>2026-04-24</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2026-04-24</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
<lastmod>2026-04-24</lastmod>
</sitemap>
</sitemapindex>The <lastmod> in a sitemap index entry refers to when the child sitemap file was last updated — not when the URLs inside it were last modified. Update it when you regenerate the child sitemap. A sitemap index itself has no URL limit — you can reference up to 50,000 child sitemaps, giving you a theoretical ceiling of 2.5 billion URLs per domain.
Sitemap Index in WordPress, Next.js, and Other Platforms
WordPress with Yoast SEO: Yoast automatically creates a sitemap index at /sitemap_index.xml that references separate sitemaps for posts, pages, categories, tags, and authors. Submit /sitemap_index.xml to GSC — Yoast handles the splitting automatically based on URL count.
Next.js (App Router): Next.js 13.3+ supports automatic sitemap splitting via generateSitemaps() in your sitemap.ts file. Return an array of IDs from generateSitemaps(), and Next.js creates /sitemap/0.xml, /sitemap/1.xml, etc., with an auto-generated sitemap index at /sitemap.xml.
Shopify: Shopify generates a sitemap index at /sitemap.xml by default, with separate child sitemaps for products, collections, pages, and blogs. No configuration required — just submit /sitemap.xml.
BigCommerce: BigCommerce uses /xmlsitemap.php as its sitemap index endpoint. Child sitemaps are generated per content type (products, categories, pages) and referenced from this index. Submit the /xmlsitemap.php URL to GSC.
Submitting a Sitemap Index to Google Search Console
Submit only the sitemap index URL in GSC — not each child sitemap individually. Google follows the child sitemap references from the index automatically. Under Indexing > Sitemaps, enter the sitemap index URL (e.g., sitemap.xml or sitemap_index.xml) and click Submit. GSC shows the total “Discovered URLs” count across all referenced child sitemaps and the last fetch date for each.
If you do submit child sitemaps individually in GSC (which is allowed but unnecessary), you get more granular reporting per child sitemap — indexed vs submitted counts for products separately from blog posts, for example. This is the main practical reason to submit child sitemaps individually: better segment-level data for diagnosing which content type has indexation problems.
Common Sitemap Index Mistakes
Child sitemaps not returning 200: If a child sitemap URL referenced in your index returns a 404 or 5xx, Google cannot process those URLs. The parent index will show an error in GSC. Check each child sitemap URL directly in your browser.
Nesting sitemap indexes: You cannot reference a sitemap index from another sitemap index — Google only follows one level of nesting. Child sitemaps in your index must be regular XML sitemaps (with <url> entries), not other sitemap index files.
Mixed namespaces: Using sitemapindex namespace in a child sitemap (instead of urlset) breaks the parser. Each child sitemap must use the urlset root element. Only the parent file uses sitemapindex.
Referencing child sitemaps with relative URLs: All URLs in a sitemap index must be absolute, including the <loc> of child sitemaps. /sitemap-products.xml is invalid — it must be https://example.com/sitemap-products.xml.