Part of the E-commerce SEO series. For the full picture, start with E-commerce technical SEO: the complete guide for online stores.
A running shoe in six colours and twelve sizes is one product to the shopper and up to 72 URLs to a crawler. How a store handles that decides whether Google sees one strong product page, six useful colour pages, or 72 near-identical copies competing with each other.
This guide covers the URL choices, canonicals, structured data and checks for product variants.
One URL or one per variant?
Two common setups, both supported by Google:
| Setup | Example | Good for |
|---|---|---|
| Single page, variants selected by parameters | /trail-runner-2?color=red&size=9 |
Variants that differ only in size or minor attributes |
| Separate pages per variant | /trail-runner-2-red/, /trail-runner-2-blue/ |
Variants people search for separately, like a colour, or with distinct images and content |
Google’s e-commerce URL guide says “each variant can be identified by a separate URL”, using path segments (/t-shirt/green) or query parameters (/t-shirt?color=green). What matters is that each variant can be reached at a distinct, stable URL. Avoid fragments: Google treats /t-shirt#black and /t-shirt#white as the same page.
Which URL should be canonical?
For variants selected by optional parameters, Google’s guidance is direct: “use the URL with the query parameter omitted as the canonical URL.” So /trail-runner-2?color=red canonicalises to /trail-runner-2.
For separate variant pages, decide per variant:
| Variant | Canonical |
|---|---|
| Has its own search demand (“red trail runner 2”) and distinct images | Itself, with a unique title and H1 that name the variant |
| Differs only in size or a minor attribute | The main product URL |
Whatever you choose, keep internal links consistent: link to the canonical version from categories, menus and sitemaps. See canonical tag errors.
How do you mark up variants?
Google’s product variant structured data uses ProductGroup “to help Google better understand which products are variations of the same parent product”:
| Property | What it is |
|---|---|
productGroupID |
“The identifier of the product group (also known as the parent sku)” |
variesBy |
The aspects variants vary by, such as https://schema.org/color or https://schema.org/size |
hasVariant |
A nested Product for each variant |
Two requirements stand out:
- “The site must have the ability to preselect each variant directly with a distinct URL (using URL query parameters)”, so Google can crawl each variant with the right image, price and availability.
- “Each variant must have a unique ID in its corresponding structured data markup (for example, using the sku or gtin properties).”
For single-page setups, the whole ProductGroup lives on one canonical URL. For multi-page setups, each page carries “the full definition of the variants on the page as well as a variant with only the url property to link to the variants on the other page.” See product structured data for the properties each Product and Offer needs.
What goes wrong with variants?
| Problem | Symptom |
|---|---|
| Every size and colour indexable with identical text | Duplicate titles and content across variant URLs |
| Variant URLs canonicalised to a URL that redirects or 404s | The product drops out of the index |
| Variants only selectable with JavaScript, no URL change | Google sees only the default variant’s price and image |
| Same SKU or no ID across variants | Variants can’t be told apart in markup |
| Internal links to random variants | Signals split; the wrong variant ranks |
How do you check variants across a store?
Crawl the store, and in Crawlens look at:
- Duplicate page titles, Duplicate content and Near-duplicate content: variant URLs that are indexable but indistinguishable.
- Canonicalised pages: confirm variants point where you intend, and Canonical points to a non-200 URL for broken targets.
- Structured data missing required properties and Invalid JSON-LD on variant pages.
- Custom extraction to pull each page’s
skuorgtinandproductGroupIDfrom the JSON-LD into columns, so you can check IDs are present and unique. - Render JavaScript on, if variants change with scripts, to see whether each variant URL shows its own price and image.
With Search Console connected, check which variant URLs actually earn impressions: if separate colour pages get none, consolidating them is usually the better choice. See keyword cannibalization.
For the rest of store-specific technical SEO, see the e-commerce technical SEO guide.
Checklist
- Each variant reachable at a distinct, stable URL; no fragments
- Optional-parameter variants canonicalise to the parameter-free URL
- Separately indexed variants have their own search demand, title and H1
- Internal links point at canonical variant URLs
-
ProductGroupwithproductGroupID,variesByandhasVariant - Every variant has a unique
skuorgtin - Each variant URL shows its own price, image and availability, with or without JavaScript
- No duplicate titles or content across indexable variant URLs
Frequently asked questions
Should each product variant have its own URL?
Each variant should be reachable at a distinct URL, for example with a query parameter that preselects it, so Google can see the right image, price and availability. Whether those URLs are separately indexed depends on whether people search for the variant.
Which URL should be canonical for product variants?
For variants selected by optional parameters, Google recommends using the URL without the parameter as the canonical. Variants that deserve their own search presence, such as a distinct colour people search for, can have their own self-canonical URL.
What is ProductGroup structured data?
ProductGroup is the schema.org type Google uses to understand that several products are variants of the same parent. It uses productGroupID for the parent SKU, variesBy for the attributes that change, such as size or colour, and hasVariant for each variant.
Do product variants cause duplicate content?
They can, when each colour or size has its own indexable URL with the same description and title. Canonicalise variants that don't need their own presence, and give the ones that do a unique title and enough distinct content.
Should variant IDs be unique?
Yes. Google requires each variant to have a unique ID in its structured data, for example using sku or gtin.