Canonical Tag in WordPress: A Beginner’s Guide

Laptop showing a search engine results page, illustrating canonical tags

What is a canonical tag in WordPress, and do you need to touch it? A canonical tag tells Google which version of a page is the main one when the same content can be opened at more than one address. Most of the time your SEO plugin handles it for you, but you should know how to check it and when it goes wrong. So, let’s start.

What is a canonical tag?

One page can often be reached through several addresses. For example:

  • https://example.com/page and https://example.com/page/ (with and without the last slash)
  • The http:// and https:// versions
  • The same page with tracking words added, such as ?utm_source=facebook

To a visitor these are one page. To Google they are different addresses, so it has to pick one to show. The canonical tag is a line of code in the page head that says “this is the main address”:

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

Google’s guide on consolidating duplicate URLs explains that this is a signal, not a command. Google decides in the end, and it may choose a different address if it thinks yours is a poor choice.

Why does this matter for SEO?

When Google finds several addresses for one page, it picks one and may ignore the rest. If it picks the one you did not want, the wrong address can appear in search results. Google’s SEO starter guide also says duplicate content is not a penalty by itself, but it wastes crawling effort. So canonicals are about tidiness and control, not about avoiding punishment.

How does Google choose the canonical page?

Google lists three ways to show your preferred address, from strongest to weakest:

MethodStrengthWhen to use it
301 redirectStrongYou are retiring a duplicate page for good
rel=”canonical” tagStrong signalDuplicates must stay reachable
Listing the URL in your sitemapWeaker signalAlways, for your main pages

You can combine them, but they must all agree. Pointing the tag to one address and the sitemap to another sends mixed signals.

How to check the canonical tag on a WordPress page

  • Open the page in your browser, right-click and choose View page source.
  • Press Ctrl+F and search for canonical.
  • You should find one line with rel=”canonical” in the head, and the address inside should be the clean, final address of that page, using https.

You can also use URL Inspection in Search Console. It shows both the “User-declared canonical” and the “Google-selected canonical”. If they differ, Google is disagreeing with you, and you should find out why.

How do you set a canonical tag in WordPress?

Good news: you usually do nothing. SEO plugins such as Rank Math and Yoast normally add a canonical to every page that points to the page itself. Google’s guide lists this self-referencing canonical as a best practice.

If you need to change one page, open it in the editor and look in your SEO plugin’s Advanced section for a canonical field. Paste the full address of the main page. Use this only when two pages really are near copies, for example a printable version of a post.

What did we see on our own sites?

On therecipeworld.com, Search Console listed a handful of pages under canonical-related statuses (about five) next to hundreds of other “not indexed” reasons. We looked at the size of each group before fixing anything, and decided the canonical group was not the problem. The big groups were “Crawled – currently not indexed” and noindex tag pages. That taught us to compare group sizes first.

We also found old posts with emoji in their web addresses. These can create odd duplicate addresses, and we explain the safe way to clean them up in our post on [emoji in WordPress URLs](/emoji-in-wordpress-url-fix-safely/).

What are the common mistakes?

Google’s own list of canonical mistakes is a good checklist:

  • Using robots.txt to handle duplicates. Google may still index a blocked address without its content.
  • Using noindex to choose a canonical. That removes the page from search completely.
  • Using relative addresses such as /page/ in the tag. Use the full address.
  • Pointing two methods at two different addresses.
  • Putting an http:// address in a sitemap on an https site.
  • Pointing a canonical at a page that is not a near copy, hoping to borrow its rankings. Google may simply ignore it.

Where are we less sure?

We cannot tell you how often Google ignores a canonical tag on small sites, because we have no data on it. Our opinion: leave your plugin’s defaults alone unless URL Inspection shows a real conflict. Editing canonicals by hand on many pages is a good way to create mistakes.

FAQ

Do I need a canonical tag on every page?

Google recommends a self-referencing canonical on the main version of a page. Your SEO plugin normally adds it for you, so just check one or two pages.

Is a canonical tag the same as a redirect?

No. A redirect sends visitors to a new address. A canonical tag leaves both pages open and only tells Google which one is preferred.

Can Google ignore my canonical tag?

Yes. Google treats it as a signal. If your declared page looks different from the page it points to, Google can choose another address.

Quick checklist

  • One canonical tag per page, with a full https address.
  • It points to the clean, final version of the page.
  • Your sitemap lists the same address.
  • No noindex or robots.txt tricks mixed in.
  • URL Inspection shows the same user-declared and Google-selected canonical.

Keep reading: [how to find invisible keywords in Google Search Console](/find-invisible-keywords-google-search-console/) shows you what Google actually does with your pages.

Sources

More guides on this topic

Scroll to Top