SEO

Canonical Tags for SEO: How to Pick the URL Google Indexes

A canonical tag is a line of HTML that names the main URL for a page that can be reached at several addresses. Google treats canonical tags as a strong hint, not a rule, when it chooses which URL to index and show. Give each indexable page one, pointing to itself or to its main version.

Most sites publish the same page at more than one address without meaning to. A product opens with or without a tracking code on the end, the site answers on both HTTP and HTTPS, and a category can be sorted three ways. To a visitor these are one page. To a search engine each address is a separate URL until something says otherwise.

Canonical tags are how you say otherwise. This guide covers what a canonical tag is, how much weight Google gives it, when a redirect or noindex is the better tool, and how to add one. It includes a worked example for an invented online store and a free check you can run in about 20 minutes. Every statement about Google and Bing comes from their own documentation, checked on November 17, 2026.

A canonical tag is a request. Redirects, internal links and your sitemap are what persuade Google to agree with it.

What is a canonical tag?

A canonical tag is an HTML element in the head of a page that names the preferred URL for that page's content. It is written as <link rel="canonical">, and search engines use it when they decide which address to index out of several that show the same thing.

In the HTML it looks like this:

<link rel="canonical" href="https://example.com/kettles/copper-kettle">

Google's page on what canonicalization is, last updated August 20, 2026, defines canonicalization as "the process of selecting the representative –canonical– URL of a piece of content." Six terms come up whenever the subject does:

TermWhat it means
Canonical URLThe one address chosen to represent a set of duplicate pages. Google makes the final choice.
Canonical tagThe <link rel="canonical"> element you add to state your preference. Also called rel=canonical or a canonical link element.
DuplicateAnother URL that shows the same or very similar main content.
Self-referencing canonicalA canonical tag that points to the page's own URL. Google's documentation calls it self-referential.
User-declared canonicalThe URL your tag names, as Search Console reports it.
Google-selected canonicalThe URL Google actually chose to index.

Why does one page end up at several URLs?

One page ends up at several URLs because servers, tracking links and site features each create addresses of their own. Google lists five common causes and says some duplication is normal.

  • Region variants: separate USA and UK pages, linked with hreflang, with essentially the same content in the same language.
  • Device variants: a mobile and a desktop version of a page on different URLs.
  • Protocol variants: the HTTP and HTTPS versions of a site.
  • Site functions: the results of sorting and filtering a category page.
  • Accidental variants: a demo copy of the site left open to crawlers.

Tracking parameters are an everyday sixth. Google's own example is a product page that is also reached at an address ending in ?gclid=ABCD.

Trailing slashes and capital letters are two quieter ones. A Google post of April 21, 2010, To slash or not to slash, says Google treats /foo/ and /foo as separate URLs, the home page excepted. Its URL structure guide, last updated October 21, 2026, says its URL handling is case sensitive, so /Kettles and /kettles are distinct URLs too.

Is duplicate content penalized?

Google's canonicalization page says some duplicate content on a site is normal and "not a violation of Google's spam policies." The downsides it names are practical ones: visitors may wonder which page is the right one, and performance is harder to track when it is spread over several URLs.

Google's guide on how to specify a canonical URL, last updated July 10, 2026, gives four reasons to state a preference anyway:

  • You choose which URL people see in search results.
  • Signals such as links to the duplicates are consolidated into the one preferred URL.
  • Your metrics for a piece of content sit under one address.
  • Googlebot spends less crawling time on copies and more on new or updated pages.

Does Google always follow canonical tags?

No: Google treats a canonical tag as a strong signal, not an instruction. Its documentation says that indicating a canonical preference "is a hint, not a rule," and that Google may choose a different page as canonical than you do.

Google describes the process this way. When it indexes a page it works out the page's primary content. Pages whose primary content is the same or very similar are clustered together, and Google picks the one it judges "objectively the most complete and useful for search users." Your signals feed that choice, and Google ranks them by strength:

SignalStrength, per GoogleUse it when
RedirectStrongThe duplicate URL is no longer needed
rel="canonical" (link element or HTTP header)StrongThe duplicate has to stay reachable
Sitemap inclusionWeakAlways: list only the URLs you prefer

Google says these methods "can stack": using two or more raises the chance that your preferred URL is the one shown. Two more signals come from how the site is set up. Google prefers HTTPS pages over equivalent HTTP pages, and it prefers URLs that are part of hreflang clusters.

The choice matters beyond the address in the results. Google says the canonical page is crawled most regularly, duplicates are crawled less often, and it uses the canonical page "as the main source to evaluate content and quality."

Do you need a canonical tag on every page?

You don't strictly need one, but we add one to every indexable page. Google says none of its canonicalization methods are required and that a site "will likely do just fine" without them, yet it also recommends a self-referential canonical on the canonical page itself.

Our reasons for adding it everywhere are practical:

  • It costs one line. Most platforms can add it from a template or a setting.
  • It covers URLs you didn't create. Anyone can link to your page with a parameter on the end. A page that names its own clean address in a canonical tag keeps naming it, whatever is added to the link.
  • It makes mistakes visible. When every page declares a canonical, a page whose tag names the wrong address stands out in a crawl or in Search Console.

Before you add one, check whether your platform already does. Google notes that on a CMS such as WordPress, Wix or Blogger you may not edit the HTML directly, and the canonical is set through a search engine settings page instead. Two canonical tags on one page are worse than none, as the mistakes section below explains.

Canonical tag, 301 redirect or noindex: which should you use?

Use a redirect when the duplicate URL can disappear, a canonical tag when both URLs must keep working, and noindex only when a page should be out of search entirely. Google's documentation is specific about each.

ToolWhat it doesUse it whenWhat Google says
Permanent (301) redirectSends visitors and crawlers to the preferred URLNobody needs the duplicate: HTTP versions, a second host name, moved pagesA strong signal, meant for retiring a duplicate page
Canonical tagLeaves both URLs working and names the main oneTracking parameters, sorted views, the same file in two formatsA strong signal, and the solution Google prefers over noindex within one site
noindexRemoves the page from search resultsThe page shouldn't be found in search at allNot recommended for choosing a canonical, because it blocks the page from Search completely
robots.txtStops crawling of a URLNever for duplicatesDon't use it for canonicalization: a disallowed URL may still be indexed without its content. Our addition: a crawler that can't fetch a page also can't read the canonical tag on it

Google adds one more "don't": the URL removal tool in Search Console hides all versions of a URL from Search, so it isn't a way to choose between them.

Bing gives the same advice in fewer words. Its webmaster guidelines say that when content moves you should "use redirects instead of canonical tags," and that canonical tags signal a preference but don't replace fixing the underlying duplication. Redirects, HTTPS and sitemaps are covered with the rest of the foundations in our guide to technical SEO.


How do you add a canonical tag?

You add a canonical tag by placing one <link rel="canonical"> element, with a full HTTPS address, in the head of every version of the page, including the main one. Steps 2 to 7 follow Google's documentation, and the first and last are ours.

  1. Pick one URL for each page. Decide the protocol, the host name and the exact path, and write the choice down so that everyone who edits the site uses it.
  2. Write the full address. Google supports relative paths but doesn't recommend them, because they "can cause problems in the long run," for example if a testing copy of the site gets crawled.
  3. Put it in the head. Google accepts the element only in the <head> section, so that section has to be valid HTML.
  4. Use exactly one. Check that your theme and an SEO plugin aren't each adding a tag. Google also advises choosing either the HTML element or the HTTP header, not both.
  5. Add the same tag to the main page. This is the self-referential canonical Google recommends.
  6. Make the rest of the site agree. Link to the canonical URL in your menus and content, and list it in your sitemap. Google says linking consistently to the URL you consider canonical helps it understand your preference. We also give the page's og:url tag, which link previews use, the same address. Our guide to internal linking covers how to check those links.
  7. Handle files and scripts. A PDF has no head, so Google supports a Link HTTP header with rel="canonical" for it, in web search results only. If the site is rendered with JavaScript, put the canonical in the HTML source and make sure scripts don't change it.
  8. Test it. This step is ours: view the page source, then run the check at the end of this guide.

The example below is the head of a product page at an invented kettle shop, opened from a newsletter link that added a tracking parameter.

A worked example

One canonical tag, as a search engine reads it

<!-- Address requested:
/kettles/copper-kettle
?utm_source=newsletter -->

<head>
  <title>Copper Kettle, 1.5 L</title>
  <link rel="canonical"
   href="https://harborkettle.example
   /kettles/copper-kettle">
</head>
  1. In the head. A canonical element in the body of the page is disregarded.
  2. One tag. The page has a single canonical declaration, not one from the theme and another from a plugin.
  3. A full address. It starts with https:// and the host name the shop chose, so it reads the same wherever the page is copied.
  4. The clean URL. The tracking parameter is gone. The same tag sits on the clean page itself, where it is self-referencing.
The shop and its URLs are invented for illustration. In real HTML the address is written on one line; it is wrapped here to fit.

Here is how the shop treats each address that can show the kettle or the category it sits in. The choices follow the table in the previous section.

AddressWhat it isWhat the shop does
https://harborkettle.example/kettles/copper-kettleThe page the shop wants indexedSelf-referencing canonical, listed in the sitemap, used in every internal link
http://harborkettle.example/kettles/copper-kettleThe HTTP version301 redirect to the HTTPS address
https://www.harborkettle.example/kettles/copper-kettleA second host name301 redirect to the chosen host
/kettles/copper-kettle?utm_source=newsletterA tracking link that has to keep workingCanonical tag naming the clean address
/kettles?sort=priceThe category, sortedCanonical tag naming /kettles: the same products in a different order
/kettles?page=2The second page of the categoryIts own self-referencing canonical: it lists different products, so it isn't a duplicate of page one

Two redirects, two canonical tags and two pages that name themselves. Filters, sorting and product variants multiply these addresses quickly on a real store, which is why canonical rules are part of our e-commerce SEO work.

Where do you set a canonical tag on your platform?

You set a canonical tag in your platform's SEO settings for each page, or in the head of each HTML file on a hand-built site. Several platforms add a self-referencing canonical on their own, so look before you add one.

  • WordPress with Yoast SEO: Yoast's help page says the plugin adds canonical URLs to a WordPress site. To change one, open the post or page, go to Advanced in the Yoast SEO sidebar and enter the full address in the Canonical URL field. Yoast doesn't output a canonical tag on a page marked noindex.
  • Wix: the Wix help center says Wix automatically creates a default, self-referencing canonical for every page and recommends not changing it. The setting is under SEO basics, in the Advanced SEO tab. Wix warns that a page with a changed canonical may disappear from your sitemap.
  • Shopify: a Shopify guide published on Shopify's blog on August 14, 2025, says canonical URLs are defined by default in Shopify's own themes, and that a store using a Theme Store theme doesn't need to add them. Custom canonicals need an edit to the theme code.
  • A hand-built site: the tag goes in the head of each HTML file, one per page.

On any other platform, search its help pages for "canonical". Whatever the platform says, view the page source afterwards and confirm there is exactly one tag.

What are the most common canonical tag mistakes?

The most common canonical tag mistakes are pointing the tag at the wrong page, declaring more than one, and contradicting the tag elsewhere on the site. Every row in the table below except the last is described in Google's documentation.

MistakeWhy it fails
Every paginated page points to page oneLater pages aren't duplicates of the first. Google says the content on pages two and beyond would not be indexed at all.
A category page points to a featured article or productIf Google accepts the tag, the category page drops out of search results.
The tag came along with a copied templateThe page names the template author's URL, or another page's, as its canonical.
Two canonical tags on one pageGoogle says that with multiple declarations it will likely ignore all of them.
The tag is in the bodyGoogle processes the element only in the head.
The address is missing https://example.com/page is read as a relative path, so the tag names a URL that doesn't exist.
The canonical is a URL fragmentGoogle generally doesn't support fragments, the part of a URL after #.
The target is an error page or carries noindexGoogle's advice is to check that the target exists and has no noindex robots meta tag.
The sitemap lists one URL and the tag names anotherGoogle says not to specify different canonical URLs for the same page with different techniques.
A translated page points to another languageWith hreflang, Google says to specify a canonical page in the same language.
The canonical names a URL that redirectsThe tag says one address and the redirect says another. Name the final URL, the one that loads without a redirect.

The first six rows and the noindex row come from a Google Search Central post of April 8, 2013, 5 common mistakes with rel=canonical, written by Allan Scott of Google's indexing team. The post now carries a banner saying some of its information may be outdated. We found nothing in Google's current documentation that contradicts the points used here. The redirect row is our own advice, and the remaining rows come from Google's current guide.

Why did Google choose a different canonical than the one you declared?

Google chooses a different canonical when its other signals outweigh your tag, or when it doesn't consider the two pages duplicates at all. Search Console reports the outcome under three statuses in its Page indexing report.

A web page on the left joined by a thread of gold light to a page at the upper right whose text glows gold, while a magnifying glass rests on a different page at the lower right whose text glows blue
Status in Search ConsoleWhat it meansWhat to do
Alternate page with proper canonical tagThe page points to its canonical correctly, and the canonical is indexedNothing
Duplicate without user-selected canonicalThe page is a duplicate with no declared preference, and Google picked the other pageNothing if Google's pick is right. Add a canonical tag if it isn't
Duplicate, Google chose different canonical than userYou declared one URL and Google indexed anotherInvestigate with the steps below

The wording of the statuses comes from Search Console's help page on the Page indexing report. It describes the second status as working as intended, not as an error. On the third it makes a point that is easy to miss: if the URL you declared isn't similar to the page, Google won't ever choose it as the canonical.

Google's guide to fixing canonicalization issues, last updated August 21, 2026, sets out what to do next:

  1. See what Google chose. Inspect the URL in Search Console, compare the user-declared and Google-selected canonicals, and ask whether Google's choice makes more sense for people arriving from Search.
  2. Look for a technical cause. Google lists a CMS or plugin that sets the wrong canonical, a misconfigured server, missing hreflang annotations on localized pages, and hacked pages where a cross-domain canonical has been inserted.
  3. Make separate pages clearly different. If two pages are meant to be separate, their content has to differ enough. Google says it might hold pages in a duplicate cluster for up to two weeks after a fix.
  4. Ask for a fresh look. Use Request Indexing in the URL Inspection tool. It has a quota, so Google suggests saving it for your most important URLs.

Do canonical tags matter for AI search?

Canonical tags matter for AI search because AI answers link to indexed pages, and the canonical is the version that gets indexed. Google and Bing both document the connection, in different words.

Google's guide to AI features and your website, last updated December 10, 2025, says that to be shown as a supporting link in AI Overviews or AI Mode, a page "must be indexed and eligible to be shown in Google Search with a snippet, fulfilling the Search technical requirements." It adds that there are no additional technical requirements.

Google's canonicalization page says the canonical is its main source for evaluating content. Our reading is that the page considered for those links is the one Google selected as canonical, so a clear canonical is part of being eligible.

Bing is more direct. Its webmaster guidelines say duplicate URLs dilute signals and reduce its confidence in selecting a URL for grounding results or citations. They recommend canonical URLs, parameter controls and consistent URL structures, and say a sitemap should list only canonical URLs.

Neither document promises a citation. They describe a condition for being considered. For the rest of that work, see our guide to showing up in Google AI Mode.

How do you check your canonical tags for free?

You check your canonical tags by reading the tag on each key page, testing the duplicate addresses, and comparing your choice with Google's in Search Console. On a small site this takes about 20 minutes and needs only a browser and Google Search Console.

  1. Read the tag. Open a key page, view its source and search for rel="canonical". Note the address it names.
  2. Count the tags. There should be exactly one, inside the head.
  3. Read the address. It should be a full URL that starts with https://, uses the host name you chose, and opens a working page.
  4. Try the duplicates. Type the HTTP version and the other host name into the browser. Each should redirect to the address you chose. Then add ?test=1 to the URL: the page should load and its canonical tag should still name the clean address.
  5. Open your sitemap. Every URL in it should be one you want indexed, written the same way as in the canonical tags.
  6. Open the Page indexing report. In Search Console, look under "Why pages aren't indexed" for the three statuses in the table above, and open the list of URLs behind each.
  7. Inspect the surprises. Put a URL into the URL Inspection tool and compare "User-declared canonical" with "Google-selected canonical" under Page indexing. Where they differ, follow the four steps in the previous section.

We ran the first three steps on this post. It has one canonical tag, in the head, naming https://digitalrelevance.io/en/blog/canonical-tags-for-seo, the address without .html that our sitemap also lists. Canonicals are one group of items on our technical SEO checklist, which covers the crawling and indexing checks that sit beside them.

The short version: choose one address for each page, say so with one canonical tag in the head, redirect the versions nobody needs, and keep your internal links and sitemap consistent with the choice. Then look at what Google selected, because the tag is a request and the report is the answer.

We checked the details in this guide against Google's canonicalization documentation, its AI features guide, its 2010 and 2013 blog posts, Search Console's help center, Bing's webmaster guidelines and the Yoast, Wix and Shopify pages on November 17, 2026. Clear canonicals help search engines index the address you chose. They don't guarantee a ranking or a citation, and no one can promise that they will.

Want your canonicals checked?

Send us your site and we'll show you which pages Google treats as duplicates, where its choice differs from yours, and what we would change first. Canonical tags are part of the technical work in our SEO services.

Ask for a Canonical Check

Frequently Asked Questions

What is the difference between a canonical tag and a canonical URL?

The canonical URL is the one address that represents a set of duplicate pages in a search engine's index. The canonical tag is the line of HTML you add to say which address you would like that to be. You write the tag, and Google makes the final choice of canonical URL.

Is duplicate content penalized by Google?

Not when it is ordinary duplication. Google's documentation says some duplicate content on a site is normal and is not a violation of its spam policies. The costs are practical: links and other signals are spread across several URLs, crawling time goes to copies, and the wrong address can appear in results.

Should every page have a self-referencing canonical tag?

Google doesn't require it, and says most sites will do fine without stating a preference. It does recommend a self-referential canonical on the canonical page itself. We add one to every indexable page, because it costs one line and keeps the clean address named when someone links to the page with extra parameters.

Should I use a canonical tag or a 301 redirect?

Use a 301 redirect when the duplicate address is no longer needed, such as the HTTP version of a page or an old URL. Use a canonical tag when both addresses must keep working, such as a link with a tracking parameter. Google lists both as strong signals, and they work best together.

Can a canonical tag point to a page on another website?

It can. Google's troubleshooting page describes cross-domain canonical links being acted on, for example on hacked sites. Its documentation doesn't recommend the canonical link element for content you syndicate to partner sites, because those pages are often very different. It says the most effective solution is for the partners to block indexing of your content.

How long does Google take to act on a canonical tag change?

Google gives no fixed timeline. Its troubleshooting documentation says that even after you fix content issues, it might hold pages in a duplicate cluster for up to two weeks. You can use Request Indexing in the URL Inspection tool to ask for a fresh look, but that feature has a quota.

Canonical Tags Duplicate Content Technical SEO Redirects Search Console AI Search