XML Sitemaps for Ecommerce: Best Practices

An XML sitemap is a file that lists the URLs you want search engines to find, with an optional date each page last changed. For an online store with thousands of product and category pages, it is one of the simplest ways to help new and updated pages get discovered. Google's sitemap documentation sets the key rules: up to 50MB uncompressed or 50,000 URLs per sitemap, UTF-8 encoding, absolute URLs, and an accurate lastmod. It also says Google ignores priority and changefreq. This guide turns those rules into a store checklist.
Does Your Store Need a Sitemap?
Google's sitemap overview says a site of about 500 pages or fewer that is well linked internally might not need one. Most stores pass that size quickly once you count products, variants with their own URLs, categories and guides. Google lists large sites, new sites with few external links and sites with lots of images or video as the ones that benefit most. In practice, nearly every store should have a sitemap, and most platforms generate one automatically.
Google's Core Rules
| Rule | What Google says | Store impact |
|---|---|---|
| Size | 50MB uncompressed or 50,000 URLs per sitemap | Split large catalogs into several sitemaps |
| Sitemap index | Optional index file you can submit as one entry | One index pointing to product, category and blog sitemaps |
| Encoding | Must be UTF-8 | Watch special characters in product names inside URLs |
| Location | Root recommended; otherwise it covers only its folder unless submitted in Search Console | Keep sitemaps at the root |
| URLs | Fully qualified, absolute URLs | No relative paths |
| lastmod | Used if consistently and verifiably accurate | Update only on significant changes |
| priority, changefreq | Ignored by Google | No need to tune them |
Which Store URLs to Include
Google says to include the URLs you want to see in search results, and that it generally shows canonical URLs, which sitemaps can influence. For a store that means:
- Include: live product pages, category pages you want ranked, buying guides and blog posts, key informational pages.
- Exclude: sort and filter URLs, cart and checkout, account pages, internal search results, URLs with tracking parameters, and noindexed pages.
- Retired products: remove them once they redirect or return 404, so the sitemap only lists live, canonical URLs.
Sitemap inclusion is a weak canonical signal, so listing a filter URL works against the canonical tags you set. Our canonical tags guide covers how the two fit.
Getting lastmod Right
Google says lastmod should reflect the last significant update, such as changes to main content, structured data or links, and that something like a copyright date change does not count. For stores, a real price, stock, description or image change is significant. A theme that stamps every page with today's date on every visit teaches Google to ignore your dates.
How to Submit
Google's documentation lists three ways:
- Submit in the Sitemaps report in Search Console, which shows when Googlebot read it and any processing errors.
- Submit with the Search Console API.
- Add a
Sitemap:line to robots.txt. Google says there is no limit to how many sitemap lines you can include.
Google adds that submitting a sitemap is a hint and does not guarantee it will be downloaded or used. For Bing and other engines, pair the sitemap with instant URL submission, covered in our IndexNow guide.
Monitor It Monthly
- Check the Sitemaps report for errors and the number of discovered URLs.
- Compare submitted pages with indexed pages in the Page indexing report.
- Spot check that a few new products appear in the sitemap within a day of launch.
Our Search Console guide for ecommerce covers the performance side.
Quick Checklist
- Sitemap index at the site root, split by content type
- Each sitemap under 50,000 URLs and 50MB uncompressed
- Only live, canonical, indexable URLs listed
- lastmod changes only on significant updates
- Submitted in Search Console and listed in robots.txt
- Errors and indexed counts reviewed monthly
Where an Agency Fits
Sitemaps are where crawl problems show up first on large catalogs. Our AI search optimization service audits sitemaps, canonicals and indexing together so every product page you care about can be found.
Want to know how many of your product pages are actually indexed? The Full AI Visibility Audit ($99) reviews how search and AI assistants see your brand, and the Deep Growth Audit ($249) adds search, traffic, ads and product feed checks with a 90 day plan.
Frequently Asked Questions
How many URLs can an XML sitemap contain?
Google says a single sitemap is limited to 50MB uncompressed or 50,000 URLs. Larger sites must split it into multiple sitemaps, optionally under a sitemap index.
Does Google use priority and changefreq?
No. Google says it ignores the priority and changefreq values.
When does Google use lastmod?
Google uses lastmod if it is consistently and verifiably accurate, and it should reflect the last significant update to the page.
Should filter and sort URLs be in my sitemap?
No. Include only the canonical URLs you want in search results. Listing filter URLs works against your canonical tags.
How do I submit a sitemap to Google?
Use the Sitemaps report in Search Console, the Search Console API, or a Sitemap line in your robots.txt file.
Does a sitemap guarantee indexing?
No. Google says a sitemap helps discovery but doesn't guarantee that all items will be crawled and indexed.
AI search and ads readiness checklist
25 checks for Amazon, Walmart and Shopify sellers: tracking, product feeds, Google, Bing and Meta ads, and getting cited by ChatGPT, Perplexity and Google AI Overviews. Two pages, about 20 minutes.
- Break-even ROAS table by margin
- The AI search (AEO) checks most stores miss
- A simple score that tells you what to fix first
No spam. We use your email to send the checklist and follow up about it.
Want to see where your store stands in AI search? Get the Full AI Visibility Audit for $99 or the Deep Growth Audit for $249.
Get your AI visibility audit

