Opens in a new tab
  1. Home
  2. Guides
  3. SEO
SEO guide

WordPress canonical URLs, explained

Understand how canonical URLs work in WordPress, how Google chooses a canonical, and how to handle duplicate pages, parameters, pagination, sitemaps and redirects correctly.

  • Updated September 7, 2026
  • 18 min read
  • WordPress guide

A single piece of WordPress content can sometimes be reachable through more than one URL.

Tracking parameters, HTTP and HTTPS variants, pagination, alternate permalink forms, syndicated copies, filtering systems and configuration mistakes can all create multiple URLs that display identical or substantially similar content.

Search engines then need to decide which URL should represent that content in their index.

That is where canonical URLs come in.

A canonical URL is the preferred representative URL for a page or group of duplicate or near-duplicate pages. Websites can suggest that preference with a rel="canonical" link element, redirects, sitemap URLs and consistent internal linking.

WordPress already includes canonical functionality for published singular content, so a standard WordPress installation is not starting from zero. SEO plugins and custom implementations can extend or replace that behavior when more complex canonical rules are required.

The important detail is that a canonical tag is not an absolute command to Google.

Google considers canonical annotations alongside other signals and can select a different URL when those signals conflict or when another URL appears to be a better representative of the content.

Canonical SEO therefore works best when the canonical tag, redirects, internal links, sitemap and actual page behavior all point toward the same URL.

What is a canonical URL?

A canonical URL is the URL considered the main representative of a page when the same or substantially similar content can be accessed from multiple addresses.

Imagine a product page available at:

  • https://example.com/product/blue-shirt/
  • https://example.com/product/blue-shirt/?utm_source=newsletter
  • https://example.com/product/blue-shirt/?sort=popular

If those URLs show essentially the same product, you normally do not want search engines treating them as three separate pieces of content.

The preferred page could declare:

<link rel="canonical" href="https://example.com/product/blue-shirt/" />

This tells search engines that the clean product URL is the preferred representative.

Canonicalization is about URL consolidation

Google describes canonicalization as selecting the representative URL from a set of duplicate pages.

The search engine can then consolidate many signals around that representative instead of treating every variation independently.

Canonicalization can help with:

  • duplicate or near-duplicate URLs;
  • tracking parameters;
  • sorting and filtering parameters;
  • HTTP and HTTPS variants;
  • www and non-www variants;
  • mobile or regional variants in appropriate configurations;
  • syndicated or duplicated content;
  • multiple technical routes to the same resource.

A canonical is not necessarily the URL currently being visited

A page can point to itself as canonical, which is called a self-referencing canonical.

It can also point to another URL.

For example:

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

can appear on a duplicate URL and indicate that /preferred-page/ should represent the content.

How canonical URLs work in WordPress

WordPress core already provides canonical functionality for singular content such as posts and pages.

The core function rel_canonical() outputs a canonical link element for singular queries.

Internally, it uses wp_get_canonical_url() to determine the canonical URL of the current post.

WordPress normally uses the permalink

For a published post, wp_get_canonical_url() begins with the post’s permalink.

That means a page such as:

https://example.com/guides/wordpress-security/

will normally use that permalink as its canonical URL.

WordPress therefore establishes a sensible default for ordinary posts and pages without requiring administrators to manually write a canonical element for every URL.

WordPress handles paginated singular content

The core canonical function also accounts for pagination within singular content.

If a post is divided into multiple pages, WordPress can generate the canonical URL corresponding to the current paginated section rather than incorrectly pointing every section to page one.

This distinction is important because genuinely paginated content should not automatically be collapsed into a single canonical URL when each page represents part of the accessible document.

Canonical URLs can be filtered

WordPress provides the get_canonical_url filter.

Developers can use it when a site’s canonical requirements differ from the normal permalink.

Any custom implementation should be approached carefully because an incorrect filter can affect canonical output across a large number of pages.

Why canonical URLs matter for SEO

Duplicate content on a website is not automatically a spam violation.

It is normal for technical systems to create multiple URL variants.

The SEO problem is primarily ambiguity.

Search engines need to choose which URL to index

If several URLs contain the same content, Google groups those pages and chooses a representative canonical URL.

If your signals are consistent, the selected canonical is more likely to match the URL you want users to find.

If your signals conflict, Google may choose differently.

Links can become distributed across duplicate URLs

Suppose external websites link to several variations of the same page:

  • some link to the clean URL;
  • some link to a tracking URL;
  • some link to an old parameterized version.

Canonicalization helps search engines understand that those URLs represent the same underlying content.

Crawling can become less efficient

A site with thousands of unnecessary URL variants can give crawlers more duplicate URLs to discover and process.

This becomes particularly relevant for large WordPress sites, e-commerce catalogs and sites with extensive filtering or faceted navigation.

Canonicalization does not replace good URL architecture, but it helps clarify which URLs are intended to be primary.

Analytics and reporting become cleaner

When internal systems consistently use one preferred URL, analytics and SEO reporting become easier to interpret.

Instead of performance being fragmented across many technically equivalent addresses, the site has a clearer URL structure.

Self-referencing canonicals explained

A self-referencing canonical points back to the URL of the current page.

For example, the page:

https://example.com/wordpress-security/

could contain:

<link rel="canonical" href="https://example.com/wordpress-security/" />

This might seem redundant because the page is telling search engines that it is its own preferred version.

In practice, self-referencing canonicals are useful.

They establish an explicit preferred URL

A self-canonical makes the intended URL clear even when the same page later becomes accessible with additional parameters.

For example:

https://example.com/wordpress-security/?utm_campaign=social

can still point toward the clean URL.

They protect against accidental parameter variations

Marketing systems, analytics tools and third-party links frequently append parameters.

A consistent self-referencing canonical provides a strong signal that those parameterized versions belong to the original URL.

They make canonical behavior easier to audit

When every indexable primary page declares an expected canonical, automated crawlers can more easily identify anomalies.

A missing or unexpected canonical becomes visible during technical SEO audits.

Canonical tags vs. redirects

Canonical tags and redirects are related to URL consolidation, but they solve different problems.

A redirect moves the visitor

A server-side 301 or 308 redirect sends browsers and crawlers from one URL to another.

If:

https://example.com/old-page/

has permanently moved to:

https://example.com/new-page/

a permanent redirect is usually the correct mechanism.

The old page no longer needs to remain separately accessible.

For more detail, see 301 vs. 302 vs. 410: Which Redirect to Use?.

A canonical keeps the duplicate accessible

With rel="canonical", the current page still loads normally.

The canonical annotation simply indicates which URL should represent the duplicate set in search.

This is useful when duplicate URLs need to remain accessible for legitimate reasons.

Do not use canonical tags as a replacement for URL migrations

If an old URL has permanently been replaced, redirect it.

Do not leave the obsolete page accessible indefinitely and rely only on a canonical pointing to the replacement.

Google considers redirects a stronger canonicalization signal than canonical annotations.

For URL changes, see How to Migrate WordPress URLs Safely.

How Google chooses a canonical URL

The canonical element is important, but Google does not rely on it alone.

Google explicitly describes canonical declarations as signals rather than absolute rules.

Important signals can include:

  • redirects;
  • rel="canonical" annotations;
  • sitemap inclusion;
  • HTTP versus HTTPS;
  • internal linking;
  • content similarity;
  • overall site consistency.

Conflicting signals weaken your preference

Imagine the following setup:

  • Page A canonicalizes to Page B.
  • The XML sitemap contains Page A.
  • Most internal links point to Page A.
  • Page B redirects somewhere else.

The site is giving search engines several contradictory instructions.

A cleaner configuration would align all relevant signals around the preferred URL.

Google can ignore your declared canonical

If Google believes another URL is a better representative, it can select that URL instead.

This is why simply adding a canonical tag does not guarantee a particular indexing result.

Google Search Console’s URL Inspection tool can show both the user-declared canonical and the Google-selected canonical for URLs where that information is available.

Canonical URLs and XML sitemaps

An XML sitemap should generally contain the URLs you actually want search engines to index.

If Page B is canonical to Page A, submitting Page B in the sitemap creates mixed signals.

The sitemap says:

“This is an important URL I want crawled.”

The canonical says:

“Another URL should represent this content.”

The configuration may still be processed correctly, but there is usually little reason to create the contradiction.

Prefer canonical URLs in your sitemap

For standard indexable content, sitemap entries should generally represent canonical URLs.

This creates alignment between:

  • canonical elements;
  • XML sitemap;
  • internal links;
  • preferred indexable URLs.

For the sitemap side of the equation, see What Is an XML Sitemap and Why Does It Matter?.

Canonical URLs and URL parameters

Parameters are one of the most common causes of multiple URLs pointing to similar content.

Examples include:

  • analytics parameters;
  • advertising campaign identifiers;
  • sort options;
  • filters;
  • session-related values;
  • affiliate parameters;
  • tracking IDs.

Tracking parameters often canonicalize to the clean URL

A URL such as:

https://example.com/article/?utm_source=linkedin

usually represents the same article as:

https://example.com/article/

The clean URL is normally the logical canonical.

Filtering parameters require more thought

Suppose an online store has:

/shoes/?color=black

If that filtered page provides unique search value, targeting and content, automatically canonicalizing it to /shoes/ could prevent the filtered page from being treated as an independent search result.

If the filter only creates a duplicate sorting variant, consolidation may be appropriate.

Canonical decisions therefore depend on whether the URL represents genuinely distinct content that deserves independent indexing.

Canonical URLs and pagination

Pagination is frequently mishandled because every page in a sequence may look similar.

Consider:

  • /blog/
  • /blog/page/2/
  • /blog/page/3/

Page two is not simply a duplicate of page one. It contains a different set of posts.

Do not automatically canonicalize all pagination to page one

Doing so suggests that pages two and three are duplicates of the first page when they are not.

Paginated pages should generally have canonicals appropriate to their own accessible content unless there is a specific architecture that warrants another treatment.

WordPress singular pagination is handled separately

As noted earlier, wp_get_canonical_url() accounts for pagination within singular WordPress posts.

This prevents multi-page posts from blindly canonicalizing every section to the first URL.

Canonical URLs and duplicate WordPress archives

WordPress can generate many archive structures:

  • categories;
  • tags;
  • authors;
  • dates;
  • custom taxonomies;
  • custom post type archives.

Depending on the content strategy, some archives can become extremely similar.

Canonicalization can help in some duplicate scenarios, but it should not be used as a universal substitute for deciding which archives actually deserve to exist and be indexed.

Canonical is different from noindex

A canonical says:

“This content exists, but another URL is my preferred representative.”

noindex says:

“Do not index this page.”

Those are different instructions.

If an archive has no independent search value and should never appear in results, a deliberate indexing decision may be more appropriate than pointing it toward a loosely related canonical.

Do not canonicalize unrelated pages together

A category archive and an individual article are not duplicates merely because they discuss the same topic.

Canonicalization is intended for duplicate or substantially similar content, not for declaring which page is strategically more important.

For custom content structures, see WordPress Custom Post Types and SEO.

Common WordPress canonical mistakes

Pointing every page to the homepage

This effectively tells search engines that thousands of unique pages are duplicates of the homepage.

It destroys the meaning of the canonical signal.

Canonicalizing distinct content together

Two pages targeting similar keywords are not automatically duplicates.

If both contain distinct information and deserve to rank independently, each should normally have its own canonical.

Canonicalizing paginated archives to page one

Pages two, three and four often contain distinct items.

Treating all of them as exact duplicates can produce incorrect consolidation signals.

Using relative URLs unnecessarily

Canonical elements can technically work with relative references in some parsing contexts, but absolute URLs are clearer and reduce ambiguity.

Prefer:

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

instead of relying on ambiguous URL resolution.

Canonicalizing to a redirected URL

The canonical target should ideally resolve directly to the preferred final URL.

A canonical pointing to URL A which then redirects to URL B creates an unnecessary chain of signals.

Canonicalizing to a 404 or unavailable page

The canonical destination should be a valid representative page.

Pointing to an unavailable URL undermines the purpose of the annotation.

Using different canonical signals across the site

If internal links use one URL format, canonicals another and the sitemap a third, search engines must reconcile those differences.

Consistency is generally the better architecture.

Publishing multiple canonical tags

WordPress core, themes and SEO plugins can all potentially attempt to manage metadata.

If multiple systems output conflicting canonical tags, the result becomes ambiguous.

Only one system should normally own canonical output for a given page.

How to audit canonical URLs in WordPress

A technical SEO audit should test canonical behavior rather than simply checking whether a plugin setting is enabled.

Inspect the page source

Open a representative page and search the HTML source for:

rel="canonical"

Confirm that:

  • there is one intended canonical element;
  • the URL is absolute;
  • the protocol is correct;
  • the hostname is correct;
  • the path is correct;
  • the canonical target loads successfully.

Test parameterized URLs

Add a harmless tracking parameter to a page and inspect the resulting canonical.

For example:

/guide/?utm_source=test

If the parameter does not change the underlying content, you would normally expect the canonical to remain the clean guide URL.

Check redirects

Make sure canonical targets are not unnecessarily redirecting to another URL.

The canonical should ideally point directly to the final destination.

Compare against the XML sitemap

Check whether the same preferred URL appears in the sitemap.

Non-canonical duplicates generally should not dominate sitemap output.

Check internal links

Navigation, breadcrumbs, related posts and contextual links should normally link directly to the canonical URL.

Do not repeatedly send users and crawlers through redirects when the final URL is already known.

Use Google Search Console

Google’s URL Inspection tool can help compare your declared canonical with Google’s selected canonical.

If the values differ unexpectedly, investigate:

  • duplicate content;
  • redirects;
  • internal links;
  • sitemap URLs;
  • canonical tags;
  • server configuration;
  • localization signals.

Google’s canonicalization troubleshooting documentation specifically recommends checking these technical conflicts when Google selects an unexpected canonical.

Canonical URLs during WordPress migrations

Canonical errors become particularly dangerous during migrations because several URL systems can change simultaneously.

You might change:

  • domain;
  • HTTP to HTTPS;
  • www to non-www;
  • permalink structure;
  • subdirectory;
  • language structure;
  • post slugs.

Update canonical URLs to the new destination

After a migration, pages should not continue publishing canonical URLs pointing to the old domain or old path.

This can happen when:

  • database URLs were not migrated correctly;
  • SEO metadata contains hard-coded values;
  • caches contain old HTML;
  • custom templates contain static canonical tags;
  • environment configuration is incorrect.

Use redirects as the main migration signal

Google recommends permanent server-side redirects when URLs permanently change.

The new pages should then self-canonicalize, internal links should point directly to the new URLs, and the new URLs should appear in the sitemap.

This produces a coherent set of migration signals.

See How to Migrate WordPress URLs Safely for the broader process.

Canonical URL best practices for WordPress

  • Use one preferred URL for each indexable piece of content.
  • Use self-referencing canonicals on primary indexable pages.
  • Keep canonical URLs absolute.
  • Use HTTPS canonical URLs when HTTPS is the live protocol.
  • Keep hostname conventions consistent.
  • Point canonicals directly to final 200-status URLs.
  • Do not canonicalize unrelated pages together.
  • Do not use canonical tags as a replacement for permanent redirects.
  • Do not automatically canonicalize every paginated page to page one.
  • Use clean canonical URLs for tracking-parameter variants.
  • Evaluate filter and faceted URLs according to whether they deserve independent indexing.
  • Submit canonical URLs in XML sitemaps.
  • Link internally to canonical URLs.
  • Avoid multiple conflicting canonical elements.
  • Audit SEO plugins, themes and custom code for duplicate metadata output.
  • Update canonical URLs during migrations.
  • Check Google Search Console when Google selects an unexpected canonical.
  • Remember that a declared canonical is a signal, not a guaranteed indexing command.

Related guides

Final recommendation

Canonical URLs solve a specific technical SEO problem: deciding which URL should represent duplicate or substantially similar content.

WordPress already provides sensible canonical behavior for ordinary published posts and pages, but real websites often introduce additional complexity through tracking parameters, filters, archives, migrations, plugins and custom URL structures.

The most important canonical rule is consistency.

If a URL is your preferred version, make the rest of the site behave like it.

Use that URL in the canonical element. Link to it internally. Include it in the XML sitemap. Redirect obsolete alternatives when they no longer need to exist. Avoid sending search engines toward conflicting versions of the same content.

Do not use canonical tags to hide structural SEO problems.

If two pages are genuinely different, let them remain separate. If one URL has permanently moved, redirect it. If a page should not be indexed at all, make an explicit indexing decision rather than pointing a meaningless canonical somewhere else.

And remember that Google ultimately selects the canonical URL it considers most representative.

Your canonical tag is strongest when every other technical signal on the site supports the same conclusion.

Simplify your WordPress stack

A modular WordPress toolkit. 104 focused tools.

Ultimately, you can build cleaner workflows, maintain fewer plugins and enable only the features each website actually needs.