One Shopify product can appear through a product URL, a collection-scoped URL, a variant parameter, a translated path, and a market-specific hostname. Those paths should resolve to an intentional product identity.
Build a URL test set
For five priority products, collect:
/products/handle/collections/collection/products/handle?variant=...- localized path or market domain
- old handle after a rename
- URL emitted by structured data
Capture redirects and canonicals
url='https://example.com/collections/example/products/example-product'
curl -sSIL --max-redirs 10 "$url"
curl -sSL "$url" |
rg -o '<link[^>]+rel=[\"'\"']canonical[\"'\"'][^>]*>'
Record requested URL, final URL, status chain, canonical, locale, currency, and selected variant.
Check four invariants
- Collection-scoped paths identify the same canonical product.
- Old handles redirect to the intended replacement, not the homepage.
- A variant URL selects the expected variant and retains recoverable variant identity.
- Market handling does not pair one region’s visible price with another region’s canonical or schema offer.
Inspect all identity signals
Compare:
- HTML canonical
- Open Graph URL
- JSON-LD
urland@id - sitemap URL
- internal product links
- language alternates
Not every URL must be identical, but each difference needs a reason. A Canadian response with CAD offers and a US canonical can make the market context ambiguous.
Fix at the source
- use Shopify’s canonical URL output in the theme
- update hard-coded product links
- replace redirect chains with a direct redirect
- remove app snippets that emit stale URLs
- preserve variant selection when it is commercially important
- test locale and market routing without cookies
Avoid forcing every visitor to a geo-detected market before the requested product can load.
Acceptance criteria
- one stable canonical per market strategy
- no redirect loops or multi-hop legacy chains
- sitemap and internal links prefer canonical URLs
- structured product identity agrees with canonical
- variant links open the intended option
- market, currency, and availability stay coherent
Retain the URL matrix as a regression fixture for theme releases.
Community discussion
Add to the article
Ask a technical question, share a storefront result, or challenge a conclusion with evidence.