Canonical Tags: Consolidating Duplicate Content for SEO

7 sections 5 min read

A canonical tag is a rel="canonical" link element that tells Google which URL you prefer when the same or nearly the same content is available at several addresses. It consolidates duplicates onto one URL: Google indexes the preferred version and, as its documentation on consolidating duplicate URLs puts it, signals such as links to the other versions “get consolidated” with the canonical. Google treats the tag as a strong signal, not a command, and weighs it with redirects, sitemaps, and the site’s own links.

How Google Weighs Canonical Signals

Google’s documentation lists the methods “in order of how strongly they can influence canonicalization”:

Method Strength according to Google
Redirects A strong signal that the redirect target should become canonical
<!–INLINECODE1–> annotations A strong signal that the specified URL should become canonical
Sitemap inclusion A weak signal

Without any of them, “Google will identify which version of the URL is objectively the best version to show to users in Search.” When the signals agree, the choice is predictable; when internal links, the sitemap, and the tag point at different URLs, Google may choose a URL you did not declare.

Implementing the Tag

In HTML, the element goes in the <head>:

<link rel="canonical" href="https://example.com/dresses/green-dresses" />

Google accepts the element only in the <head> section, so that section has to be valid HTML. For files that are not HTML, such as PDFs, the same signal can be sent as an HTTP header:

Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"

Google adds: “Google supports this method for web search results only.” It also recommends choosing one of the two methods, because using both “is more error prone.”

Rules from Google’s documentation:

  • Use absolute URLs. “Even though relative paths are supported by Google, they can cause problems in the long run,” for example when a test site gets crawled.
  • Add a self-referencing canonical to the canonical page itself; Google recommends it.
  • Don’t declare different canonicals for the same page through different methods, such as one URL in the sitemap and another in the tag.
  • Don’t use robots.txt for canonicalization. A blocked page’s tag is never read, and “Google may still index URLs that are disallowed in robots.txt without their content.”
  • Don’t use noindex to steer the choice within one site: “We don’t recommend using noindex to prevent selection of a canonical page within a single site, because it will completely block the page from Search.”
  • With JavaScript, put the canonical in the HTML source and make sure scripts do not change it.

Common Scenarios

Scenario What to do
HTTP and HTTPS versions Redirect HTTP to HTTPS; Google already prefers HTTPS as canonical unless the HTTPS page has problems
www and non-www Choose one, redirect the other, canonical to the chosen form
Tracking and session parameters Point the parameter version to the clean URL
Sort parameters Point to the unsorted URL only where the sorted view lists the same items; once pagination is involved, the same page number under two sort orders can list different products, so judge each URL by its content
Trailing slash variants Choose one pattern and redirect the other
Paginated series Each page gets its own canonical; do not point pages 2 and up to page 1
Separate mobile URLs The desktop page is the canonical, with a <!–INLINECODE5–> link to the mobile URL; the mobile page's canonical points to the desktop URL
Translated versions Each language version is canonical to itself; connect them with <!–INLINECODE6–>
Same-language regional copies Google treats near-identical copies (a US and a UK page, for example) as duplicates; connect them with <!–INLINECODE7–> and choose a preferred version where the content is the same

For pagination, Google’s guidance is explicit: “Don’t use the first page of a paginated sequence as the canonical page. Instead, give each page its own canonical URL.” The older rel="prev" and rel="next" markup no longer matters to Google: “Google no longer uses these tags, although these links may still be used by other search engines.”

For language versions, Google notes that rel="canonical" annotations with hreflang, lang, media, or type attributes “are not used for canonicalization,” and asks for a canonical page in the same language.

Duplicates on Other Domains

Canonical tags can point across domains, but syndication is not where Google recommends them. Its canonicalization troubleshooting guidance advises against canonical tags for content shared with syndication partners, since the partner’s page is often very different, and recommends that partners block their copy from being indexed instead. Cross-domain canonicals fit cases where you control both sites and the pages are true duplicates, such as merging two domains after an acquisition. If the old pages are being retired rather than kept live, a permanent redirect is the clearer signal, since it also moves visitors; a canonical tag leaves the old page in place.

When Google Picks a Different URL

The URL Inspection tool shows the user-declared canonical and the Google-selected canonical for a URL. Across the site, the Page indexing report lists URLs under “Duplicate, Google chose different canonical than user.” The usual causes to check:

  • The declared target redirects, returns an error, carries noindex, or is blocked.
  • The two pages are not similar enough to be treated as duplicates.
  • Internal links, the sitemap, or redirects point at another URL.
  • A template writes the same canonical URL on every page it generates.

When the declared and selected canonicals disagree on many URLs, fix the conflicting signals at their source, such as internal links and sitemap entries, instead of editing tags page by page.

Canonical, Redirect, or Noindex?

  • Use a redirect when the old URL should stop serving its own page, such as after a URL change.
  • Use a canonical tag when both URLs must stay available to visitors, such as tracking or print versions, and only one should be indexed.
  • Use noindex when a page should not appear in Search at all, not to choose between duplicates.

Questions About Canonical Tags

Can a wrong canonical tag remove a page from Google?
It can lead Google to index the target instead of the page. Pointing an important page’s canonical at another URL, or a template bug that points every page at one URL, can drop the intended pages from results. Audit canonicals across a full site crawl, not only a sample.

Can I canonicalize a category page to one product on it?
No. The pages are not duplicates, and Google consolidates duplicates based on similar content. Use internal links to support the product page instead.