The short answer

A canonical tag declares the preferred URL for duplicate or very similar page content. Choose a target that represents that content, publish a clear canonical link in the HTML head, and inspect the actual output. It does not redirect visitors or guarantee which URL Google will select.

On this page
  1. Compare the content before choosing the URL
  2. A canonical tag example for a lamp shop
  3. Publish one clear document-level preference
  4. Inspect the page the site actually publishes
  5. Align the preference with the rest of the site
  6. Record Google's selection separately
  7. Sources & further reading

A canonical tag answers a narrow question: which URL should represent this content when more than one address serves an equivalent page? Start with the pages themselves, before changing a template setting.

The decision is easier when you separate three things: what each address shows, what preference the site declares, and what Google later selects. Those observations can disagree.

Compare the content before choosing the URL

Google groups pages with duplicate or very similar primary content and chooses a representative. Your preferred URL is a signal in that process, rather than a command Google must follow. Duplicate content can arise from ordinary site functions; its existence alone is not a spam-policy violation.

For your own review, write one sentence describing the useful content at each address. If those sentences describe different products, instructions or reader tasks, investigate further before treating the pages as interchangeable.

A shared header and a similar title do not make two product pages duplicates. Conversely, an added tracking parameter does not necessarily create new content. Load each actual address and compare what it serves.

A canonical tag example for a lamp shop

Consider a fictional shop selling a compact desk lamp. These URLs and products are illustrative; they are not a tested merchant site.

Address on the fictional site What it serves and the decision
https://example.com/lamps/desk The complete desk-lamp page. Choose this as the preferred address if it is the intended stable page.
https://example.com/lamps/desk?campaign=autumn In this example, exactly the same desk lamp and information. Declare the clean desk URL as preferred while retaining the campaign address for visitors.
https://example.com/lamps/floor A different lamp with its own specifications. Keep its identity separate; do not point it at the desk lamp merely because both are lamps.

The important work is the equivalence judgment. In the second row, a reviewer must actually confirm that the parameter leaves the useful content unchanged. A real parameter might change a selection, availability or another meaningful part of a page.

Record that finding beside the preferred URL. It gives the next editor a reason for the choice, rather than an unexplained instruction to strip every query string.

Publish one clear document-level preference

For the duplicate desk-lamp page, the HTML head can contain:

<link rel="canonical" href="https://example.com/lamps/desk">

Use the same self-referential declaration on the preferred desk page. Google recommends an absolute URL and placement in a valid HTML head. Inspect the CMS's existing output before adding another element; the setting may already be supplied by a theme or plugin.

This is a link element describing the document's relationship. It is not an ordinary clickable anchor. The nofollow, sponsored and UGC guide handles those different link relationships.

The declaration does not move a visitor to another address. If a page should actually move, use the 301 versus 302 guide to choose and verify the appropriate routing behavior.

Inspect the page the site actually publishes

Open both the preferred address and its duplicate. This read-only console expression lists canonical link elements in the current document, including whether they are inside its head:

Array.from(
  document.querySelectorAll('link[rel~="canonical" i]'),
  link => ({
    inHead: document.head.contains(link),
    href: link.getAttribute('href')
  })
)

For the simple example, expect one result, inHead: true, and the exact absolute desk URL. An empty array means the expression found no matching element; multiple entries need investigation. A result in the body is not the head declaration this example requires.

Read the literal address carefully. Open the target separately: check its HTTP 200 response, intended real content and absence of an accidental noindex instruction. The expression does not fetch that target or assess whether the two pages are equivalent.

A site can instead declare a canonical through an HTTP Link response header. This expression reads HTML elements only; check the response headers too if that is how your site publishes its preference.

For this article, we checked the exact HTML and expression in isolated Chromium documents: the intended declaration, a missing declaration, conflicting duplicate elements and an element placed in the body. Those checks establish what the inspection reports in controlled documents. They do not test a CMS or Google's canonical selection.

Align the preference with the rest of the site

Keep the chosen address consistent across canonical declarations, useful internal links and the sitemap. Avoid sending different preferences from different parts of the site. The sitemap guide covers the separate job of maintaining and verifying that inventory.

Do not substitute a robots.txt block or a noindex instruction for this duplicate-page decision. Their purposes and effects differ; the crawl versus index control guide explains intentional exclusion.

Keep the change small enough to audit. For the fictional shop, review the two desk URLs first, then check the shared template for accidental reuse on the floor-lamp page. A mechanically valid tag pointing every product at one page would still describe the content badly.

Record Google's selection separately

Google's troubleshooting guidance directs owners to URL Inspection to check the Google-selected canonical, then investigate technical signals or content when that choice is unexpected. Use that evidence when you have authorized Search Console access; a local browser result supplies a different observation.

Keep a short record: inspected page, intended target, current published declaration, target-content check, and any dated Google-selected result. Leave the last item unknown when you cannot inspect it.

A useful stopping point is a supported preference that the public page actually declares, with its target verified and conflicting signals investigated. It is not proof of indexing, a ranking increase or an immediate change in Google's selection.

Sources & further reading

Primary references checked Nov 5, 2026. Platform guidance can change.

  1. Google Search Central: canonicalization overview
  2. Google Search Central: specify a canonical URL
  3. Google Search Central: fix canonicalization issues
  4. MDN: the rel HTML attribute
  5. RFC6596: the canonical link relation

AI-assisted research and writing. Learn about our editorial standards.

Suggest a correction ↗