Skip to main content
All fixes

SEO, schema, meta tags

Fix Sitemap Too Large: Split sitemap.xml Into a Sitemap Index

The sitemaps protocol caps each file at 50,000 URLs and 50 MB uncompressed. Beyond that, split the sitemap into shards and reference them from a sitemap index file.

What's happening

The sitemaps.org protocol sets two hard limits per file: 50,000 URL entries and 50 MB uncompressed. Cross either threshold and the sitemap is rejected by Google, Bing, and Yandex. In Search Console you will see 'Sitemap is too large' or 'Couldn't fetch' under the Sitemaps report, and none of the contained URLs receive the discovery boost.

The protocol's solution is a sitemap index file: a wrapper XML document that lists child sitemaps. Each child sitemap then carries up to 50,000 URLs, and an index can contain up to 50,000 child sitemaps, giving you 2.5 billion URL capacity total — more than enough for any real site. The index file uses the sitemapindex root element rather than urlset.

Sites that hit this limit are usually programmatic SEO sites, ecommerce catalogs with deep faceting, or job boards. The trap is that a single mega-sitemap that grew past 50k URLs may have been silently truncated or rejected for weeks before anyone notices a coverage drop.

Why it matters

When the sitemap exceeds the limit, Google logs an error and stops processing. The first ~50,000 URLs may still be parsed, but anything past the limit is dropped, which means hundreds of thousands of pages can become invisible to discovery. Indexation rate falls accordingly.

Even when the size is borderline, you lose granularity. A single huge sitemap forces you to debug 'submitted vs indexed' across the whole site at once. Sharded sitemaps by section (blog, products, categories) let you isolate which template has indexation problems.

Bingbot is stricter than Googlebot here — Bing Webmaster Tools will refuse to import an oversized sitemap entirely. So the cost is also the loss of a second discovery channel.

Common causes

  • A site grew past 50,000 URLs without splitting the sitemap.
  • A programmatic SEO build emits one massive sitemap instead of paginating output.
  • Faceted navigation URLs were accidentally included, ballooning the URL count.
  • Image-extension or video-extension entries pushed the file past 50 MB even with fewer URLs.
  • The build process compresses the sitemap but the uncompressed size still exceeds 50 MB.
  • Old sitemap entries were never pruned after a URL structure migration.

Detect this on your site

Run a quick scan with the SEO Auditor. The tool surfaces this exact issue with the records and context needed to apply the fix below.

Open SEO Auditor

How to fix it

  1. 1

    Confirm the size violation

    Run wc -l on the sitemap or check the byte size with curl -sI. Search Console will also show the exact error code under Sitemaps > Couldn't fetch. If the file exceeds 50,000 entries or 50 MB uncompressed, you must split it.

  2. 2

    Shard the sitemap by section

    Create logical shards: /sitemap-blog.xml, /sitemap-products.xml, /sitemap-categories.xml. Sharding by content type makes coverage debugging easier and lets you set different changefreq values per type.

  3. 3

    Build a sitemap index file

    Create /sitemap.xml that uses the sitemapindex root element and lists each child sitemap with a...... entry. The index file itself counts toward the 50 MB / 50k limit, but for child sitemaps not URLs.

  4. 4

    Update robots.txt

    Replace the old Sitemap: directive with one pointing to the new sitemap index. You can also list every child sitemap individually — both are valid — but pointing to the index is cleaner.

  5. 5

    Resubmit in Search Console

    Remove the old oversized sitemap from the Sitemaps report and submit the new index URL. Google will then crawl every child sitemap referenced. Bing Webmaster Tools follows the same flow.

  6. 6

    Add gzip compression

    Sitemaps may be served as.xml.gz to reduce transfer size. The 50 MB cap applies to uncompressed size, but gzipping cuts bandwidth and improves crawl efficiency on large catalogs.

Example

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
    <lastmod>2026-04-29</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
    <lastmod>2026-04-28</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-categories.xml</loc>
    <lastmod>2026-04-25</lastmod>
  </sitemap>
</sitemapindex>

Sitemap index that references child sitemaps

Frequently asked

50 000 URLs per file 50 MB uncompressed per file. A sitemap index can list up to 50 000 child sitemaps so the total addressable URL count is 2.5 billion.

Section-based sharding is more common and easier to maintain. Date-based sharding (one sitemap per month) is useful for news sites because it makes recent content easy for Googlebot to refetch and for you to audit.

Yes Google fetches each child sitemap referenced in the index with the same lastmod-driven prioritization as a flat sitemap. There is no penalty for using an index even if you only have one shard.

Related fixes