Technical SEO & AI Search

XML Sitemaps for Online Stores: What to Include and What to Leave Out

XML sitemaps help search engines find your important pages. Learn which URLs to include, how to structure sitemaps for large catalogs and how to monitor them.

TL;DR
  • An XML sitemap lists the URLs you want search engines to crawl and index.
  • Include only indexable, canonical pages that return 200: products, categories, key content and important pages.
  • Split large sitemaps by type, keep them updated automatically and monitor them in Search Console.

Why do sitemaps matter for stores?

Large catalogs, new products and deep categories can be hard for search engines to discover through links alone. Sitemaps help them find and recrawl important pages, especially after launches or changes.

What should a sitemap include?

Include Leave out
Indexable product pages Noindex pages
Main category pages Filter and sort parameter URLs
Blog and guide pages Redirected or 404 URLs
Key static pages Cart, checkout, account pages
Canonical URLs only Duplicate or non-canonical URLs

How should you structure sitemaps?

  • Use a sitemap index that links to separate sitemaps by type: products, categories, posts, pages.
  • Keep each sitemap under the limit of 50,000 URLs or 50 MB uncompressed.
  • Include accurate lastmod dates when content really changes.
  • Reference the sitemap index in robots.txt. See robots.txt.

Platform notes

  • Shopify: generates sitemaps automatically at /sitemap.xml.
  • WooCommerce: SEO plugins generate sitemaps; check which post types and taxonomies are included.
  • Magento: configure sitemap generation and schedules in the admin.

How do you monitor sitemaps?

  1. Submit the sitemap index in Google Search Console.
  2. Check the number of discovered URLs.
  3. Compare submitted URLs with indexed URLs in the Pages report.
  4. Investigate gaps such as “Crawled, currently not indexed”. See Google Search Console for ecommerce.

Common mistakes

  • Including noindex or redirected URLs.
  • Listing filter URLs that you canonicalize elsewhere. See canonical tags.
  • Static sitemaps that are never updated.
  • Wrong lastmod dates on every URL every day.

Worked example: cleaning a WooCommerce sitemap

(Illustrative numbers.) A WooCommerce store’s sitemap had 18,000 URLs, including tags, attachment pages and out-of-stock product variations.

Changes:

  1. Excluded tags and attachment pages.
  2. Removed noindex and redirected URLs.
  3. Split products and categories into separate sitemaps.

The sitemap dropped to 5,200 URLs. Within two months, the share of submitted URLs indexed rose from 41% to 78%.

Checklist: XML sitemaps

  • [ ] Sitemap index submitted
  • [ ] Only canonical, indexable URLs included
  • [ ] Split by page type
  • [ ] Updated automatically
  • [ ] Accurate lastmod dates
  • [ ] Listed in robots.txt
  • [ ] Submitted vs indexed reviewed monthly

FAQ

Does a sitemap guarantee indexing?

No. It helps discovery, but Google still decides what to index.

Should out-of-stock products be in the sitemap?

If the pages remain indexable and useful, yes. Remove permanently discontinued ones that redirect.

Do I need image or video sitemaps?

They can help for important images and videos, but standard sitemaps matter most.

Turn this into a plan for your store

The Free Profit Audit scans your store, sizes your biggest profit leaks and builds a 90-day plan.

Free Profit Audit