Skip to main content
Back to blog
Technical SEO

E-commerce sitemap: which products, how many, how

On a 50,000-SKU catalog, a poorly split sitemap can cost weeks of indexing. Here’s the method to structure a product sitemap that works.

#sitemap#indexing#technical seo#crawl budget
E-commerce sitemap: which products, how many, how

E-commerce sitemap: which products, how many, how

An XML sitemap is supposed to help Google discover your pages. On a small site, that is almost automatic. On an e-commerce catalog with 10,000 or 100,000 SKU, a poorly structured sitemap is one of the main causes of under-indexing: thousands of products Google never crawls because your sitemap sends the wrong signal.

Here is the method for structuring a product sitemap that works, with the real rules and limits you only see in production.

The 50,000-URL limit (and what it really means)

A sitemap XML file can contain only 50,000 URLs maximum, with a max size of 50 MB uncompressed. That is specified in the sitemap.xml protocol.

But 50,000 URLs is the technical limit — the practical limit is lower. Google implicitly recommends staying under 10,000-20,000 URLs per file so its crawler can process each URL properly. Beyond that, it may sample and ignore tail-end URLs.

Operational rule: 5,000-20,000 URLs per sitemap file is the optimal range. Above that, shard it.

Sitemap index and sharding

For a catalog of 50,000 products, build a sitemap index that points to several child sitemaps:

/sitemap.xml (index, contains links to the child files):

<?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-04-23</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products-2.xml</loc>
    <lastmod>2026-04-23</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products-3.xml</loc>
    <lastmod>2026-04-23</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2026-04-23</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
    <lastmod>2026-04-23</lastmod>
  </sitemap>
</sitemapindex>

Recommended sharding strategy for a catalog:

  • sitemap-products-{N}.xml — products, 10,000 URLs per file
  • sitemap-pages.xml — static pages (home, about, pricing, etc.)
  • sitemap-blog.xml — blog posts
  • sitemap-categories.xml — product category pages

Rule: one sitemap index per domain, multiple child sitemaps. Submit only the index to Google Search Console — not each child file.

The lastmod that lies (and why it is toxic)

Many stores set <lastmod> to today’s date to “tell Google the page changed.” That is a trick Google has learned to detect: if every day you declare 10,000 pages changed but they did not actually change, Google ignores all your lastmod values after 2-3 weeks.

Best practice:

  • <lastmod> = actual date of the last modification to the page content (not the crawl date or today’s date)
  • ISO 8601 format: 2026-04-23 or 2026-04-23T14:30:00+02:00
  • Update it only when the product really changes (price, description, images, stock)

If you cannot determine the last modified date, omit the field — that is better than a fake lastmod that hurts your crawler credibility.

Exclude variants (the rule that saves 30% of crawl budget)

On Shopify, each product variant can potentially have a URL with query params:

/products/chaussure-derby?variant=44-noir
/products/chaussure-derby?variant=44-marron
/products/chaussure-derby?variant=45-noir
...

These URLs must NOT be in the sitemap. Why:

  • They are all canonicalized to the parent page /products/chaussure-derby
  • Indexing them creates duplicate content in the Google index
  • They waste your crawl budget

The product sitemap should contain only the canonical URLs of parent products, not variants.

Same logic for:

  • Internal search pages (/search?q=...)
  • Filtered pages (/collections/chaussures?color=noir)
  • Pages with tracking parameters (?utm_source=...)

Simple rule: if a URL has a canonical pointing to another URL, it should not be in the sitemap.

Exclude permanently out-of-stock products

Temporarily out-of-stock products (a few days) should stay in the sitemap — their rankings are an asset worth preserving until stock returns.

Products that are permanently discontinued (never sold again) should be removed from the sitemap AND from the Google index (via 301 redirect or meta robots noindex).

A common bad practice is deleting discontinued product pages and returning 404. Result: you lose external backlinks, reviews, and Google takes 6-12 months to clean its index. Prefer a 301 redirect to a similar product or the parent category.

Submit to GSC + Bing (and why you should also submit to Bing)

Once the sitemap is built, submit it to:

  • Google Search Console: Settings → Sitemaps → Submit https://example.com/sitemap.xml
  • Bing Webmaster Tools: Sitemaps → Submit sitemap
  • Yandex Webmaster (if you target Russia) — rare in 2026

Submitting to Bing is underestimated. Bing + Yahoo = 6-8% of global search traffic, ~15-20% in the US and UK. DuckDuckGo also uses the Bing index. Ignoring Bing = ignoring 10-20% of potential traffic.

Post-submission monitoring:

  • GSC → Indexing → Sitemaps: check that "Discovered" = number of submitted URLs, and that "Indexed" rises over time
  • If Indexed / Discovered < 50% after 8 weeks, you have a page quality problem (not a sitemap problem)

Resubmission frequency

With a dynamic sitemap (regenerated daily on the backend), Google re-crawls it automatically on its own schedule. No need to submit on every update.

Resubmit manually when:

  • You add 1,000+ new products at once
  • You do a major catalog overhaul
  • You migrate from one platform to another

By platform

Shopify

Sitemap generated automatically at https://<yourshop>.myshopify.com/sitemap.xml and /sitemap_products_1.xml, etc. You cannot customize it directly. Limits:

  • Automatically excludes unpublished products and out-of-stock products with "continue selling = off"
  • Updates lastmod correctly
  • Generates an index if there are >5,000 products

WooCommerce

No native sitemap. Options:

  • Yoast SEO: generates a /sitemap_index.xml sitemap with child sitemaps
  • RankMath: same idea, faster to configure
  • XML Sitemaps (dedicated plugin): if you just want a sitemap without a full SEO suite

Recommended configuration: exclude author pages, tags with <5 posts, and date archives.

Headless or custom

Generate it dynamically on the server side. On Next.js, via app/sitemap.ts or pages/api/sitemap.xml. Watch out for sharding if you have >10,000 URLs.

15-minute sitemap audit

Essential checks on your current sitemap:

  • https://example.com/sitemap.xml returns a 200 with a Content-Type of application/xml
  • The sitemap is referenced in robots.txt via Sitemap: ...
  • Number of URLs in the sitemap is consistent with the number of published pages (a gap >10% = problem)
  • No URL with 301/404/500 in the sitemap (test with Screaming Frog)
  • No variant URLs, parameters, or internal search pages
  • lastmod is consistent with reality (not fake "today" on everything)
  • Submitted to GSC + Bing Webmaster Tools

FAQ

How often does Google re-crawl my sitemap?

Google crawls the sitemap as often as it considers relevant — typically daily for large active catalogs, weekly for less dynamic sites. You can force a re-crawl via GSC by clicking "Submit" on an already submitted sitemap.

Should I include the sitemap in robots.txt?

Yes, always. Line: Sitemap: https://example.com/sitemap.xml at the end of robots.txt. Crawlers that do not have access to your GSC (Bing, DuckDuckGo, AI bots) find it that way.

Can I have multiple sitemap indexes?

No. One index per domain. If you need more structure, handle it through the number of child sitemaps inside the single index.

Do sitemaps block crawling of pages not listed?

No. A sitemap is a hint, not an exclusion. Pages not listed can still be crawled if they are linked from other pages. To actually block them, use robots.txt or meta name="robots" content="noindex".

Image and video sitemaps: useful for e-commerce?

Image sitemaps: yes in some verticals (beauty, home decor), they help unlock Google Images indexing and can double traffic for some product types. Video sitemaps: less critical, unless you have a lot of product videos.

My sitemap contains 45,000 URLs in one file and works. Should I shard it?

Yes. Even if it works, sharding to 10,000 URLs per file improves re-crawl frequency and makes adjustments faster (invalidate one shard instead of the whole file). The migration takes only a few hours and brings a 5-15% gain in indexing rate.


Ecomptimize automatically generates an optimized sitemap for your Shopify or WooCommerce catalog. See Ecomptimize for Shopify or Ecomptimize for WooCommerce.


Did you enjoy this article?