All posts
SEO Basics

What Is a Sitemap Index File? (And When Does Your Site Need One?)

If your sitemap has grown beyond 50,000 URLs — or you want to organise it by content type — a sitemap index file is the answer. Here's how it works.

June 15, 2026·4 min read

A single XML sitemap file can hold up to 50,000 URLs and must stay under 50 MB. For small and medium-sized sites, one file is plenty. But once you cross either limit — or when you want to organise your sitemap by content type — you need a sitemap index. This post explains what it is, what it looks like, and exactly when to use it.

What Is a Sitemap Index File?

A sitemap index is a file that lists other sitemap files. Instead of containing individual page URLs, it acts as a table of contents that points search engines to several separate sitemaps. You submit the index file once to Google Search Console and Google follows the links to each child sitemap.

A sitemap index looks like this:

<?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-06-15</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-posts.xml</loc>
    <lastmod>2026-06-15</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
    <lastmod>2026-06-15</lastmod>
  </sitemap>
</sitemapindex>

Each <sitemap> entry points to a child sitemap file that contains actual page URLs. The child sitemaps follow the normal sitemap format with <urlset> and <url> entries.

When to Use a Sitemap Index

You have more than 50,000 URLs

This is the hard limit. A single sitemap file cannot contain more than 50,000 URL entries. If your site is this large, you have no choice — split into multiple files and use an index to reference them. Split logically: by content type (pages, posts, products) or alphabetically, so each child sitemap is easy to audit.

Your sitemap exceeds 50 MB

The 50 MB limit applies to the uncompressed file size. In practice you'll rarely hit this before the 50,000 URL limit, but if you have very long URLs or include optional metadata for many entries, file size can become a constraint first.

You want to organise by content type

Even if you're under the URL limit, splitting by content type is a good practice for larger sites because it makes auditing much easier. When Google Search Console shows a sitemap error, you immediately know which part of your site is affected. You can also update or resubmit individual child sitemaps independently — if you add 500 new products, you can prompt Google to re-fetch the products sitemap without touching the pages or blog sitemap.

Sitemap Index Rules and Limits

  • A sitemap index can reference up to 50,000 child sitemaps. You are almost certainly never going to hit this.
  • Each child sitemap still follows the 50,000 URL / 50 MB limits.
  • All child sitemaps must be on the same host as the index file. You cannot have an index on example.com pointing to sitemaps on cdn.example.com — they must share a domain.
  • Submit the index file URL to Google Search Console — you don't need to submit each child sitemap separately. Google follows the links.

Platforms That Use Sitemap Indexes Automatically

Several platforms generate a sitemap index by default, even for smaller sites:

  • Yoast SEO and Rank Math — generate a sitemap index at /sitemap_index.xml that organises URLs by post type and taxonomy.
  • Shopify — generates an index at /sitemap.xml linking to sub-sitemaps for products, collections, pages, and blogs.
  • Next.js — can generate a sitemap index programmatically from app/sitemap.ts, or you can use the next-sitemap package for automatic splitting.

When You Don't Need One

If your site has fewer than 50,000 indexable URLs and your sitemap file is under 50 MB, a single sitemap works fine. A sitemap index adds a layer of structure but no inherent SEO benefit for smaller sites. The only reason to add one early is if you want the organisational clarity of splitting by content type — which is a matter of preference, not requirement.

Try it free

Generate and check your sitemap in minutes

Crawl up to 2,000 URLs for free — no credit card required. See your health score and download your sitemap XML instantly.

Generate your sitemap →