A canonical tag (<link rel="canonical">) is an HTML element placed in the <head> section of a web page. Its job is straightforward: it tells search engines which URL should be treated as the "master" version of that page. If the same content lives at multiple addresses, the canonical tag points to the one you want indexed and ranked.
What Duplicate Content Means for SEO
Duplicate content does not trigger a Google penalty in the traditional sense, but it creates real problems. When search engines find the same text on several URLs, they have to pick one version to show in results. If they pick the wrong one, your preferred page loses visibility. Worse, backlinks and ranking signals get split across all the duplicate URLs instead of being concentrated on a single page. Over time, this dilution can quietly push your content further down in search results.
In WordPress, duplicate content happens more often than most site owners realize. Pagination parameters, session IDs, tracking parameters like utm_source, www vs. non-www variations, trailing-slash differences, and HTTP vs. HTTPS can all create separate URLs that serve identical content. Category and tag archives sometimes overlap with posts, too.
How Search Engines Handle Duplicates Without Canonical Tags
When no canonical tag is present, search engines try to figure out the "best" URL on their own. Google considers factors like which version has more inbound links, which URL appears in the sitemap, and which format the internal links use. But this is a guessing game. Google might choose a URL with ugly query parameters over your clean permalink. It might consolidate signals on a version you did not intend. By letting the search engine guess, you lose control over how your pages appear in search results.
The rel="canonical" Link Element Explained
The canonical tag is a <link> element that sits inside the HTML <head>. Its syntax looks like this:
<link rel="canonical" href="https://example.com/page/" />This line says: "No matter which URL variant brought the user here, please treat https://example.com/page/ as the definitive version." Search engines then consolidate ranking signals onto that URL and typically display it in search results.
You can also set canonical URLs via the HTTP Link header, which is useful for non-HTML resources like PDFs. The header format is: Link: <https://example.com/page/>; rel="canonical".
Self-Referencing Canonicals
A self-referencing canonical is a canonical tag that points to the same URL it appears on. For example, the page at https://example.com/about/ has a canonical tag pointing to https://example.com/about/. This might seem redundant, but it is considered a best practice. Self-referencing canonicals protect your pages from being accidentally duplicated by query parameters or URL variations you might not be aware of. Most SEO plugins add self-referencing canonicals to every page by default, and there is no downside to including them.
Canonical Tag vs. Redirect: When to Use Which
Both canonical tags and 301 redirects solve the duplicate content problem, but they work differently and suit different situations.
- Canonical tag: Use when you want to keep both URLs accessible to users but consolidate search signals on one. This is ideal for pages with tracking parameters, print-friendly versions, or sorted/filtered product listings that need to stay functional.
- 301 redirect: Use when one URL should no longer exist at all. The redirect physically sends users and search engines to the new URL. This is the right choice after migrating to a new domain, changing a permalink structure, or merging two pages into one.
A simple rule of thumb: if users still need access to both URLs, use a canonical. If the old URL has no purpose anymore, redirect it.
Common Canonical Tag Mistakes
Canonical tags are easy to implement but also easy to get wrong. Here are the mistakes that show up most often:
- Pointing to a noindex page: If your canonical URL has a
noindexmeta tag, you are sending conflicting signals. You are telling Google to index the canonical URL while simultaneously telling it not to. Google may ignore both directives. - Broken or non-existent canonical URLs: If the canonical URL returns a 404 or redirects elsewhere, search engines cannot honor it. Always make sure the canonical target actually exists and returns a 200 status.
- Cross-domain canonicals without proper setup: Canonical tags across different domains can work, but Google treats them as a hint rather than a directive. If the domains do not appear related, Google often ignores the cross-domain canonical.
- Using relative URLs: Canonical tags should always use absolute URLs (starting with
https://). Relative paths can cause unexpected behavior depending on the base URL configuration. - Canonicalizing paginated pages to page 1: If you have a paginated article or product listing, do not point pages 2, 3, 4 back to page 1. Each paginated page has unique content and should either have a self-referencing canonical or be part of a properly structured pagination setup.
WordPress and Canonical Tags
WordPress has generated basic canonical tags automatically since version 2.9 through the wp_head action. However, the built-in implementation is minimal. SEO plugins provide much better control:
- Yoast SEO: Automatically generates canonical tags for all pages and lets you set custom canonicals per post, page, or taxonomy term through the post editor.
- Rank Math: Similar functionality with the added option of setting canonical URLs in bulk through its interface.
- The SEO Framework: Generates canonicals with sensible defaults and minimal configuration needed.
These plugins handle edge cases like paginated archives, attachment pages, and search result pages, all of which need different canonical treatments than standard posts.
Pagination and Canonical Tags
Paginated content is a special case. If your blog archive has pages at /blog/, /blog/page/2/, and /blog/page/3/, each page shows different posts. Canonicalizing all of them to /blog/ would tell Google that pages 2 and 3 are duplicates of page 1, which they are not. Each page should have a self-referencing canonical. Google previously recommended rel="prev" and rel="next" tags for pagination, but announced in 2019 that it no longer uses those signals. Self-referencing canonicals on each paginated page remain the recommended approach.
How Google Handles Conflicting Signals
Google treats the canonical tag as a strong hint, not an absolute rule. If other signals contradict your canonical tag, Google may choose a different URL. For example, if your sitemap lists URL A, your internal links all point to URL B, and your canonical tag points to URL C, Google has three conflicting signals and will use its own judgment. To make your canonical tags effective, align all signals: make sure your sitemap, internal links, hreflang tags, and canonical tags all point to the same preferred URL.
What InspectWP Checks
InspectWP checks whether your WordPress pages include a canonical tag and reports the canonical URL it finds. Missing canonical tags are flagged as an SEO issue because they leave your duplicate content handling up to search engine guesswork. InspectWP also detects if the canonical URL differs from the current page URL, which helps you verify that cross-page canonicals are intentional and correctly configured.