Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Explainers · Explainer

What Is a Canonical Tag? A Plain Explanation

What Is a Canonical Tag? A Plain Explanation

Short answer

A canonical tag is a line in a page that names the one URL search engines should treat as the main version of that content. It is a strong signal, not a command, and Google may pick a different URL. Use it when the same content lives at more than one URL.

Key takeaways

  • A canonical tag names the one URL that should stand for a page in search results.
  • Google ranks canonical tags as a strong signal, equal to a redirect and stronger than a sitemap entry.
  • Use absolute URLs in canonical tags, never relative paths or URL fragments.
  • A canonical tag is a hint, not a command, and Google may pick another version.
  • Yoast SEO adds a self-referencing canonical to each page by default.
  • Never point a canonical at a page that redirects, returns a 404, or is set to noindex.

What is a canonical tag?

A canonical tag is a short line in a page that names the one URL you want search engines to treat as the main version of that content.

Its full name is a rel="canonical" link element, and it sits in the head section of the page. Google's docs describe it as a signal that a given URL should become canonical, and they rank it as a strong signal, on the same level as a redirect.

The idea is simple. The same content can live at more than one URL: with and without www, with tracking parameters, with a print view, or on a second domain.

A canonical tag points all those versions at one chosen URL, so links and ranking signals gather in one place instead of splitting across copies.

The tag itself does not move visitors or block any page. It is a preference, not a command, and Google may pick a different URL if its other signals disagree.

How does a canonical tag work?

A canonical tag works by telling a search engine which URL to show in results when several URLs hold the same or very similar content.

When Google crawls a page and finds the tag, it reads the URL named in it and weighs that choice against its own signals.

Google's docs list 3 methods in order of strength: redirects, rel="canonical" link annotations, and sitemap inclusion. Redirects and canonical tags are both strong signals, while sitemap inclusion is a weak signal.

The methods can stack. Google says that using 2 or more of them increases the chance that your preferred URL appears in search results. So a page can carry a canonical tag and also appear in your sitemap with the same URL, and both point the same way.

If you set no canonical tag at all, Google picks a version on its own. Its docs state that if you do not specify a canonical URL, Google will identify which version is the best one to show in search.

That is why a missing tag is not an error by itself: it only means you gave up the choice.

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

A canonical tag suggests a preferred URL while leaving every version live, while a redirect sends visitors and crawlers from one URL to another.

Use a redirect when a page is gone for good or has moved, because the old URL should stop serving content.

Use a canonical tag when both versions need to stay live, such as a product page with tracking parameters or a print-friendly copy. Google's docs make the same split: redirects are for deprecating a duplicate page, while canonical tags handle copies that stay online.

A redirect is also the stronger of the two in practice. It removes the old URL from use, so there is nothing left to confuse. A canonical tag leaves the duplicate page live and crawlable, so Google can still choose the other version if it finds stronger signals pointing there.

MethodWhat happens to visitorsWhen to use it
Canonical tagNothing changes, the page still loadsDuplicate stays live, such as tracking URLs
301 redirectSent to the new URLPage moved or removed for good
Sitemap entryNothing changesLarge site, as a weak extra signal
NoindexPage blocked from searchPage should never appear, not for duplicates

Google warns against using noindex to pick a canonical within your own site, because it blocks the page from search entirely. The canonical tag is the preferred fix for that job.

When should you use a canonical tag?

Use a canonical tag when the same content is reachable at more than one URL and you want one of them to win in search results.

Tracking parameters are the most common case. A product page with ?gclid=ABCD added by an ad click is the same page as the clean URL, and Google's own example uses exactly that case: a green dress page reached through a tracking link should point at the clean product URL.

The same applies to sort orders, filters, and session IDs that change the URL without changing the content.

Syndicated content is the second case. If another site republishes your article, a canonical tag on their copy that points at your original tells search engines where the content started.

The tag can point to a different domain: the standard behind it, RFC 6596 from April 2012, states that the target may exist on a different hostname or domain.

SituationCanonical should point to
Tracking parameters on a product pageClean product URL without parameters
Print or AMP version of a pageMain version of the page
Same article on 2 category pathsThe one category path you prefer
Syndicated copy on another siteOriginal article on your site
HTTP and HTTPS versions both liveHTTPS version

Our guide on how to set canonical URLs in WordPress shows the WordPress setup step by step.

How do you add a canonical tag in WordPress?

You add a canonical tag in WordPress with an SEO plugin, which writes the tag for each page automatically.

Yoast SEO adds canonical URLs to a WordPress site by default, and it picks the page's own URL unless you change it.

That self-referencing tag is the normal case: every page points at itself, which tells Google that the page you are looking at is the main version. You only need to change it when a page should point somewhere else.

To change one in Yoast SEO, open the post, page, category, or tag, open the Yoast SEO sidebar, go to “Advanced”, and type the full URL into the “Canonical URL” field.

Yoast's help page, updated September 29, 2026, lists those 5 steps and notes that you must include the full address, with the https and www or non-www form at the start. Then publish or save the post to apply the change.

If the page is set to noindex, Yoast outputs no canonical tag at all. Its help page says to mark the page as index first if you need the tag to show.

Developers can also read or change the canonical field through Yoast SEO Abilities, which lists canonical as one of the post SEO data fields alongside the title and meta description.

What does a canonical tag look like in code?

A canonical tag is one line in the head section of a page, naming the preferred URL with a rel="canonical" attribute.

For a page whose main URL is https://example.com/dresses/green-dresses, the tag reads as follows, written here without the surrounding brackets so it displays as text:

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

Google's docs use that same example URL in their own sample code. The tag must sit in the head section, and Google only accepts it there, so a tag placed in the body is ignored.

Use absolute URLs, not relative ones. Google recommends absolute paths and warns that relative paths can cause problems over time, for example if a test site is crawled by mistake. Its docs give https://www.example.com/dresses/green/green-dress.html as a good example and /dresses/green/green-dress.html as a bad one.

For files that are not HTML, such as a PDF, there is no head section to put the tag in. Google supports the same signal as an HTTP header instead, with a Link header that carries rel="canonical" and the URL.

How do you check your canonical tags?

Open the page in a browser, view the page source, and search for canonical to see the tag and the URL it names.

The tag should name the URL you expect, with the same https and www or non-www form as the live page. If it names a different page, check the SEO plugin settings for that post first, since a leftover custom canonical in the “Advanced” tab is the usual cause.

Google Search Console gives a second check. Its URL Inspection tool shows which URL Google picked as canonical and whether it matches the one you declared.

If the two differ, look at the other signals: internal links, the sitemap, and redirects. Google's docs note that linking within your site to the canonical URL, rather than to a duplicate, helps Google understand your preference.

Our guide on the best permalink structure for SEO helps you pick clean URLs in the first place, so there are fewer duplicates to fix.

What mistakes should you avoid with canonical tags?

Do not point a canonical tag at a page that redirects, returns a 404, or is set to noindex, because that wastes the signal.

Google's docs list several clear mistakes. Do not use a URL fragment as the canonical, since Google generally does not support fragments. Do not name different canonicals with different methods, such as one URL in the sitemap and another in the tag.

Do not use the robots.txt file for canonicalization, and do not use the URL removal tool, which hides all versions of a URL from search.

Another common mistake is to canonicalize every page to the home page. The target must hold the same content or a superset of it, according to RFC 6596, so pointing a product page at the home page tells Google something false.

Each page should point at its own main version or at the true original.

If you change permalinks, update the canonicals too. Our guide on how to change permalinks without breaking SEO covers that move.

Our guide on how to fix 404 errors for SEO in WordPress covers what to do when an old URL stops working.

Frequently asked questions

Does a canonical tag force Google to use that URL?

No. A canonical tag is a hint, and Google may pick a different URL if its other signals disagree. A 301 redirect is stronger because it removes the old URL from use. Use a redirect when a page has moved for good.

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

Yes, if the other site adds a canonical tag on their copy that points at your original. The tag can point to a different domain. Without that tag, search engines may treat the two copies as rivals and pick either one.

Do I need to add a canonical tag to every page?

Most SEO plugins add a self-referencing canonical to every page by default, so you do not need to add one by hand. You only need to act when a page should point at a different URL, such as a duplicate with tracking parameters.

Google picked a different canonical than mine. What should I check?

Check the page source first to confirm the tag names the URL you expect. Then check Google Search Console, which shows the canonical Google picked. If they differ, fix conflicting signals such as internal links, the sitemap, or redirects.

Does a canonical tag hide the duplicate page from visitors?

No. A canonical tag only affects which URL search engines show for that content. It does not move visitors, change rankings directly, or hide any page. Pages that should never appear in search need a noindex tag instead.

Sources

  1. How to Specify a Canonical with rel="canonical" and Other Methods Google for Developers
  2. RFC 6596: The Canonical Link Relation IETF
  3. How to change the canonical URL in Yoast SEO for WordPress Yoast
  4. rel=canonical tag: the ultimate guide to canonical URLs Yoast
  5. Yoast SEO Abilities - Post's SEO data Yoast Developer Portal

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.