⌕ Technical SEO

Sitemap indexes for large sites: split, monitor, scale

How to organise sitemaps on a site with many pages: sitemap index, splitting by page type, image and video sitemaps, and diagnosis by section.

On a site with a few hundred pages, a single sitemap generated by the CMS is enough. When pages run into tens or hundreds of thousands, however, the way sitemaps are organised stops being a detail: it becomes a monitoring tool. A good split lets you see within seconds which part of the site has indexing problems.

The sitemap index

Beyond 50,000 URLs or 50 MB uncompressed per file, the protocol calls for splitting the addresses across several sitemaps and listing them in a sitemap index:

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

An index can list up to 50,000 sitemaps. It cannot contain other indexes: the structure has only one level of nesting. In robots.txt and in webmaster tools, declaring the index is enough.

Split with a purpose

The simplest way to split is by count: the first 50,000 URLs in one file, the next ones in the second. It works, but it wastes an opportunity. Much more useful is splitting by page type:

  • a sitemap for corporate pages;
  • a sitemap for categories;
  • a sitemap for product pages, possibly broken down by department;
  • a sitemap for articles, perhaps by year of publication;
  • a sitemap for local pages or store listings.

That way, when webmaster tools show that one sitemap has 80% of its URLs indexed and another 20%, you already know where to look. In my work this split is often the first intervention on a large catalogue: it changes nothing for the engines, but it changes a great deal for whoever has to diagnose problems.

It is also wise to stay well below the limits. Files of 10,000 or 20,000 URLs are faster to generate, download and check, and the reports become more granular.

Image sitemaps

For sites where images are content in their own right, such as catalogues, portfolios or photo archives, you can list the images associated with each page through an extension of the protocol:

<url>
  <loc>https://example.com/products/brass-lamp/</loc>
  <image:image>
    <image:loc>https://example.com/img/brass-lamp-1.jpg</image:loc>
  </image:image>
</url>

The image namespace must be declared in the root element. It is particularly useful when images are loaded by JavaScript or served from a different domain, because in those cases discovery through HTML is less reliable.

Video sitemaps

Similarly, a dedicated extension lets you describe hosted videos: thumbnail URL, title, description, file or player URL, duration. It makes sense if the videos are the page's main content and you want them to appear in video results. For a decorative video at the top of a page, it adds no value.

hreflang in sitemaps

On multilingual sites, hreflang annotations can be placed in the sitemap instead of the HTML. On very large sites this is often the most practical choice: the HTML stays light and the relationships between language versions are managed in one place. Every URL must list all alternatives, including itself.

Generation at scale

With hundreds of thousands of URLs, generating sitemaps on every request is a bad idea: the query may be heavy and the crawler might get a timeout. More robust solutions:

  1. generate the files with a scheduled process and serve them as static files;
  2. regenerate only the sitemaps of sections that changed;
  3. compress them with gzip to reduce transfer;
  4. log every regeneration, so you know when a file changed.

The generation filter must exclude the same URLs the site excludes from the index: unpublished products, pages with noindex, non-canonical variants.

Monitor by section

Sitemap URLs submitted Indexed Reading
categories 1,200 almost all healthy section
products-furniture 18,000 about half check content and duplicates
articles-archive 9,000 few outdated or weak content

The numbers in the example are illustrative, but the reading is the real one: a section with a low ratio signals a problem of quality, duplication or internal linking, not of the sitemap itself.

In short

  • Beyond file limits, use a sitemap index, with a single level.
  • Splitting by page type makes diagnosis immediate.
  • Image and video extensions help only when they are main content.
  • On large sites, sitemaps should be generated on a schedule and served statically.
  • A low indexing rate in a section shows where to intervene.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also