Ecommerce XML Sitemaps
Generic sitemap advice breaks down at catalog scale. This is how to segment an ecommerce sitemap by type, stay under the 50,000-URL/50MB limits with a sitemap index, decide what happens to out-of-stock and discontinued product URLs, keep lastmod honest as inventory turns over daily, and pair sitemaps with IndexNow — plus why splitting by category is for monitoring, not crawl budget.
1 evidence signal on this page
- Related live toolXML Sitemap Validator
An ecommerce XML sitemap lists the canonical URLs a store wants crawled, split by content type (products, categories, brands, static pages) under one sitemap index. The hard limits you design around: 50,000 URLs / 50MB per file, up to 50,000 files per index. Segmentation is for monitoring in Search Console and Bing Webmaster Tools — not a crawl-budget or ranking lever (Mueller). Only include canonical, indexable, 200-status URLs; keep lastmod honest to the last significant change and ignore priority/changefreq (Google ignores both). The differentiator most guides skip is out-of-stock and discontinued products: handle them with a documented decision tree (permanent vs. temporary vs. unknown) and sync sitemap removal with internal-link cleanup, not blanket 404s. Automate generation so the file never goes stale, and pair lastmod with IndexNow for fast price/stock changes.
TL;DR — An XML sitemap is a list of your web addresses that you hand directly to search engines so they can find your pages. For a store with thousands of products, one big list gets unwieldy, so you split it into separate files — one for products, one for categories, and so on — all pointed to by a single index file. The rules that matter most: only list pages you actually want in Google, keep the list fresh automatically, and have a clear plan for what happens to a product’s link when it goes out of stock or gets discontinued.
What an XML sitemap is
Search engines find your pages two ways: by following links, and by reading a sitemap — a file where you simply list the web addresses (URLs) you want them to know about. An XML sitemap is that list, written in a format built for machines rather than people. Evidence for this claim A sitemap tells search engines which site URLs are available for crawling. Scope: A sitemap helps discovery but does not guarantee crawling or indexing. Confidence: high · Verified: Google: Build and submit a sitemap
On a small site, one sitemap file is plenty. On an ecommerce store with thousands or millions of products, that’s where the interesting problems start.
Why ecommerce sitemaps are different
A store’s catalog is big and it changes constantly — products sell out, come back, get discontinued, and get added every day. That creates three practical headaches a normal sitemap guide never has to deal with:
- Size. A single sitemap file can list at most 50,000 URLs (or be 50MB uncompressed). A big catalog blows past that, so you split it into multiple files and use a sitemap index — a master file that points to all the others. Evidence for this claim Google limits a sitemap file to 50,000 URLs or 50 MB uncompressed. Scope: Larger sets must be split into multiple sitemaps, optionally referenced by an index. Confidence: high · Verified: Google: Build and submit a sitemap
- Freshness. If you generate the sitemap by hand, it goes out of date almost immediately. It has to be generated automatically.
- Stock changes. When a product sells out or gets discontinued, you have to decide what happens to its page and its sitemap entry — and those two decisions should be made together, not separately.
How to split it up
The common pattern is to make a separate sitemap file for each type of page:
- Products
- Categories (also called collections)
- Brands
- Static pages (your homepage, About, blog, etc.)
Then one sitemap index file lists all of those. The main reason to split this way isn’t magic SEO power — it’s so that when something goes wrong, you can see in Google Search Console which group of pages has the problem (e.g. “half my product pages aren’t getting indexed”).
What to put in it — and what to leave out
Only list pages you genuinely want to show up in Google:
- Include: your real product pages and category pages that you want ranked.
- Leave out: filter and sort URLs (like “sort by price”), tracking links, pages that redirect somewhere else, pages that return an error, and pages you’ve told Google not to index.
The out-of-stock question
This is the one most guides skip. When a product goes out of stock, you don’t have one answer — you have a decision:
- Coming back soon? Keep the page (and its sitemap entry) live. Offer a “notify me” or restock date.
- Gone for good, but there’s a good replacement? Redirect it to the replacement and remove it from the sitemap.
- Gone for good, and the page still gets traffic or has useful reviews? It can stay live.
The wrong move is deleting every out-of-stock product and returning an error page — that can lose you rankings that are genuinely hard to win back.
Want the technical version — exact limits, the sitemap-index math for millions of
SKUs, lastmod nuance, IndexNow, and the full discontinued-product decision tree?
Switch to the Advanced tab.
TL;DR — Segment an ecommerce sitemap by type (products / categories / brands / static) under one sitemap index, and know why: it’s a monitoring tool for Search Console and Bing Webmaster Tools, not a crawl-budget or ranking lever (Mueller). The limits you design around: 50,000 URLs / 50MB per file, up to 50,000 files per index, and — for the enterprise ceiling — GSC accepts up to 500 sitemaps and Bing states its index model scales to billions of URLs. Only include canonical, indexable, 200-status URLs; exclude facets, tracking params, thin variants, redirects, 4xx, and noindex.
lastmodis the only attribute both engines use — keep it honest to the last significant change; ignorepriorityandchangefreq(Google explicitly ignores both). Automate generation so the file never goes stale, and pairlastmodwith IndexNow for fast price/stock changes. The differentiator most guides skip: out-of-stock and discontinued products need a documented decision tree (permanent vs. temporary vs. unknown), with sitemap removal synced to internal-link cleanup — not blanket 404s.
Why generic sitemap advice breaks at catalog scale
Every “how to make a sitemap” article covers the same things: the 50,000-URL limit,
splitting into an index, excluding junk URLs, keeping lastmod accurate. That’s all
true, and none of it is where an ecommerce store actually struggles. The store-scale
problems are operational: a catalog that turns over daily, out-of-stock and
discontinued SKUs by the thousand, near-duplicate size/color variants, and automation
that quietly stops running. This piece assumes you already have a sitemap and need
to handle those.
The reason sitemaps earn their keep more as a store grows is straightforward. Google: “Generally, on large sites it’s more difficult to make sure that every page is linked by at least one other page on the site.” A sitemap is how you make sure a product that’s under-linked internally still gets discovered. John Mueller has called XML sitemaps “a minimal baseline for any serious website.” The Mueller “minimal baseline” line is relayed via Search Engine Roundtable’s coverage of an X/Twitter reply; treat it as reported, not a self-fetched primary quote.
The hard limits you’re designing around
The sitemap protocol caps a single file and gives you a sitemap index to get past it:
- Per file: Google — “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. If you have a larger file or more URLs, you must break your sitemap into multiple sitemaps.” Evidence for this claim Each Google sitemap file is limited to 50,000 URLs or 50 MB uncompressed. Scope: Protocol and Search Console submission limits are separate constraints. Confidence: high · Verified: Google: Large sitemaps
- Sitemap index: “A sitemap index file may have up to 50,000
loctags” — i.e. it can reference up to 50,000 child sitemaps. You can “submit up to 500 sitemap index files for each site in your Search Console account.” - Bing’s stated ceiling is more generous still: up to 50,000 URLs per file and 50,000 child files per index, so “a single sitemap index file can reference up to 2.5 billion URLs. At scale, multiple index files can support up to 2.5 trillion URLs across a domain, making this approach ideal for large, complex sites.”
For nearly every store, the practical takeaway is: 50,000 URLs per file, split by type, one index. The billions/trillions figures only matter if you’re architecting for tens of millions of SKUs — but they tell you the protocol will not be your bottleneck.
Segmentation strategy — and what it’s actually for
Split the catalog into logical sitemap files — products, categories/collections, brands, static/CMS pages — referenced by a single index. Here’s the part most guides get wrong: they imply that splitting the sitemap by type improves crawl budget or gets more pages indexed. It doesn’t. Mueller is explicit that this is a diagnostic choice, not a crawl lever:
- “The size & number of sitemap files generally won’t affect the crawling, unless your server is so bogged down that even fetching a handful of sitemap files would slow it down…”
- “I generally recommend splitting a sitemap file into logical parts of your site so that you can monitor those parts individually…” Both relayed via Search Engine Journal’s report of a Reddit AMA; the split-for- monitoring point is the operative one.
So the payoff of a products sitemap separate from a categories sitemap is that GSC’s Sitemaps report and Bing Webmaster Tools show you a submitted-vs-indexed ratio per segment. When “product pages” shows 40% indexed but “category pages” shows 95%, you know exactly where to look. Segmentation surfaces the problem; it doesn’t fix it, and it doesn’t buy you crawl budget.
What belongs in the sitemap — and what doesn’t
Google’s rule is the whole filter: “Include the URLs in your sitemap that you want to see in Google’s search results. Google generally shows the canonical URLs in its search results, which you can influence with sitemaps.” So a sitemap URL should be canonical, indexable, and return a 200. Evidence for this claim Google recommends listing the canonical URLs that a site wants shown in Search. Scope: Sitemap inclusion is a canonicalization hint and does not override noindex or response status. Confidence: high · Verified: Google: Build and submit a sitemap
Include: canonical product pages (PDPs), category/collection pages you want ranked, brand pages, indexable static pages.
Exclude:
- Faceted / filtered / sorted URLs —
?sort=,?color=, filter combinations. These belong in your facet strategy (block or canonical), not the sitemap. Joshua Hardwick’s Ahrefs sitemap guide flags the ecommerce-specific version of this: it’s “worth checking for duplicate and near-duplicate pages on ecommerce sites as these often slip through the net.” - Session IDs and tracking parameters.
- Redirects (3xx) and errors (4xx / 410) — a sitemap of redirect URLs is a sitemap of URLs you’re telling Google not to show.
noindexpages — contradicting yourself (submit + noindex) just wastes crawls.- Thin near-duplicate variants. A separate size/color URL with no unique content
shouldn’t be a separate sitemap entry — list the canonical product URL. Google’s
2024 product-variants structured data (
ProductGroup/hasVariant/variesBy) is the modern way to express that a set of size/color options is one product with variants rather than N near-duplicate pages; let that, not the sitemap, carry the variant relationship.
Product images ride on the owning page entry, not a separate list. Don’t build a
standalone sitemap of image URLs — add an <image:image> block to the canonical
product URL’s own <url> entry using the image sitemap extension. Google:
“Each <url> tag can contain up to 1,000 <image:image> tags” — plenty for a PDP’s
gallery. Evidence for this claim Product images can be added to an existing product URL entry with the image sitemap extension instead of a separate image sitemap. Scope: Each <url> entry can carry up to 1,000 <image:image> tags, and the images still have to be crawlable (not blocked by robots.txt) and, if served from another domain, verified in Search Console. Confidence: high · Verified: Google: Image sitemaps Two crawlability
requirements that are easy to miss at catalog scale: don’t disallow the image paths in
robots.txt, and if product images are served from a separate domain or CDN, verify
that host in Search Console or the images won’t be picked up. Which variant’s image
gets the entry follows the same canonical-architecture call as the URL itself — attach
images to the canonical product entry, not to every thin variant URL you’ve already
excluded above.
The out-of-stock and discontinued product decision tree
This is where an ecommerce sitemap article can actually differentiate, because almost none of them handle it with any nuance — and it’s the exact decision that determines whether a URL belongs in the sitemap. I’ve written the full framework on the Ahrefs blog (How Should You Handle Out-of-Stock Products? It Depends), and there’s a reason it’s called “it depends.” There’s no perfect solution — the job is to establish consistent rules aligned with your business goals, not to memorize one answer.
The decision splits on two axes: is it gone permanently or temporarily, and does the page still have value (traffic, reviews, useful info)?
- Temporarily out, confirmed returning → keep the page live and in the sitemap. Offer a restock estimate, a waitlist, a notify-me. Don’t churn it in and out of the sitemap on every stock toggle — that’s noise.
- Temporarily out, status unknown → deprioritize it in the UI and internal linking (reorder, filter it down) rather than pulling it from the sitemap immediately. Premature removal risks Google treating the page as abandoned and losing rankings that are hard to win back.
- Permanently gone, good replacement exists → 301 redirect to a similar product to preserve link equity, and remove it from the sitemap.
- Permanently gone, no replacement, but the page still earns traffic or has useful content (reviews, a buying guide) → it can stay live and in the sitemap.
- Permanently gone, no value → delete and return
404/410, and remove it from the sitemap.
A critical operational point: removal is a coordinated cleanup, not a single sitemap edit. As I put it in that article, “when redirecting a page, many systems will automatically remove internal links from categories, facets, sitemaps, and internal search pages” — so pull the URL from the sitemap and clean up the internal links that point at it (category modules, related-product widgets, internal search) in the same workflow. A dead URL that’s gone from the sitemap but still linked from twenty category pages hasn’t really been cleaned up.
And the thing Google’s own guidance warns against: don’t reflexively mass-404 every discontinued product. Google favors keeping the URL live with alternatives, or redirecting to a relevant category, over blanket 404s — and it warns against generating large numbers of soft 404s. A wall of newly-404’d product pages is exactly the pattern that triggers that.
Update frequency, lastmod, and automation
Automate generation. This is non-negotiable on a catalog that changes daily. My standing advice on enterprise sites is: “Add sitemaps. I would make sure this is automated. If you are asked to manually create them, you can do it, but just know that if it’s manual these will rarely be kept up-to-date.” Bing has documented the exact failure mode — “Too often, Bing discovers stalled sitemaps which have the same URLs listed for months – sometimes years” — and recommends the sitemap “should ideally be automatically generated at least once a day.”
lastmod is the one attribute that matters. Both Google and Bing actively use it;
nobody uses the others. Keep it honest:
- Google: “Google uses the
<lastmod>value if it’s consistently and verifiably (for example by comparing to the last modification of the page) accurate.” And it should “reflect the date and time of the last significant update to the page… an update to the main content, the structured data, or links on the page is generally considered significant, however an update to the copyright date is not.” - Bing is blunt about the anti-pattern: “Do not set the
<lastmod>value set to the time you generate the sitemap.<lastmod>should be the date of the last modification of the content.” Use ISO 8601 with a time component.
Here’s a genuine gray area worth flagging: is a price change or a stock-status flip
a “significant” update? By Google’s definition (main content / structured data / links),
a bare price change is arguably not — but if it changes your Product structured data
(availability, price), that’s closer to significant. My honest read: don’t try to
be clever about it. Don’t bump lastmod on every trivial toggle (that just adds noise),
and don’t rely on lastmod alone to propagate a time-sensitive price drop fast.
Pair lastmod with IndexNow for fast-moving changes. Bing frames the two as
complementary, not either/or: “While real-time URL submission protocols such as
IndexNow help notify search engines of immediate content changes, sitemaps remain a
foundational signal for ensuring comprehensive URL coverage across your site.” And for
AI-powered surfaces specifically: “The lastmod field in your sitemap remains a key
signal, helping Bing prioritize URLs for recrawling and reindexing, or skip them
entirely if the content hasn’t changed since the last crawl.” So: sitemap for coverage
and daily freshness, IndexNow (Bing/Yandex/others — not Google) to push individual
price/stock flips without waiting for the next recrawl cycle.
Ignore priority and changefreq
Don’t spend engineering time maintaining these. Google is unambiguous: “Google ignores
<priority> and <changefreq> values.” Gary Illyes reportedly called the priority
field “essentially a bag of noise.”
The Illyes line is relayed via Search Engine Roundtable’s SMX Advanced 2017
coverage, not a self-fetched primary source; the point stands regardless because
Google’s docs now say both fields are ignored. Whatever value your platform
auto-populates for these is harmless; just don’t build logic to compute them.
Monitoring and diagnosis
This is what the segmentation was for:
- GSC Sitemaps report — per-segment submitted-vs-indexed. A product-sitemap ratio that’s much worse than your category sitemap points you straight at a product-page problem (thin content, blocked variants, canonical issues).
- Bing Webmaster Tools — the same segment-level view on Bing’s side, plus IndexNow submission status.
- GSC Page Indexing report — watch the excluded buckets for facet/parameter URLs ballooning, which means your facet strategy is leaking into discovery.
- Site crawl / audit (Ahrefs Site Audit, Screaming Frog) — catch products still showing an out-of-stock message, orphaned products no longer linked from anywhere, and the broken internal links left behind after a redirect or removal.
Enterprise-scale architecture — a worked shape
For a catalog in the millions of SKUs, plan the hierarchy around your actual volume and the submission ceilings rather than bolting on files reactively:
/sitemap-index.xml ← the one index you submit to GSC + BWT
├── /sitemaps/products-1.xml (URLs 1–50,000)
├── /sitemaps/products-2.xml (50,001–100,000)
├── … products-N.xml (chunk every 50,000 canonical PDPs)
├── /sitemaps/categories.xml (all category / collection pages)
├── /sitemaps/brands.xml (all brand pages)
└── /sitemaps/static.xml (homepage, guides, policy pages)At 5M products that’s ~100 product sitemap files plus a handful of others — well within the 50,000-files-per-index limit and GSC’s 500-sitemap acceptance. If you somehow exceed a single index (50,000 × 50,000 = 2.5B URLs), you split into multiple index files and submit each. The point is to size the chunks up front so daily regeneration just rewrites each file’s contents, and you never have to re-architect the tree because you outgrew a guess.
Where this sits
Ecommerce sitemaps overlap heavily with the pages they list. What belongs in the sitemap is decided by your category-page and faceted-navigation strategy (which filtered URLs are canonical and indexable). What happens to a URL when a product sells out is the out-of-stock and discontinued-product decision. And the sitemap is one of several ways crawlers discover a store — alongside internal links, IndexNow, and (for Google Shopping) a Merchant Center product feed. The sitemap doesn’t replace any of those; it’s the coverage backstop that makes sure nothing gets stranded.
AI summary
A condensed take on the Advanced version:
- An ecommerce XML sitemap lists the canonical URLs a store wants crawled, split by content type (products / categories / brands / static) under one sitemap index.
- Limits you design around: 50,000 URLs / 50MB per file; up to 50,000 files per index; GSC accepts up to 500 sitemaps; Bing states the index model scales to billions of URLs. The protocol won’t be your bottleneck.
- Segmentation is a monitoring tool, not a crawl lever (Mueller): it lets you see submitted-vs-indexed per segment in GSC / Bing Webmaster Tools. It does not buy crawl budget or rankings.
- Include canonical, indexable, 200-status URLs. Exclude facets, tracking params,
redirects, 4xx/410, noindex, and thin near-duplicate variants (use Google’s 2024
ProductGroup/hasVariantvariant schema instead of N variant URLs). Product images go on the owning product entry via<image:image>(up to 1,000 per URL) — not a separate image sitemap — and must stay crawlable (robots.txt, cross-domain Search Console verification). - Out-of-stock / discontinued is the differentiator: decision tree on permanent vs. temporary and whether the page still has value. Temporary-returning → keep live + in sitemap; permanent + good replacement → 301 + remove; permanent + still valuable → keep; permanent + no value → 404/410 + remove. Don’t mass-404 everything (Google warns against soft-404 walls), and sync sitemap removal with internal-link cleanup.
lastmodis the only attribute both engines use — keep it honest to the last significant change (ISO 8601 with time); a bare price/stock flip is a gray area. Ignorepriority/changefreq(Google ignores both).- Automate generation (daily) so it never goes stale, and pair
lastmodwith IndexNow (Bing/Yandex — not Google) for fast price/stock changes.
Official documentation
Primary-source documentation from the search engines.
- Build and Submit a Sitemap — the 50,000-URL/50MB limit, “include the URLs you want in results,”
lastmodguidance, and thepriority/changefreqignored note. - Manage Your Sitemaps With Sitemap Index Files — splitting past the size limits; up to 50,000
loctags per index; 500 sitemaps per Search Console account. - What Is a Sitemap — why large sites need one (hard to link every page internally).
- Product variants structured data (2024) —
ProductGroup/hasVariant/variesByfor size/color variants, the modern alternative to N near-duplicate variant URLs. - Image sitemaps — the
<image:image>extension for attaching product images to their owning URL entry, the 1,000-images-per-entry limit, and crawlability/verification requirements.
Bing / Microsoft
- Keeping Content Discoverable with Sitemaps in AI Powered Search (July 2025) — the current, ecommerce-named guidance: index-file capacity,
lastmodas a freshness signal, and IndexNow as a complement. - Sitemaps – 4 Basics to Get You Started (May 2016) — daily automated generation, the “stalled sitemaps” failure mode, and the
lastmodanti-pattern. - IndexNow / indexnow.org — the push protocol for signaling changed URLs (Bing/Yandex/others; Google doesn’t use it for general pages).
Quotes from the source
On-the-record statements from Google and Bing. Each link is a deep link that jumps to the quoted passage on the source page where the page allows it.
Google — sitemap limits & what to include
- “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. If you have a larger file or more URLs, you must break your sitemap into multiple sitemaps.” Jump to quote
- “A sitemap index file may have up to 50,000
loctags.” Jump to quote - “Include the URLs in your sitemap that you want to see in Google’s search results. Google generally shows the canonical URLs in its search results, which you can influence with sitemaps.” Jump to quote
- “Generally, on large sites it’s more difficult to make sure that every page is linked by at least one other page on the site.” Jump to quote
Google — lastmod, priority, changefreq
- “Google uses the
<lastmod>value if it’s consistently and verifiably (for example by comparing to the last modification of the page) accurate.” Jump to quote - “Google ignores
<priority>and<changefreq>values.” Jump to quote - “Each
<url>tag can contain up to 1,000<image:image>tags.” Read the docs
Bing / Microsoft
- “If you manage a large-scale website, ecommerce platform, or content-rich publishing site, taking full advantage of these limits allows you to ensure all your relevant URLs are discoverable — even at enterprise scale.” — Fabrice Canel & Krishna Madhavan, Bing Webmaster Blog, July 2025. Jump to quote
- “The
lastmodfield in your sitemap remains a key signal, helping Bing prioritize URLs for recrawling and reindexing, or skip them entirely if the content hasn’t changed since the last crawl.” Jump to quote - “While real-time URL submission protocols such as IndexNow help notify search engines of immediate content changes, sitemaps remain a foundational signal for ensuring comprehensive URL coverage across your site.” Jump to quote
- “Do not set the
<lastmod>value set to the time you generate the sitemap.<lastmod>should be the date of the last modification of the content.” — Bing Webmaster Blog, May 2016. Read the post
John Mueller, Google — sitemap size & splitting
- “The size & number of sitemap files generally won’t affect the crawling…” and “I generally recommend splitting a sitemap file into logical parts of your site so that you can monitor those parts individually…” Relayed via Search Engine Journal’s report of a Reddit AMA (coverage); confirm against the original AMA before treating as verbatim.
- XML sitemaps are “a minimal baseline for any serious website.” Relayed via Search Engine Roundtable’s coverage of an X/Twitter reply; not a self-fetched primary quote — re-verify the exact wording before quoting.
Gary Illyes, Google
- The
priorityfield is “essentially a bag of noise.” Relayed via Search Engine Roundtable’s SMX Advanced 2017 coverage; not a self-fetched primary source. Google’s docs now independently state bothpriorityandchangefreqare ignored.
Should this product URL be in the sitemap?
Walk a product through this when its status changes. The sitemap decision falls out of the page decision — decide what happens to the page first, then the sitemap follows.
Is the product out of stock or being removed?
│
├─ Temporarily out of stock
│ ├─ Confirmed coming back
│ │ → KEEP the page live + KEEP in sitemap
│ │ (add restock date / notify-me; don't churn it in and out)
│ └─ Status unknown
│ → KEEP the page live + KEEP in sitemap for now
│ (deprioritize in UI + internal links; don't yank it prematurely)
│
└─ Permanently gone / discontinued
├─ A good replacement product exists
│ → 301 REDIRECT to the replacement + REMOVE from sitemap
│ (also clean up internal links pointing at the old URL)
├─ No replacement, but the page still earns traffic or has
│ useful content (reviews, a buying guide)
│ → KEEP the page live + KEEP in sitemap
└─ No replacement, no residual value
→ 404 / 410 + REMOVE from sitemap
(but DON'T mass-404 the whole discontinued catalog at once —
prefer redirect-to-category where a sensible one exists)Two rules that apply to every “remove” branch:
- Removing from the sitemap is a coordinated cleanup — also strip the internal links (category modules, related-product widgets, internal search) that point at the dead URL, or you’ve only half-removed it.
- For a time-sensitive change (a price drop, a flash restock), don’t wait on the daily
sitemap regeneration — ping IndexNow so Bing/Yandex recrawl the URL now. The
sitemap
lastmodis the batch/coverage signal; IndexNow is the real-time nudge.
Ecommerce sitemap checklist
Structure
- Sitemap split by type — products, categories/collections, brands, static — under one sitemap index.
- Every file under 50,000 URLs and 50MB (uncompressed).
- The index is submitted in Google Search Console and Bing Webmaster Tools.
- Product sitemaps chunked at a fixed size so daily regeneration just rewrites contents (no re-architecting as you grow).
Contents
- Only canonical, indexable, 200-status URLs.
- No facet/filter/sort URLs, session IDs, or tracking parameters.
- No redirects (3xx), 4xx/410, or
noindexpages. - No thin near-duplicate size/color variant URLs (use the canonical product URL;
express variants with
ProductGroup/hasVariantschema). - Product images added via
<image:image>on the canonical product entry (up to 1,000 per URL) — not a separate image sitemap — and not blocked byrobots.txt.
Freshness
- Generation is automated (at least daily) — not a manual file that goes stale.
-
lastmodreflects the last significant content change, not the cron timestamp. -
lastmoduses ISO 8601 with a time component. -
priorityandchangefreqare not hand-maintained (both are ignored). - IndexNow wired up for fast price/stock changes (Bing/Yandex).
Out-of-stock / discontinued
- A documented rule set (permanent vs. temporary vs. unknown) exists — not ad hoc.
- Temporarily-out, returning products stay live and in the sitemap.
- Permanent removals 301 to a replacement (or 404/410 with no value) and the URL is pulled from the sitemap and internal links are cleaned up together.
- No mass-404 wall of discontinued products.
Monitor
- GSC Sitemaps report checked per segment (submitted vs. indexed).
- GSC Page Indexing watched for facet/parameter URL bloat.
- Site audit run for out-of-stock messages, orphaned products, and broken internal links left after removals.
The mental models
1. The sitemap is a hint, not a directive. Submitting a URL asks Google to consider it; it doesn’t force crawling or indexing. If products in your sitemap aren’t getting indexed, the fix is upstream — internal linking, content quality, canonical signals — not a bigger or more granular sitemap. Segmentation surfaces the problem; it doesn’t solve it.
2. Split for monitoring, not crawl budget. The only reason a products sitemap is separate from a categories sitemap is so GSC and Bing show you submitted-vs-indexed per segment. There is no crawl-budget or ranking bonus for splitting. (This is the single most common myth to unlearn.)
3. lastmod is the only attribute that earns its keep.
Keep it honest to the last significant change and both engines will use it to prioritize
recrawls. priority and changefreq are ignored — don’t build logic for them.
4. The sitemap decision follows the page decision. Never decide “is this URL in the sitemap?” in isolation. Decide what happens to the page (keep / redirect / 404) based on permanent-vs-temporary and residual value; the sitemap entry then follows automatically.
5. Removal is a workflow, not an edit. Pulling a URL from the sitemap without removing/redirecting the internal links that point at it is half a job. Treat sitemap cleanup, internal-link cleanup, and the redirect/404 as one atomic operation.
6. Sitemap = coverage; IndexNow = immediacy. The sitemap (with daily regeneration) is how you submit comprehensive URL coverage for discovery — it doesn’t guarantee crawling or indexing, just that nothing is missing from the list. IndexNow pushes individual time-sensitive changes now. They’re complements — use both, not one instead of the other.
Ecommerce sitemap — cheat sheet
The hard limits
| Constraint | Value |
|---|---|
| URLs per sitemap file | 50,000 |
| Size per sitemap file (uncompressed) | 50 MB |
| Child sitemaps per index file | 50,000 |
| Sitemaps submittable per GSC account | 500 |
| Bing single-index ceiling (stated) | ~2.5 billion URLs |
Sitemap attributes
| Attribute | Do engines use it? | Verdict |
|---|---|---|
lastmod | Yes (Google + Bing) | Keep honest to last significant change; ISO 8601 w/ time |
priority | No — Google ignores | Don’t maintain |
changefreq | No — Google ignores | Don’t maintain |
In the sitemap or not?
| URL type | In sitemap? |
|---|---|
| Canonical product page (200) | Yes |
| Category / brand / static page (200, indexable) | Yes |
| Facet / filter / sort URL | No |
| Session / tracking parameter URL | No |
| Redirect (3xx) | No |
| 4xx / 410 | No |
noindex page | No |
| Thin size/color variant | No — list canonical product; use variant schema |
Out-of-stock → action
| Situation | Page | Sitemap |
|---|---|---|
| Temp out, returning | Keep live | Keep |
| Temp out, unknown | Keep live, deprioritize in UI | Keep (for now) |
| Permanent, good replacement | 301 redirect | Remove |
| Permanent, still valuable | Keep live | Keep |
| Permanent, no value | 404 / 410 | Remove |
Fast facts
- Splitting by type = monitoring, not crawl budget (Mueller).
- Automate generation daily — stale sitemaps are a documented ecommerce failure mode.
- IndexNow (Bing/Yandex, not Google) for real-time price/stock pushes.
- Don’t mass-404 discontinued products — prefer redirect-to-category where sensible.
Worked examples
A minimal sitemap index for a store
<?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-07-03T09:15:00-04:00</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/categories.xml</loc>
<lastmod>2026-07-02T22:00:00-04:00</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/brands.xml</loc>
<lastmod>2026-06-30T22:00:00-04:00</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/static.xml</loc>
<lastmod>2026-06-28T14:00:00-04:00</lastmod>
</sitemap>
</sitemapindex>A product sitemap entry — the lastmod is honest
<url>
<loc>https://example.com/products/trail-runner-x2/</loc>
<lastmod>2026-07-01T11:42:00-04:00</lastmod>
</url>Note there’s no priority or changefreq — they’re ignored, so they’re not worth the
bytes. The lastmod here reflects a genuine content update (a spec change), not the time
the file was generated.
A big catalog, chunked
For 5,000,000 products, the products segment is ~100 files, each capped at 50,000 URLs:
/sitemap-index.xml
├── /sitemaps/products-001.xml (URLs 1–50,000)
├── /sitemaps/products-002.xml (50,001–100,000)
├── …
├── /sitemaps/products-100.xml (4,950,001–5,000,000)
├── /sitemaps/categories.xml
├── /sitemaps/brands.xml
└── /sitemaps/static.xmlThat’s ~103 files under the 50,000-per-index limit and well under GSC’s 500-sitemap acceptance — you never have to re-architect because you outgrew a guess.
A discontinued product, handled two ways
# Discontinued, but the newer model is a clean replacement:
GET /products/trail-runner-x1/ → 301 → /products/trail-runner-x2/
→ remove /products/trail-runner-x1/ from products.xml
→ remove internal links to it from category + related-product modules
# Discontinued, no replacement, still ranks for reviews:
GET /products/legacy-headlamp/ → 200 (kept live, "no longer available" + alternatives)
→ stays in products.xml Patrick's relevant free tools
- XML Sitemap Validator — Paste, upload, or fetch a sitemap by URL — errors, warnings, and a health score with line numbers. Pasted and uploaded sitemaps are validated entirely in your browser.
- XML Sitemap Generator — Generate an XML sitemap from a capped, robots-respecting same-site crawl. Noindex, off-canonical, failed, and uncertain URLs remain visibly separate; lastmod dates are emitted only when the page provides evidence.
- IndexNow Submitter — Validate and explicitly submit a same-host URL list to IndexNow; Google does not use IndexNow.
Tools for ecommerce sitemaps
- Google Search Console — Sitemaps report — submit the index, and read submitted-vs-indexed per segment (this is why you split by type).
- GSC — Page Indexing report — watch the excluded buckets for facet/parameter URLs leaking into discovery.
- Bing Webmaster Tools — the Bing-side sitemap submission and per-segment view, plus IndexNow submission status.
- IndexNow — push individual changed product URLs (price/stock) to Bing/Yandex/others without waiting on the next recrawl. (Not Google.)
- Your platform’s sitemap generator — Shopify, Adobe Commerce/Magento, WooCommerce, BigCommerce and others generate segmented sitemaps automatically; the point is to use the automation, not hand-maintain files.
- Ahrefs Site Audit — find products still showing an out-of-stock message, orphaned products no longer linked anywhere, and broken internal links left after a redirect or removal.
- Screaming Frog SEO Spider — crawl the sitemap, confirm every URL returns 200 and is canonical/indexable, and catch redirects or 4xx that slipped into the file.
Ecommerce sitemap mistakes to avoid
Listing every URL the platform can generate
Why it fails: redirects, non-canonical facets, errors, and noindexed pages make the
sitemap contradict the site’s indexing intent. Do instead: emit only canonical,
indexable URLs that return 200.
Treating lastmod as a daily ping
Why it fails: changing the date without a significant page change makes the signal
untrustworthy. Do instead: update lastmod from the underlying material content,
price, availability, or structured-data change.
Splitting files and calling it a crawl-budget fix
Why it fails: segmentation improves diagnosis, not ranking or crawl allocation by itself. Do instead: split by useful page type and use each segment’s submitted and indexed results to locate problems.
Leaving redirected or discontinued products in the feed
Why it fails: a sitemap should describe current canonical destinations, not historical inventory. Do instead: update the product state, internal links, and sitemap entry as one operation.
Common ecommerce sitemap problems
Search Console cannot fetch the sitemap
Likely cause: the sitemap or an index child is blocked, requires authentication, times
out, or returns the wrong status. Fix: request the submitted URL as an unauthenticated
client, follow its child references, and confirm each returns 200 XML from the expected
host.
Submitted URLs are mostly not indexed
Likely cause: the file contains redirects, non-canonical pages, thin or duplicate products, errors, or URLs blocked from indexing. Fix: sample the affected segment, reconcile its status, canonical, robots directives, and internal links, then fix the page state rather than resubmitting unchanged XML.
lastmod dates do not match real changes
Likely cause: generation time is being written for every URL. Fix: connect lastmod
to the last significant record or page change and leave it unchanged when only the sitemap
file regenerated.
Product URLs remain after discontinuation
Likely cause: inventory lifecycle events are not connected to sitemap generation. Fix: define the keep, redirect, or remove decision in the product system and regenerate the affected segment from canonical inventory.
Prompts for ecommerce sitemap review
Reconcile a sitemap sample
Paste rows containing sitemap segment, URL, status, canonical, robots directive, availability, and internal inlinks.
Audit this ecommerce sitemap sample. Classify each URL as keep, investigate, redirect and
remove, or remove. Use only the supplied status, canonical, robots, availability, and
inlink evidence. State which field caused each classification. Do not infer index status
or product permanence when those fields are absent.Design useful segmentation
Paste the catalog’s page types and approximate current URL counts.
Propose an XML sitemap index organized for diagnosis. Keep product, category, brand, and
static page types distinguishable; split any file that would exceed protocol limits.
Explain what Search Console problem each segment would help isolate. Do not claim that
segmentation improves rankings or crawl budget by itself. Scripts for inspecting sitemap files
Fetch headers and validate XML syntax
curl -I 'https://www.example.com/sitemap-index.xml'
curl -sS 'https://www.example.com/sitemap-index.xml' | xmllint --noout - Replace the example host with a site you control. A successful syntax check proves only that the XML parses, not that its URLs are canonical or indexable.
Extract child sitemap locations
curl -sS 'https://www.example.com/sitemap-index.xml' \
| xmllint --xpath '//*[local-name()="sitemap"]/*[local-name()="loc"]/text()' -Request each returned URL separately so one healthy index does not hide a failing child.
Count URLs without loading them in a browser
curl -sS 'https://www.example.com/sitemaps/products.xml' \
| xmllint --xpath 'count(//*[local-name()="url"])' -The count helps check file sizing. It does not replace status, canonical, and directive validation on the listed URLs.
Prove a sitemap change works
Sitemap index integrity test
Test to run: validate the index with the XML Sitemap Validator
and request every referenced child. Expected result: valid XML, reachable 200
responses, and only same-site intended sitemap locations. Failure interpretation: the
deployment produced malformed XML or a broken child reference. Monitoring window:
immediate after generation. Rollback trigger: the submitted index or a required segment
becomes unavailable.
URL-state parity test
Test to run: sample added and removed product URLs with the Indexation
Reconciler or a crawler export. Expected result: listed
URLs are canonical, indexable 200 pages; redirects and errors are absent. Failure
interpretation: sitemap generation and product lifecycle logic disagree. Monitoring
window: immediate after regeneration and again after the next inventory sync. Rollback
trigger: a release removes live canonical inventory or adds a large unintended URL class.
Honest lastmod test
Test to run: compare changed lastmod values with the underlying catalog change log.
Expected result: dates move only for materially changed pages. Failure interpretation:
generation time is masquerading as modification time. Monitoring window: across at
least one normal regeneration cycle. Rollback trigger: most entries change without
corresponding page changes.
Standing ecommerce sitemap metrics
Valid canonical URL rate
Metric: share of listed URLs that return 200, are indexable, and are self-canonical.
What it tells you: whether the sitemap accurately describes intended inventory. How
to pull it: recurring crawl or Indexation Reconciler export by sitemap segment.
Benchmark / realistic range: the desired state is all submitted URLs meeting the rule;
classify any exception rather than hiding it in an average. Cadence: weekly for rapidly
changing catalogs and after generator releases.
Submitted-versus-indexed trend by segment
Metric: submitted and indexed counts for product, category, brand, and static segments. What it tells you: where indexation diverges by template. How to pull it: Search Console sitemap and Page Indexing reports. Benchmark / realistic range: compare each segment with its own history and eligibility; submission is not a guarantee of indexing. Cadence: weekly, reviewed monthly.
Sitemap freshness lag
Metric: time between a significant catalog change and its accurate sitemap state.
What it tells you: whether automation reflects launches, stock state, redirects, and
removals promptly. How to pull it: compare catalog event timestamps, sitemap lastmod,
and generation logs. Benchmark / realistic range: set an operational service level
based on publishing frequency rather than inventing an SEO threshold. Cadence: weekly
operations review.
Resources worth your time
My writing
- How Should You Handle Out-of-Stock Products? It Depends — the full decision framework (permanent vs. temporary vs. unknown, redirect vs. 404 vs. leave-live) that drives the sitemap-inclusion call. This is the piece most sitemap guides skip.
- Enterprise SEO Strategies For Maximum Growth — why sitemap generation has to be automated at scale, and the crawl-budget framing for large, frequently-updated catalogs.
- The Beginner’s Guide to Technical SEO — where sitemaps and discovery fit in the bigger technical picture.
My speaking
- How Search Works (SlideShare) — my walkthrough of discovery, crawling, rendering, and indexing, of which sitemaps are the discovery backstop. (Standing disclaimer: “This is my understanding of systems… not going to be 100% complete or accurate.”)
From around the industry
- How to Create an XML Sitemap (and Submit It to Google) — Joshua Hardwick, Ahrefs — the mechanics, plus the ecommerce note to check for duplicate/near-duplicate pages that slip into sitemaps.
- Faceted Navigation: Definition, Examples & SEO Best Practices — Sam Underwood, Ahrefs — which filtered URLs to keep out of (or deliberately add to) the sitemap.
- Google’s John Mueller Says There Is No Ideal Size for Sitemaps — Search Engine Journal — the “split for monitoring, not crawling” point.
- Keeping Content Discoverable with Sitemaps in AI Powered Search — Bing Webmaster Blog (Fabrice Canel & Krishna Madhavan) — the current, ecommerce-named official guidance and the IndexNow-alongside-sitemaps framing.
- Sitemaps – 4 Basics to Get You Started — Bing Webmaster Blog — the “stalled sitemaps for months, sometimes years” failure mode and the
lastmodanti-pattern. - Handling Out of Stock & Removed Product Pages — Matthew Edgar — an independent technical-SEO take on why premature removal risks losing hard-won rankings.
Test yourself: Ecommerce XML Sitemaps
Five quick questions on segmenting, sizing, and maintaining an ecommerce sitemap. Pick an answer for each, then check.
Ecommerce XML Sitemap
An ecommerce XML sitemap is a machine-readable file (or set of files referenced by a sitemap index) listing the canonical URLs an online store wants crawled — usually split by content type (products, categories, brands, static pages) so a large, fast-changing catalog can be discovered and monitored more efficiently than through internal links alone.
Related: Ecommerce SEO, Category Page SEO, Crawl Budget, Faceted Navigation, IndexNow
Ecommerce XML Sitemap
An ecommerce XML sitemap is a machine-readable file — or, at catalog scale, a set of files referenced by a sitemap index — that lists the canonical URLs an online store wants search engines to crawl. On an ecommerce site this usually means segmenting the sitemap by content type: separate files for products, categories/collections, brands, and static/CMS pages, all pointed to by one index file, so crawlers can discover a large, fast-changing catalog more efficiently than they could through internal links alone.
The XML sitemap protocol imposes hard limits every store has to design around: a single sitemap file can hold at most 50,000 URLs or 50MB uncompressed, and a sitemap index can reference up to 50,000 sitemap files. What makes ecommerce sitemaps distinct from generic sitemap advice isn’t the format — it’s the operational problems at volume: what to do with out-of-stock and discontinued product URLs, how to keep lastmod accurate as inventory turns over daily, which faceted and near-duplicate variant URLs to exclude, and how to automate regeneration so the file doesn’t go stale.
Both Google and Bing actively use only one optional attribute — lastmod — and both ignore priority and changefreq. Splitting a sitemap by product type is primarily a monitoring and diagnosis tool: it lets you see, in Search Console and Bing Webmaster Tools, which segment of the catalog has an indexing problem. It is not a crawl-budget or ranking lever.
Related: Ecommerce SEO, Category Page SEO, Crawl Budget, Faceted Navigation, IndexNow
Build-time retrieval analysis plus live signals for this exact article. The automatic chunk report includes a deterministic readiness score and is ready without a model download.
Search Console
sampleGA4 traffic (28d)
sampleCloudflare traffic (7d)
sampledCrUX field data (28d, phone)
sampleGoogle NLP entities
localChangelog
Updated Jul 18, 2026.
Editorial summary and recorded change details.Summary
Added product-image sitemap guidance (the <image:image> extension) and tightened one line that overstated what a sitemap guarantees.
Change details
-
Added coverage of attaching product images to the canonical URL entry via the image sitemap extension, including Google's 1,000-images-per-entry limit and crawlability/cross-domain verification requirements — a gap the article previously didn't address at all.
-
Reworded a Frameworks-lens line that said the sitemap 'guarantees comprehensive coverage' to make clear it doesn't guarantee crawling or indexing, only that submission is complete.
Full comparison unavailable — no prior snapshot was archived for this revision.