Skip to main content

Search 400 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, guides, blog and product.

Sitemaps guide

How to split a large XML sitemap

Divide a sitemap before it crosses protocol limits, build a sitemap index, and choose boundaries that make failures and Search Console reports useful.

7 min read · Updated 2026-08-21

The short answer

Keep each sitemap below 50,000 URLs and 50 MB uncompressed, then list the child sitemap URLs in a sitemap index. Split by stable site section or content type when possible, because meaningful boundaries make count drops and indexing problems diagnosable.

Split before the hard limit

The protocol limits apply to each sitemap file. Compression reduces transfer size but does not change the uncompressed 50 MB limit, and a sitemap index has its own 50,000-child limit.

Leave headroom. A file generated at exactly 50,000 URLs has nowhere to put the next page and turns normal growth into an incident.

Use stable, observable boundaries

A good split mirrors how the site is operated: products, articles, locations, videos, or languages. A purely numeric split is valid, but sitemap-004.xml tells you much less than products-eu.xml when one group suddenly loses half its URLs.

  • Keep one canonical URL in one child sitemap.
  • Keep child filenames stable as counts change.
  • Do not mix sitemap and sitemap-index roots in one file.
  • Expose child counts so sudden drops can be alerted on.

Build the index

The sitemap index lists absolute URLs to child sitemaps. Its optional lastmod describes the child sitemap file, not every page inside it.

Sitemap index
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemaps/products.xml</loc>
    <lastmod>2026-08-20</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemaps/articles.xml</loc>
    <lastmod>2026-08-19</lastmod>
  </sitemap>
</sitemapindex>

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.