Whether a product URL should carry its category path is less important than a different rule: each product needs one canonical address, and internal links, canonical tags, redirects and the sitemap all have to point at it. If your catalog shows the same item in several categories, the work lies in applying one chosen format everywhere, not in picking the prettiest format.
Take a shop that sells mechanical keyboards. A 75 percent layout board appears under "Mechanical keyboards", under "Compact layouts" and under "Wireless keyboards". If each category links to the board with its own path in the address, one keyboard ends up with three URLs. Google's documentation gives clear principles for handling that, but it has no statement on whether a product URL should include a category path.
One keyboard, several addresses
A product collects extra addresses for technical and organizational reasons. On the technical side there is the address with a category path, the short address without one, the address with a tracking parameter and the address with a session ID. On the organizational side, different teams produce different link formats: the merchandising team uses the category path, the email team appends tracking, the feed team exports the short address.
Google's page on ecommerce URL structure (Opens in a new tab) names three problems: missed content, redundant crawling and seemingly endless pages. Different URLs that return the same page cause redundant crawling, and the page's own example is a name-based product address next to a query address built on a product code. The page recommends minimizing alternative URLs that return identical content.
Where the extra addresses come from
| Address type | Example (keyboard) | Origin |
|---|---|---|
| Category path address | /compact-layouts/forge-75-keyboard | Menus and category pages |
| Flat address | /product/forge-75-keyboard | Feed, search results |
| Tracking parameter address | /product/forge-75-keyboard?campaign=autumn | Newsletters and ads |
| Session or user bound address | /product/forge-75-keyboard?session=abc | Old template or module |
| Variant address | /product/forge-75-keyboard?switch=linear | Switch and layout selector |
The page says not to link internally to temporary parameters such as session IDs, tracking codes, user-relative values or the current time, and to use long-lived, persistent URLs instead. That gives a firm basis for removing the third and fourth rows of the table from internal links.
Variants are a separate question
The same page sets a rule for variants: each variant should have its own identifiable URL, expressed as a path segment or a query parameter. If optional query parameters identify variants, the URL without the parameter serves as the canonical URL, and each variant page's canonical tag points to the main product URL. For switch type and layout options, see the guide to product variant URLs, canonicals and structured data. The subject here is the duplication that category paths create.
How Google weighs the signals
Google's page on specifying a canonical URL (Opens in a new tab) ranks the methods by strength. Redirects are a strong signal that the target should become canonical. The rel="canonical" link annotation is also a strong signal. Sitemap inclusion is a weak signal. The methods can be combined, which raises the chance that the preferred URL appears in search results. None is required: if you specify nothing, Google chooses the version it judges best to show users.
| Signal | Strength per Google | Use |
|---|---|---|
| Permanent redirect | Strong | Retiring a duplicate address |
| rel="canonical" tag | Strong | Duplicate address stays alive |
| Sitemap listing | Weak | Canonical address only, one per product |
| Internal links | Page advice: link to the canonical URL | Menus, cards and breadcrumbs in one format |
The page lists reasons to specify a canonical: control which URL appears in results, consolidate signals such as links into one preferred URL, simplify metrics for content reachable through several URLs, and save crawl resources so Googlebot spends time on new or updated pages instead of duplicates. Each reason is concrete in a keyboard shop. Reports for one board split across three addresses become hard to read, and crawling the same board three times costs server work.
What happens when no signal is given
The page states that if you specify no canonical, Google chooses the version it judges best to show users. For a keyboard listed under three categories, that means the choice is made without your input, and the version it picks may not be the one your reports, feed and internal links use. A deliberate choice costs a rule and some template work. A missing choice leaves the decision to a system you cannot inspect from your own logs.
Practical suggestion: even for a small catalog, write the rule down in one sentence, for example "the canonical address is the flat, name-based address built from the product slug". Put that sentence where developers, the content team and the people who run the feed can all find it. A rule that only one person remembers does not survive the next template change.
Category path or flat address
The URL page's examples show descriptive, name-based product paths and mark a bare numeric ID as the discouraged form. The comparison in the table is a practical assessment.
| Test | Address with category path | Flat, name-based address |
|---|---|---|
| Readability | Shows context | Short, product focused |
| Several categories | One product can get several addresses | One address per product |
| Category changes | Address changes, redirect needed | Address is independent of category |
| Upkeep | Renaming a category changes the addresses of its pages | Stable while the product name holds |
| Canonical choice | A primary category rule is required | No choice needed |
Practical suggestion: when products are listed in several categories, a flat address makes the canonical choice simple. If you prefer a category path, give each product a primary category and tie the canonical to that path only. Either way, every other format must resolve to the one address through a tag or a redirect.
The cost of changing a path
If the category sits in the address, renaming a category can mean thousands of changed addresses. Each needs a permanent redirect. Google's page recommends redirects to remove existing duplicates and says all permanent redirect types have the same effect on Search, though detection speed may vary. The longer the redirect chains grow, the more upkeep they need. Practical suggestion: if you put the category in the address, build it from a stable category name and put category renames through a managed process.
Four tests for the canonical address
Google's pages explain how to communicate a choice. The choice itself rests on practical tests, applied here to the keyboard catalog.
- Durability: does the address survive for as long as the product stays in the catalog? If a category rename changes it, durability is weak.
- Uniqueness: does the product have exactly one address in this format? A category path format fails when the product lives in several categories and no primary category rule exists.
- Description: does the address contain words that describe the product? Google's page prefers descriptive path words to a bare number.
- Feasibility: can the platform generate this format consistently in links, the sitemap and the feed?
Decision rule
Practical suggestion, as a decision rule: choose the format that passes at least three of the four tests. If a catalog fails durability and uniqueness, choose the flat, name-based address and show the category only in breadcrumbs. Where the category gives real context and the primary category rarely changes, a category path can also work. After choosing, do not reopen the debate casually. Changing the format means starting a fresh migration.
Example scenario: three keyboard catalogs
Example scenario one: a small shop has a single "Mechanical keyboards" category and every product belongs to it. Durability and uniqueness are strong, so either format passes all four tests, and consistency decides. Example scenario two: a shop lists the same board under layout, connection and price-tier categories, and reorganizes those categories each season. Durability and uniqueness are weak, so the rule points to the flat address. Example scenario three: a marketplace lets each seller choose a category. A seller's category edit would move the listing if the path sat in the URL, so the flat address with a primary category field protects the listing address.
| Catalog | Durability | Uniqueness | Lean |
|---|---|---|---|
| Small shop, one category | High | High | Either format; consistency decides |
| Seasonal multi-category shop | Weak | Weak | Flat, name-based address |
| Multi-seller marketplace | Depends on seller edits | Depends on seller category | Flat address plus primary category field |
The lean column is a practical suggestion. Google's pages ask that the chosen format be communicated consistently.
Putting every surface on one address
The page asks you to link internally to the canonical URL and to use the same URL form in internal links, sitemaps and canonical tags. It also asks for a self-referencing canonical tag on every indexable page, with those URLs in a sitemap. A marketplace has several surfaces that link to a product: menus, category cards, search results, related items, wishlists, email and breadcrumbs. When each builds the address with its own code, different formats appear.
One address builder
Practical suggestion: keep a single function in the code base that builds a product address. Every template, the sitemap generator, the feed export and the email templates call it. When the canonical format changes, one place changes. In the keyboard shop the card on a category page, the card in search results and the newsletter template all receive the same address from that function.
| Surface | Address source | Check |
|---|---|---|
| Menu and category card | Address builder | Category path, if used, comes from the primary category |
| Search result | Address builder | No search query parameter appended |
| Breadcrumb | Category and product fields | Product item links to the canonical address |
| Email and newsletter | Same builder | Tracking stays out of on-site links |
| Feed export | Same builder | Same output as the sitemap |
Tracking parameters on email links can serve a purpose outside the site. The advice concerns carrying such parameters into links on the site itself. An outside visit that arrives on a parameterized address is tied back to the clean address by the canonical tag.
The Merchant Center link field
The URL page says that for variants with unique URLs each variant page's canonical tag should point to the main product URL, and that the "canonical_link" property in Google Merchant Center covers this. Practical suggestion: confirm that the product link in your feed matches the sitemap address. A feed consumes the canonical decision; it should not be where the decision is made. Menu labels in Merchant Center are in English, and if you use the interface in another language the labels may look different.
Writing the canonical tag correctly
Per Google's page, the HTML link element goes in the head of each duplicate page and points to the canonical page. The canonical page itself carries the same self-referencing element. Absolute URLs are recommended, since relative URLs are supported but can cause trouble, for example when a test site gets crawled. The element is honored only in the head, so the head must be valid HTML.
When JavaScript builds the tag
For sites that use client-side JavaScript, the page says to place the canonical in the HTML source and make sure JavaScript does not change it. Only if that is impossible should it be set with JavaScript alone. If the keyboard page template renders in the browser, the first HTML from the server should already contain the tag. Practical suggestion: build the tag on the server and inspect the source with scripts switched off.
Conflicting signals
One of the clearest warnings is not to name different canonicals for the same page across methods. A sitemap that lists one URL while the rel="canonical" tag names another sends conflicting signals. A catalog where both the category path address and the flat address sit in the sitemap is an obvious source of that conflict. Practical suggestion: feed the sitemap generator from the product table's canonical address field, not from the category table.
Redirects for retired addresses
When an old format is going away, a redirect is the tool for the job. The page says to use redirects to remove existing duplicates, that server-side HTTP redirects have the quickest effect, and that all permanent redirect types affect Search alike. For a keyboard shop that drops category paths, each old address should lead straight to the new flat address in one step.
Building the redirect table
Practical suggestion: each row holds one old address and one new canonical address. Old addresses come from every earlier format: category path, flat and old parametrized. The target column is generated by the same address builder. Chains are avoided by sending every old address directly to the final address and not through another old address.
Before and after launch
- Run the table in a test environment and confirm that each row reaches its target in one step.
- Check that targets return a 200 status and carry their own self-referencing canonical tag.
- After launch, regenerate the sitemap with the new addresses.
- Prepare a rollback plan: redirect rules can be removed, but external links to old addresses are affected either way.
HTTPS and language versions
The canonical page mentions two further signals. For HTTPS, Google prefers it over HTTP for equivalent pages unless problems exist, such as an invalid certificate, insecure dependencies, an HTTPS page redirecting through HTTP, or an HTTPS page canonicalizing to HTTP. The page recommends redirecting HTTP to HTTPS, adding a canonical from the HTTP page to HTTPS and implementing HSTS, and says not to list HTTP URLs in sitemaps or hreflang.
For localization, the page says that when hreflang is used the canonical should be in the same language, or the best available substitute, and that Google prefers URLs that belong to hreflang clusters. In a shop with English and Turkish versions of the keyboard page, each language version is canonical to its own address, and the two are linked with hreflang. Canonicalizing one language to the other contradicts that principle.
| Situation | Principle on the page | Practice |
|---|---|---|
| HTTP and HTTPS versions | HTTPS is preferred | Redirect HTTP, list only HTTPS in sitemaps |
| English and Turkish versions | Canonical in the same language | Each language canonical to itself, hreflang between them |
| Category path and flat address | One is chosen as canonical | Pick by the decision rule, then redirect |
Methods that undermine canonicalization
The page lists things to avoid.
- Do not use robots.txt for canonicalization: disallowed URLs can still be indexed without their content.
- Do not use the URL removal tool: it hides all versions of a URL from Search.
- Do not specify a URL fragment as the canonical.
- Avoid noindex to pick a canonical within one site, since it blocks the page entirely; rel="canonical" is preferred.
- Link internally to the canonical URL, not to duplicates.
Teams who want to clean up category path addresses can fall into these. Blocking the category path address in robots.txt does not pass the links it received to the canonical address. The page presents canonicalization as consolidating signals into the preferred URL.
Migration risk list for a live catalog
Changing the address format in a running shop is riskier than writing a canonical rule from scratch, because earlier addresses are known to external links, bookmarks and the search index.
| Risk | Result | Safeguard |
|---|---|---|
| Redirect chains | An old address reaches the target after several hops | Point old addresses straight at the final address |
| Copying instead of redirecting | Two addresses stay alive | Retire the duplicate with a permanent redirect |
| Sitemap carries old addresses | Strong and weak signals conflict | Regenerate the sitemap at launch |
| Internal links keep the old format | Every click passes a redirect | Update menu, card and breadcrumb links |
| Feed sends the old address | Merchant Center receives another URL | Align feed and canonical fields |
| JavaScript rewrites the tag | Signal may be ignored or conflict | Serve the tag in the HTML source |
Migration steps
- Write the rule that generates each product's primary category and target canonical address.
- Match the rule output with the list of old addresses to build the redirect table.
- Try a small category first. Launch redirects, canonical tags and sitemap together.
- Switch internal links to the new format.
- After launch, crawl: are there redirect chains, canonical conflicts or old addresses in the sitemap?
Monitoring after the switch
The work does not end at launch. New products arrive, templates change, a new link surface opens. A board that gains a second address again may go unnoticed for months. Practical suggestion: run three checks each month. First, the list of product pages whose canonical differs from their own address. Second, the share of sitemap addresses that match their canonical tag. Third, the count of internal links that carry parameters. If all three are near zero the rule is holding. Your team sets the target.
A question for every new feature
Ask of every feature whether it builds a new link format to a product. A comparison list, a wishlist, a campaign page or a back in stock notice that builds addresses its own way breaks the single builder rule. In the keyboard shop, confirm before release that the product cards on a campaign page carry the same address as the cards on category pages.
Pre-launch checklist
- Each product has one documented canonical address.
- Menu, card, breadcrumb and sitemap use the same format.
- Every indexable page has a self-referencing canonical tag.
- Duplicate addresses either redirect with a permanent redirect or carry a canonical tag.
- Temporary parameters (session, tracking, time) are absent from internal links.
- Robots.txt, noindex or the removal tool are not used to choose a canonical.
- Feed and sitemap point to the same canonical address.
For the wider picture of duplicate content, see the guide to duplicate content and how to fix it.
Points that get mixed up
Treating a canonical tag as a redirect
A canonical tag passes a preference to Google and counts as a strong signal. The duplicate page stays alive for visitors. A redirect retires the duplicate. The two suit different situations.
Assuming the sitemap is enough
The page classes sitemaps as a weak signal and adds that Google still has to determine duplicates itself. It is easy to maintain at scale, but it belongs beside canonical tags and redirects.
Treating the category path as a ranking factor
Decide on upkeep cost and consistency, not on an assumed ranking advantage.
Frequently Asked Questions
Should a product URL contain the category path?
The documentation has no statement on that. Google's page recommends descriptive words in product paths and does not address category-based hierarchies. Decide using upkeep cost and consistency.
How many addresses should a product listed in several categories have?
One canonical address. Google's page recommends minimizing alternative URLs that return identical content and explains how to point duplicates at the preferred address.
Should I use a redirect or rel="canonical"?
According to Google's page both are strong signals. Redirects suit retiring a duplicate page. A canonical tag suits a duplicate that stays alive.
Which address belongs in the sitemap?
The page says to choose a canonical URL for each page and submit those in a sitemap. A sitemap URL that differs from the rel="canonical" URL creates conflicting signals.
Can I block duplicate addresses with robots.txt?
The page advises against it. Disallowed URLs can still be indexed without their content, so robots.txt is not used for canonicalization.
What happens if I specify no canonical?
According to the page, no method is required. If none is specified, Google chooses the version it judges best to show users.
Conclusion
Whether a product URL includes a category path is a question the documentation leaves open. The canonical decision itself rests on stated principles: one address per product, consistent links, self-referencing canonical tags, a sitemap that lists the same address, and either a redirect or a canonical tag for each duplicate. When a keyboard lives in several categories, a primary category rule or a flat address lightens the decision.
Once catalog addresses are in order, you can look at how products reach their audience. The Akua Adforce ad spaces page shows the placements available on the marketplace.
Post a comment
Please log in to leave a comment. Login