eCommerce sitemap with products, categories, images, canonical facet pages and URLs to exclude

eCommerce sitemaps: products, categories, images and facet pages without the chaos

Reading time: 12 minPublished on 27 May 2026By BitHubTopic SEO & eCommerce

An eCommerce sitemap is not a list of everything that exists on the site. It is a considered map of the URLs you want Google to discover, monitor and keep up to date.

That detail changes everything. If duplicate products, parameterised facets, out-of-stock pages with no strategy, old URLs left over from a migration or non-canonical pages end up in the sitemap, you are handing Google a dirty signal.

A well-built eCommerce sitemap should help crawlers understand which pages genuinely matter: categories, products, brands, images and useful facet pages. It should not become an automatic archive of all the chaos in the catalogue.

What a sitemap really is, and what it isn't

An XML sitemap helps search engines discover important URLs and read information such as the last modification date. It does not force Google to index a page, and it does not replace a solid internal linking structure.

In practice, the sitemap is there to say: "these are the canonical URLs that deserve attention".

It is not there to:

  • force weak pages into the index;
  • hide problems with internal navigation;
  • get worthless facets indexed;
  • automatically rescue badly built redirects;
  • resolve duplicate content;
  • push pages carrying noindex or a canonical pointing to another URL.

If a page does not deserve to be reached, read and indexed, it probably should not be in the sitemap.

The basic rule: only canonical, useful, up-to-date URLs

For an eCommerce site, the healthiest and simplest rule is this: the sitemap should only contain URLs that can be treated as official pages.

A URL worth including should have:

  • a 200 response code;
  • a self-referencing canonical;
  • useful, non-duplicate content;
  • products or information that genuinely exist;
  • consistent internal links;
  • a sensible title and H1;
  • no pointless parameters;
  • no noindex;
  • a lastmod date updated only when something relevant actually changes.

If the sitemap contains URLs that fail these criteria, Search Console can start showing exclusions, duplicates, alternate URLs with a canonical, pages discovered but not indexed, and signals that are hard to read.

How to split an eCommerce site's sitemaps

On a small site a single sitemap can be enough. On a real eCommerce site, splitting is almost always worth it.

A clean structure might look like this:

  • sitemap index: the main file listing the secondary sitemaps;
  • category sitemap: categories, subcategories and the main commercial pages;
  • product sitemap: canonical product pages;
  • brand sitemap: important brand pages;
  • SEO facet sitemap: only facets that have been turned into real pages;
  • image sitemap: product or category images you want discovered properly;
  • content sitemap: guides, articles, informational pages and non-catalogue landing pages.

Google publishes technical limits for sitemaps, such as 50,000 URLs or 50 MB uncompressed per file. But it is worth splitting well before you hit those limits: if products, categories and facets are separated, it is far easier to see where a problem starts.

Products: when to include them and when not to

Product pages are often the largest part of the sitemap. That is precisely why they need to be handled with judgement.

In general, include a product when:

  • the page is canonical;
  • the product is buyable, or at least strategic;
  • the page has enough content;
  • the product has an image, price, availability and correct data;
  • it is not a duplicate variant with no SEO value of its own;
  • its canonical does not point to another product page.

Be careful, on the other hand, with products that are:

  • out of stock for months with no restock planned;
  • duplicated by colour, size or format;
  • created automatically by the ERP but incomplete;
  • unreachable from the navigation;
  • redirecting;
  • canonicalised to a main product;
  • missing images or any useful information.

A temporarily out-of-stock product can stay in the sitemap if the page makes sense, comes back into stock and keeps capturing demand. A product that has been discontinued for good needs a strategy instead: a redirect to a replacement, a category or an equivalent product, or removal when there is no sensible alternative.

Categories: the most important part of the map

Categories are often the most important pages for eCommerce SEO. They are stable, commercial, connected to the catalogue and able to capture high-intent queries.

They belong in the sitemap when they are real pages: clean URLs, a clear H1, useful copy, relevant products, coherent facets and internal links. We went into this in more depth in the article on eCommerce category pages and SEO.

Not every category deserves the same treatment, though. If a category has two products, thin content and no search demand, it is probably a navigation section rather than a priority SEO page.

For each category, ask yourself:

  • is there search demand?
  • are there enough products?
  • is it linked from the menu or from other pages?
  • does it have useful copy?
  • does it have sensible facets?
  • is it different from neighbouring categories?
  • does it bring traffic, impressions or sales?

The sitemap should help Google read the commercial structure, not crawl pages created purely to fill out the menu.

Facet pages: where the chaos begins

Facet pages are the trickiest point for nearly every eCommerce site.

A facet can be nothing more than a navigation function, or it can become a genuine SEO page. The difference is enormous.

A facet should not go into the sitemap if it produces URLs such as:

  • ?color=black
  • ?sort=price
  • ?page=2
  • ?brand=x&size=m&color=green
  • ?utm_source=...
  • ?gclid=...
  • internal search pages;
  • combinations with zero or very few products;
  • sort orders and alternative views.

A facet can go into the sitemap when it has been turned into a genuinely canonical page, for example:

  • /dry-dog-food/ as the main category;
  • /dry-dog-food-grain-free.htm as a facet with real demand;
  • /dry-dog-food-sensitive.htm as a page dedicated to a specific need;
  • /mens-running-shoes-trail/ as a specific commercial page.

In that case the page needs its own title, H1, meta description, copy, products and canonical. It must not be a query in disguise. It has to be a page.

This is exactly the subject of our guide on which eCommerce facets to index and which to block. The sitemap should only contain the facets that made it through that selection.

Images: why an image sitemap can help

On many eCommerce sites the images are a decisive part of the sale: products, variants, categories, brands, lookbooks, guides, before/after shots, packaging and close-ups.

Google can discover images from the HTML page too, but an image sitemap can help especially when:

  • images are loaded via JavaScript;
  • there are a lot of product images;
  • images are central to search;
  • there are variant images;
  • the site uses a CDN or complex paths;
  • you want to help Google connect images to product pages.

An image sitemap does not compensate for heavy images, unreadable file names, weak alt text or slow pages. It helps discovery, but quality still lives on the page: the right image, well compressed, responsive, in context and accessible.

Out of stock: should sold-out products stay in the sitemap?

There is no single answer. It depends on the type of stock-out.

If the product will be back soon, it can make sense to leave it online and in the sitemap, perhaps with a back-in-stock notice, alternatives, an email alert or similar products.

If the product is discontinued but has traffic, backlinks or historical value, consider a redirect to a replacement, a category or an equivalent product. If it has no value and is never coming back, it can leave the sitemap and then be handled with a coherent status code.

What you want to avoid is leaving thousands of dead products in the sitemap for years, with no stock, no alternatives and no value. Google keeps discovering them, Search Console gets messy and crawl budget is spent badly.

Migrations: the new sitemap must not contain the old site

During an eCommerce migration the sitemap is a delicate instrument. After the switch it should contain the new canonical URLs, not a mixture of old URLs, redirects and temporary pages.

Old URLs should be handled with redirects, not kept in the new sitemap.

The correct sequence is:

  • map the important old URLs;
  • decide the new canonical URLs;
  • create consistent 301 redirects;
  • generate the sitemap with the final new URLs only;
  • submit the sitemap in Search Console;
  • monitor redirects, canonicals, 404s and excluded pages;
  • check traffic and keywords over the following weeks.

We covered this in the eCommerce SEO migration checklist and in the case study on the QuattroZampeShop migration without losing organic traffic: a sitemap does not save a badly executed migration, but it does help Google read a well executed one more quickly.

lastmod: don't update it at random

The lastmod field can be very useful, but only if it is reliable. If it is updated every day on every URL even when nothing changes, it loses its value as a signal.

It is worth updating when something important changes:

  • the category copy;
  • a meaningful part of the assortment;
  • a product's price or availability;
  • the content of a product page;
  • the main image;
  • the FAQ;
  • the canonical;
  • the status of the page.

It should not update simply because the sitemap file has been regenerated. A fake lastmod is noise.

Search Console: what to check after submitting

Once you have submitted the sitemap, read Search Console carefully. Don't just check whether the file was accepted.

Check:

  • how many URLs have been discovered;
  • how many are indexed;
  • how many show as "discovered – currently not indexed";
  • how many are "duplicate without user-selected canonical";
  • how many have a canonical different from the one you declared;
  • how many return a redirect or a 404;
  • whether facet pages are creeping in where they shouldn't;
  • whether out-of-stock or old products are taking up too much room;
  • whether the image sitemap is helping to discover important assets.

A good sitemap makes these checks easier, because it separates the areas: products, categories, facets, images and content.

Common eCommerce sitemap mistakes

The most frequent mistakes are:

  • including every URL the CMS generates;
  • including URLs with parameters, technical facets and sort orders;
  • including pages with noindex;
  • including URLs that redirect;
  • including products duplicated by variant;
  • leaving deleted or discontinued products in there for years;
  • not splitting products, categories and facets;
  • updating lastmod every day for no reason;
  • not updating the sitemap after a migration;
  • not checking Search Console after submitting;
  • including pages that are not linked internally;
  • putting non-canonical URLs in the sitemap.

These problems are not always visible to the user, but they can confuse Google and make it harder to work out which pages genuinely matter.

What to ask your agency

If you run an eCommerce site, ask your agency or your developer for a concrete answer to these questions:

  • Is the sitemap generated dynamically or updated by hand?
  • Does it contain only canonical URLs returning a 200?
  • Are products, categories, facets and images separated?
  • How many out-of-stock products are still in the sitemap?
  • Are duplicate product variants excluded?
  • Are parameterised facets kept out of the sitemap?
  • Which facet pages are treated as genuine SEO pages?
  • Is the lastmod field real, or is it always refreshed?
  • Is the sitemap checked after every migration or URL change?
  • Does Search Console show excluded URLs that come from the sitemap?
  • Is an image sitemap useful for your catalogue?
  • Are the URLs in the sitemap also reachable through internal links?

If the answer is "the plugin generates it", that is not enough. A plugin can generate a file. Strategy decides what goes into it.

How we work at BitHub

In our custom eCommerce builds, the sitemap is not a file sitting apart from the platform. It is generated from the real structure of the catalogue: products, categories, brands, SEO facets, images and content.

That makes it far easier to control what goes in and what stays out. A facet page, for example, only goes in if it is a genuinely canonical page, with a readable URL, relevant products and dedicated content. A technical query does not.

The SEO and Google Ads side connects directly: if categories and facets are clean, landing pages, feeds, Performance Max and tracking all work on more coherent pages.

With AI and automation we can also analyse large catalogues, find facets that deserve dedicated pages, flag thin or duplicate products and identify URLs that should not be in the sitemap.

A clean sitemap is not glamorous, but it is one of the foundations that prevents invisible losses: wasted crawling, duplicates, the wrong pages and weak signals in Search Console.

Useful sources

For the technical detail, you can read the Google Search Central documentation on sitemaps and URL discovery, the guide to building and submitting a sitemap, the guidance on image sitemaps, how to handle faceted navigation and the guide to consolidating duplicate URLs.

eCommerce sitemap FAQ

Does a sitemap get pages indexed automatically?

No. A sitemap helps Google discover important URLs, but it does not guarantee indexing. The page still has to be useful, canonical, reachable, free of blocks and consistent with the structure of the site.

Should I put every product in the sitemap?

No. Only canonical, useful product pages should go in. Duplicate products, variants with no standalone value, and pages with a redirect, a noindex or a canonical pointing elsewhere should stay out.

Should facet pages be in the sitemap?

Only when they are genuine SEO pages: a clean URL, a self-referencing canonical, relevant products, dedicated content and real search demand. Technical facets with parameters or weak combinations should not be in the sitemap.

Is an image sitemap useful for an eCommerce site?

It can be, when the catalogue has a lot of product images, images loaded via JavaScript, a CDN or assets that matter for visual search. It does not replace lightweight images, alt text and well-built product pages.

What should I do with out-of-stock products?

If they are coming back and they have value, they can stay online and in the sitemap. If they are discontinued, consider a redirect to an alternative or a category, or removal. Avoid thousands of dead products sitting in the sitemap for years.

How often should the sitemap be updated?

It should be updated when URLs, products, categories, availability, content or important images change. The lastmod field should represent real changes, not simply the automatic regeneration of the file.