Sitemap Index File: What It Is and When You Need One
A sitemap index file is a special XML file that points to multiple individual sitemaps instead of listing URLs directly. Think of it as a table of contents for your sitemaps. A single XML sitemap is limited to 50,000 URLs and 50MB. If your site exceeds either limit, you need to split your URLs across multiple sitemaps and use an index file to tie them together.
When You Need a Sitemap Index
You need a sitemap index when your site has more than 50,000 URLs, when you want to organize different types of content into separate sitemaps (posts vs products vs images), or when your sitemap file exceeds 50MB. Even with fewer URLs, many large sites use a sitemap index to organize content by type - it makes it easier to see which sections are crawled well and which are not in Google Search Console.
Sitemap Index Format
A sitemap index uses the sitemapindex XML tag instead of urlset. Each entry uses sitemap and loc tags:
Submitting a Sitemap Index to Google
Submit only the index file URL in Google Search Console - you do not need to submit each child sitemap individually. Google reads the index and discovers all the child sitemaps automatically. In Search Console you can see the crawl status of each child sitemap listed under the index, which makes it easy to diagnose which sections have problems.
Sitemap Index vs Regular Sitemap
A regular sitemap (urlset) lists URLs directly. A sitemap index (sitemapindex) lists other sitemaps. The key difference: a sitemap index cannot contain URLs - only references to other sitemap files. If you mistakenly put URL entries inside a sitemapindex tag, Google will report a parse error. Conversely, putting sitemap references inside a urlset tag also causes an error.
How CMSs Handle Sitemap Indexes
WordPress with Yoast SEO creates a sitemap index at /sitemap_index.xml that links to separate sitemaps for posts, pages, categories, and tags. Shopify creates sitemap.xml as a sitemap index linking to product, page, collection, and blog sitemaps. Ghost splits into posts, pages, tags, and authors. If you are building a custom site, generate the index file automatically on deploy or on a schedule, updating the lastmod date each time a child sitemap changes.