How to fix seo variant urls in sitemap on Adobe Commerce (Magento)

Remove product variant URLs (e.g. ?variant= or ?sku= query strings) from your XML sitemap and keep only the canonical base product URL for each product.

Steps for Adobe Commerce (Magento)

  1. Go to Admin Panel → Marketing → SEO & Search → Site Map.
  2. Click 'Edit' on your sitemap (or 'Add Sitemap' if none exists) and review the generation settings.
  3. Navigate to Stores → Configuration → Catalog → XML Sitemap — expand 'Product Options' and verify that only 'Use URLs' is set to base product URLs; set 'Use Secure URLs' appropriately.
  4. Install or configure a sitemap extension (e.g. Amasty SEO Toolkit or Mirasvit SEO) that has an explicit 'Exclude URLs with query parameters' option, and enable it.
  5. Alternatively, add a custom plugin/observer on the sitemap generation event to filter out any product URL containing a query string before it is written to the sitemap XML.
  6. Regenerate the sitemap (Marketing → SEO & Search → Site Map → Generate) and re-submit in Google Search Console.
Official Adobe Commerce (Magento) documentation ↗

What is seo variant urls in sitemap?

When shoppers (or your platform) switch between product options like size, color, or material, the URL often changes to include a query string such as `?variant=12345` or `?sku=red-large`. These variant URLs all show the same product page with slightly different state — they are not separate products. An XML sitemap is a file that tells search engines which pages you want indexed. Including variant URLs in that sitemap tells Google there are many distinct pages worth crawling and indexing, when in reality there is only one canonical product page. The fix is to ensure your sitemap lists only the clean, base product URL (e.g. `/products/blue-sneaker`) for each product, with no query-string parameters attached.

Google treats variant URLs as duplicate or near-duplicate pages of the same product. Submitting them in your sitemap wastes your crawl budget — the portion of time and resources Google allocates to your site — on pages that add no indexing value, which means your real category and product pages may be crawled and refreshed less frequently. Duplicate content signals can also dilute the ranking strength of your canonical product page, splitting authority across many near-identical URLs instead of concentrating it on the one page you actually want to rank. Practically speaking, if Google indexes a variant URL instead of your base product URL, you may appear in search results with an ugly, parameter-laden link that confuses shoppers and reduces click-through rate. Keeping a clean sitemap is one of the fastest, lowest-risk wins for improving crawl efficiency and protecting your organic search traffic.

See the complete Seo variant urls in sitemap guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ scan — we’ll find seo variant urls in sitemap and every other issue across your whole site.

Scan my site free

Fix seo variant urls in sitemap on another platform