A sitemap index file is an XML file that lists other sitemap files instead of page URLs. You need one when a single sitemap would pass 50,000 URLs or 50MB uncompressed, and it's also worth having when you want Search Console to report on each section of your site separately. You submit the index once, and search engines fetch the child sitemaps from it. Below you'll find the exact structure, the limits, the submission routes and the errors that trip people up. Pingfloat's free tools can help you check that the files behave once they're live.
TL;DR
- A sitemap index uses a
sitemapindexroot and lists sitemaps. A regular sitemap usesurlsetand lists pages. - Each child sitemap can hold 50,000 URLs and 50MB uncompressed. One index can list 50,000 sitemaps.
- Submit only the index, in Search Console or with a
Sitemap:line in robots.txt. Indexes can't be nested. - Keep
lastmodin W3C datetime format and only change it when the content really changed. - Every child URL should answer with a plain 200, no redirect, no login, no bot challenge.
Table of Contents
- Sitemap index vs sitemap: what's actually different
- When you need an index, and the limits that matter
- What a valid sitemap index file looks like
- Building and publishing the index
- Submitting the index to Google and Bing
- Checking the index and fixing errors
- Keeping the files reachable with Pingfloat
- Our view on sitemap indexes
- FAQ
- Sources
Sitemap index vs sitemap: what's actually different
A regular sitemap is a list of pages you want crawled. Its root element is urlset, and each entry points to a real page on your site. A sitemap index is a list of those lists. Its root element is sitemapindex, and each entry points to another sitemap file. Google reads the index, then crawls each sitemap it lists.

The two-tier design exists because a single sitemap has a hard ceiling. The sitemaps.org protocol caps one sitemap at 50,000 URLs and 50MB (52,428,800 bytes) uncompressed. Past that point you split the URLs across several files, and the index is the one address that ties them together.
So the choice is simple. If your site has a few thousand URLs, one sitemap is fine, and an index adds nothing. If you're near the ceiling, or you run a store, a publication or a documentation site with distinct sections, use an index. Many CMS platforms and SEO plugins create one for you automatically. Yoast's specification, for example, puts the index at /sitemap_index.xml and splits each content type into its own sitemaps of 1,000 items by default. That means a small WordPress site can have an index without ever hitting the 50,000 limit.
When you need an index, and the limits that matter
The numbers worth memorizing, all from the sitemaps.org protocol:
| Item | Limit |
|---|---|
| URLs per child sitemap | 50,000 |
| Size per child sitemap | 50MB uncompressed (gzip allowed) |
| Sitemaps per index | 50,000 |
| Size of the index file | 50MB (can be compressed) |
Multiply the first and third rows and one index can theoretically cover 2.5 billion URLs. Nobody needs that, but it shows the index itself will almost never be your bottleneck. The child files are.
Google adds a few rules of its own in its large-sitemaps guide. Listed sitemaps must live on the same site as the index (cross-site submission is the exception), in the same directory or lower. You can submit up to 500 sitemap index files per site in Search Console. Nested indexes aren't supported, so an index can't list another index.
The directory rule catches people. An index at /blog/sitemap_index.xml can list /blog/posts.xml but not /products.xml. If you want one index covering the whole site, put it at the root.
There's a second reason to split that has nothing to do with limits. Google notes that submitting several sitemaps and index files helps you track each one's performance in Search Console. If you split by content type (posts, products, categories, static pages), an error report points straight at the section that's broken. A single 40,000-URL file tells you almost nothing about where the problem sits.
Keep each child comfortably under the cap. A file at 49,900 URLs works until a bulk import adds a thousand more and the file silently becomes invalid. Splitting at 10,000 to 25,000 URLs leaves room to grow. We cover the same ground from the validation side in our guide to sitemap best practices.
What a valid sitemap index file looks like
The protocol asks for very little. The file must be UTF-8, start with an opening sitemapindex tag and end with the closing one, include a sitemap parent entry for each child, and give each a loc child holding the sitemap's URL. lastmod is optional. Here's a complete file:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap-posts.xml</loc>
<lastmod>2026-11-27T09:30:00+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-products.xml</loc>
<lastmod>2026-12-01</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-pages.xml.gz</loc>
</sitemap>
</sitemapindex>
The namespace, http://www.sitemaps.org/schemas/sitemap/0.9, is the same one regular sitemaps use. The loc can point to a sitemap, an Atom file, an RSS file or a plain text file, and it has to be on the same host as the index. The protocol's own example is that www.yoursite.com works but example.com or a different subdomain doesn't. Google's documentation says the same: each loc is capped at 50,000 entries and lastmod must be in W3C Datetime format.
A few details that cost people hours:
- Use full absolute URLs in every
loc. A relative path is reported as an incomplete URL. - Escape special characters such as ampersands with entities, and save as UTF-8, as Digital.gov advises.
- Write
lastmodas raw W3C datetime, like2026-08-27T15:51:00+00:00. The SEO Framework's documentation warns that a prettified date or a space instead of the T makes the value invalid, and crawlers may ignore it. - Make the index's
lastmodfor each child match the newestlastmodinside that child, not the date you last ran your build script.
That last point matters more than it looks. If every sitemap claims it changed today, Google learns the dates aren't reliable and can stop using them, including for pages that did change. A lastmod is a promise; only make it when it's true.
Building and publishing the index
There are two routes: let your platform generate it, or generate it yourself from your database or build step.
If you use a CMS or an SEO plugin, switch its sitemap feature on and find the index URL it produces. Typical paths are /sitemap_index.xml or /sitemap.xml. Open it in a browser and confirm that it shows the sitemapindex structure, then open two or three children to confirm they list the pages you expect. Check that noindex pages, redirected URLs and staging URLs aren't in there. If a page is noindexed, it shouldn't be in a sitemap, and our checklist on unexpected noindex shows how those mismatches creep in. Same for canonicals: listing a URL whose canonical points elsewhere sends mixed signals, which our article on canonical tag mistakes walks through.
If you generate it yourself, the routine is short:
- Pull the canonical, indexable, 200-status URLs from your data source.
- Chunk them into files well under 50,000 URLs, grouped by content type so reports stay readable.
- Write each chunk as a
urlsetfile. Gzip them if size is a concern. - Write the index with one
sitemapentry per chunk, with an accuratelastmodfor each. - Upload everything to the same host, with the index at the root if it should cover the whole site.
- Regenerate on a schedule or on publish, and never leave the old files to go stale. Sites that publish constantly do better with dynamic sitemaps that update themselves than with a file edited by hand.
One warning for step 5: don't rely on a redirect to move a child file. A child that 404s or redirects breaks that whole branch of coverage while the index itself stays valid XML, so nothing looks wrong until pages stop being discovered. Every child should answer 200 directly.
Submitting the index to Google and Bing
You submit one file: the index. Google says you can send it through the Search Console Sitemaps report, the Search Console API, or a Sitemap: line in robots.txt. The sitemaps.org protocol agrees that with an index you only list the index in robots.txt, not each child.
The robots.txt version is one line:
Sitemap: https://www.example.com/sitemap_index.xml
It has to be an absolute URL. If you're unsure how that line sits among your other rules, our robots.txt examples show it in context. Make sure no Disallow rule blocks the sitemap paths themselves.
In Search Console, open Sitemaps, paste the index path and submit. Google's help page is clear that submitting only tells Google where the file is. You can't upload a sitemap to Google. Submitting through the report needs owner permissions; if you don't have them, the robots.txt line works instead.
Do you need to submit the children as well? No. Google's John Mueller has said that submitting only the index is enough and Google fetches the children on its own schedule, as reported by a marketing aggregator. Submitting a child separately is only useful if you want its own line in the report.
One thing to drop from old tutorials: pinging a search engine with a URL. The seogeoaeo.ai guide notes that Google's ping endpoint was retired and now returns a 404, so use Search Console or robots.txt.
Checking the index and fixing errors
Start in the Sitemaps report. Click the index and expand its details. Google lists the index-specific errors there, and three of them cover most failures:
| Error | What it means | Fix |
|---|---|---|
| Too many sitemaps | The index lists more than 50,000 sitemaps | Split into several index files |
| Invalid URL in sitemap index file: incomplete URL | A loc isn't a full URL | Use the complete path, including protocol and host |
| Incorrect sitemap index format: nested sitemap indexes | The index lists another index | List only sitemaps, flatten the structure |
These come straight from Google's Sitemaps report help. Beyond them, the symptoms you'll meet are usually about the children:
- Discovered pages equals the count of just one child. The other children aren't being parsed or are failing. Open each one directly.
- URL not allowed. A child or its URLs sit on another host, another protocol or a higher directory than the index. Troubleshooting guides trace this symptom to those mismatches, and it's the same rule as the one above. The fix is to move the index up or the children down.
- Couldn't fetch. On a valid file, causes include a robots.txt block, a wrong URL, server errors, unresolved manual actions or low crawl demand. Run a live URL Inspection test and confirm that Crawl allowed is Yes and Page fetch is Successful.
For a fetch failure, open the sitemap URL in a private window. You want a 200 with XML and nothing else: no login, no redirect. Then look at your firewall or CDN for bot challenges and 403 rules that treat Googlebot like a scraper. After a fix, resubmit. According to the same seogeoaeo.ai guide, Google retries a failed sitemap only for a few days, so don't wait for it to notice.
If a sitemap that returned 200 yesterday is failing today, the cause is often your server rather than the XML. A 500 on a child file is a server-side problem, and our reference on the 500 Internal Server Error covers what usually triggers it.
Keeping the files reachable with Pingfloat
A sitemap index fails quietly. The XML stays valid while a child starts returning errors, and you find out weeks later from a coverage report. Pingfloat is a free suite of web tools for developers and IT professionals, and several of them fit this job. The Website Uptime Monitor is there for availability, the SSL Checker covers the certificate on the host serving your sitemaps, and the HTTP response header inspection and the rest of the toolset are on the Pingfloat home page. Core tools need no installation or account.

An expired certificate or an outage on the host that serves your sitemap is exactly the kind of fault that shows up in Search Console as "Couldn't fetch", so it's worth ruling out before you start editing XML. For sites that publish structured data alongside their sitemaps, the Schema Markup Validator is on the same site.
Our view on sitemap indexes
We think most sitemap problems are plumbing problems, not SEO problems. The index is valid, the XML is clean, and then a certificate lapses or a child file starts returning a 500 and nothing tells you.
That's why we build Pingfloat as a set of small tools that each do one job and open instantly. Checking a header, a certificate or a redirect shouldn't need a signup or an install, so the core tools don't ask for either. When you split a big site into a dozen child sitemaps, you've created a dozen more URLs that can break, and a quick way to look at each one is worth more than another dashboard.
Our advice is to keep the structure boring: one index at the root, children grouped by content type, honest
lastmodvalues, and a singleSitemap:line in robots.txt. Then keep the host healthy with uptime and SSL checks so the files are always there when a crawler comes by.Andreas
FAQ
Can a sitemap index list another sitemap index?
No. Google doesn't support nested indexes, and Search Console reports an error if it finds one. If you have too many sitemaps for one index, which means more than 50,000, split them across several index files. Google allows up to 500 index files per site in Search Console, and you submit each one.
Should I submit every child sitemap as well as the index?
Submitting the index is enough. Google fetches the children listed in it on its own schedule. You can submit a child separately if you want its own entry in the Sitemaps report, but it's optional.
Do I need a sitemap index if my site is small?
Usually not. A single sitemap handles up to 50,000 URLs and 50MB uncompressed, which covers most sites. Add an index when you approach those limits or want per-section reporting. Many CMS plugins create one anyway, and that's fine.
What is the correct format for lastmod?
W3C Datetime. A full timestamp such as 2026-08-27T15:51:00+00:00 works, and so does a plain date such as 2026-08-27. Don't use a localized or human-readable date, because crawlers can ignore an invalid value. Only update it when the content of that sitemap changed.
Sources
- Sitemap index - Search Console Help
- Manage Your Sitemaps With Sitemap Index Files | Google Search Central
- Build and Submit a Sitemap | Google Search Central
- Sitemaps report - Search Console Help
- sitemaps.org - Protocol
- An introduction to XML sitemaps | Digital.gov
- Yoast SEO XML Sitemaps: Functional specification
- All You Must Know About Sitemaps | The SEO Framework
- How to check and validate your XML sitemap | seogeoaeo.ai
- Sitemap Index Search Console Guide: Fix Ignored Sitemaps
- Stop Stale Sitemaps: Dynamic Sitemaps for SEO Developers
