XML Sitemap Best Practices for E-Commerce Sites

Image bd4d840a5e6b1f321dc6547e704e6e5f

If your sitemap lists the wrong URLs, Google can waste crawl time on pages that will never rank. For e-commerce sites, I’d keep it simple: include only canonical, indexable pages that return 200 status codes, split large sitemap files before 50,000 URLs or 50 MB, update them as products change, and monitor errors in Google Search Console.

Here’s the whole playbook in plain English:

  • Include product pages, main category pages, and key commercial landing pages
  • Exclude filtered URLs, internal search, cart, checkout, redirects, 404s, and noindex pages
  • Split large sitemaps with a sitemap index
  • Use <lastmod> only when it reflects a real page update
  • Skip <priority> and <changefreq> because Google ignores them
  • Submit the sitemap index in Google Search Console and add it to robots.txt
  • Watch for issues like Submitted URL marked noindex, 404s, and Crawled – currently not indexed

A few numbers matter here. One sitemap file can hold up to 50,000 URLs or 50 MB uncompressed. If your store has a big catalog or frequent inventory changes, that limit comes up fast. And when pages go in and out of stock, or new SKUs are added each day, a stale sitemap can point crawlers at the wrong places.

What I like about this approach is that it keeps the focus on pages that can drive traffic and sales. Not every URL on your site belongs in a sitemap. Only the pages you want indexed should be there.

That’s the core idea behind the full article.

What to Include and Exclude in an E-Commerce Sitemap

XML Sitemap: What to Include vs. Exclude for E-Commerce Sites

XML Sitemap: What to Include vs. Exclude for E-Commerce Sites

Once you understand why sitemaps matter, the next step is pretty simple: only include URLs you want indexed.

Here’s the rule: list canonical, indexable URLs that return a 200 status code. Anything else can drain crawl budget away from the pages that drive sales.

Include Canonical Product, Category, and Commercial URLs Only

Your sitemap should focus on pages you want to rank in search results. That usually means:

  • Canonical product detail pages
  • Primary category pages
  • Key commercial landing pages, such as brand collection pages

Category pages often bring in the most search traffic, so they deserve a spot in the sitemap. If a category has pagination, include only the first page.

From there, clean out URL patterns that lead to duplicate or dead-end pages.

Exclude Filtered URLs, Internal Search, Cart, Checkout, and Noindex Pages

Low-value URLs in a sitemap can create crawl budget issues fast. Faceted navigation is a common problem. A single category page can spin off thousands of near-duplicate URLs, like /shoes/?color=red&size=10&sort=price-low-to-high. Those should not be in your sitemap.

You should also leave out utility pages like cart, checkout, account, login, and internal search results. They don’t help with SEO and can waste crawl activity. The same goes for noindex pages and URLs blocked by robots.txt.

"Your sitemap should include all your important pages (product pages, category pages, key content pages) and nothing else. Exclude pages that are noindexed, redirected, or have no indexable value." – Suman Pai, Marketing Executive, The Web Pundit

Include vs. Exclude URL Types: A Quick Reference Table

Use this table as a quick audit checklist.

URL Type Include? Reason
Canonical product pages ✅ Yes Main revenue pages; targets long-tail search intent
Primary category pages ✅ Yes Targets high-volume keywords; passes internal link equity
Brand/collection landing pages ✅ Yes Commercial intent; built to rank
Faceted/filtered URLs ❌ No Creates duplicate content and index bloat
Internal search results ❌ No Wastes crawl budget
Cart, checkout, account, login ❌ No Utility pages with no SEO value
Paginated pages (page 2+) ❌ No Found through links; the main category URL is enough
Redirects (301/302) ❌ No Only final destination URLs should appear
Noindex or robots.txt-blocked pages ❌ No Mixed signals can confuse crawlers
Session IDs and tracking parameters ❌ No Creates endless URL versions of the same page
Duplicate product variants ❌ No Keeps ranking signals on the canonical version

How to Structure XML Sitemaps for Large Product Catalogs

Once you know which URLs belong in a sitemap, the next step is organizing them at scale.

XML sitemaps top out at 50,000 URLs or 50 MB uncompressed. If you run a large catalog, that means one giant sitemap usually isn’t the best move. Using multiple files makes crawl management easier and gives you a cleaner way to troubleshoot problems when something goes off the rails.

Use a Sitemap Index and Split Files by Page Type or Category

Start with a sitemap index file, usually sitemap_index.xml, that lists your child sitemaps. From there, group those child files by page type, like products and categories/collections.

This setup keeps things cleaner for both search engines and your team. It also makes updates easier, since each sitemap file can be refreshed based on how often its URLs change.

If a product sitemap goes past 50,000 URLs, split it into smaller files with clear names like products-1.xml and products-2.xml. The sitemap index ties everything together and keeps each file within the recommended limits.

Handle Product Image Sitemaps When Images Drive Search Visibility

For catalogs that depend on visual search, sitemap structure isn’t just about page URLs. Images matter too.

Use image sitemaps or image tags inside product sitemaps when product images bring in traffic. Dedicated image sitemaps can help search engines find product photos and improve visibility in Google Images. As new products go live, update the image sitemap so it stays accurate.

Keep Sitemap Files Accurate, Updated, and Valid

Once your sitemap structure is in place, the next job is simple: keep every file in sync with the live catalog. Your sitemap should match what’s actually on the store. If it doesn’t, search engines can end up spending time on discontinued products, redirects, and pages that no longer exist.

Refresh Sitemaps for New Products, Removals, Redirects, and Content Changes

Update product sitemaps daily, category and collection sitemaps weekly, and static pages monthly. Remove discontinued URLs, redirected URLs, 404s, 500s, and any other error responses right away. Dynamic sitemap generation helps here because it can add new URLs and remove retired ones without manual cleanup.

You should also update sitemaps when the page itself changes in a meaningful way, like a major product rewrite or a new product launch. Small layout tweaks, CSS updates, or footer edits don’t count.

Use Lastmod Correctly and Skip Priority and Changefreq

Use <lastmod> only if it reflects real content changes on the page. If your CMS can’t keep that field accurate, leave it out.

Skip <priority> and <changefreq> altogether. Google ignores both.

XML Tag Purpose Practical Usefulness
<loc> Specifies the absolute URL of the page Required – needed for discovery and indexing
<lastmod> Indicates when the content was last meaningfully changed Useful – but only when accurate
<priority> Suggests the relative importance of a URL (0.0 to 1.0) None – Google ignores this tag
<changefreq> Hints at how often the page is likely to change None – Google uses its own crawl frequency logic

When these files stay clean and current, submission and monitoring get a lot easier.

Submit, Monitor, and Maintain Your Sitemap

Submit the Sitemap in Google Search Console and Add It to Robots.txt

Google Search Console

Once your sitemap is clean and set up the right way, send it to Google and keep an eye on what happens next.

In Google Search Console (GSC), submit the sitemap index URL – not the individual sitemap files – in the Sitemaps report. That way, Google can find all child sitemaps, like product and category sitemaps, in one move.

At the same time, add a Sitemap: line to the bottom of your robots.txt file:

Sitemap: https://www.example.com/sitemap_index.xml 

This gives search engines another clear path to your sitemap.

One more thing: check that robots.txt isn’t blocking the sitemap URL itself or any key CSS and JavaScript files. If those files are blocked, Google may have a harder time reading and judging your pages.

Regular monitoring helps you spot indexing problems before they turn into a mess. After Google can access the sitemap, use GSC to watch for issues early. For e-commerce teams, the indexing report is where a lot of the useful signals show up.

Error/Warning What It Means What to Do
Submitted URL marked noindex A sitemap URL has a noindex directive Remove it from the sitemap or remove the noindex tag
Submitted URL is a 404 The page no longer exists Remove from sitemap; redirect if it has backlinks
Crawled – currently not indexed Google found the page but has not indexed it yet Improve content quality or check for duplication
Sitemap could not be read GSC can’t fetch or parse the file Check for 404s, XML syntax errors, or robots.txt blocks
Redirect error A sitemap URL is part of a redirect chain Update the sitemap to point to the final canonical URL

If a canonical product or category URL is listed in the sitemap but still isn’t indexed, use the URL Inspection tool in GSC to see what’s going on at the page level. Also track submitted URLs that stay unindexed, then dig into the reason instead of letting them sit there.

Conclusion: The XML Sitemap Rules That Matter Most for E-Commerce Sites

At this point, sitemap results come down to upkeep, not initial setup. Keep submitting a clean sitemap, watch indexing errors, and remove URLs that no longer belong.

FAQs

How often should I update my sitemap?

Update your XML sitemap based on how often each page changes.

Product pages should be updated daily so search engines can pick up inventory and price changes. Category pages usually make sense on a weekly schedule. Static pages like About or Contact can be updated monthly.

Upward Engine also recommends splitting your sitemap by content type and submitting updated sitemap files through Google Search Console.

Should out-of-stock product pages stay in the sitemap?

Only include indexable, canonical URLs in your XML sitemap. The sitemap should point search engines to your best content, not every URL your site happens to produce.

If an out-of-stock product page should still be indexed, leave it in. If the page is unavailable, set to noindex, or no longer belongs in your canonical catalog, leave it out.

What should I do if Google is not indexing sitemap URLs?

First, make sure the pages are indexable. They shouldn’t have noindex tags, be blocked by robots.txt, or point to other pages through canonicals or redirects. Use Google Search Console’s URL Inspection tool to spot crawl or indexing issues.

You can also crawl your site with Screaming Frog to find broken links, redirect chains, and orphaned pages. Keep your sitemap focused on canonical, high-quality pages, and leave out paginated pages.

Related Blog Posts

Interested In Boosting Your Rankings?

Fill Out The Form Below To Get Started Today

Related Articles