When building or improving a WordPress website, duplicate URLs appear more often than most people realize. A page may load with tracking parameters, category URLs, pagination, HTTP and HTTPS versions, or multiple archive paths that all point to nearly identical content.
Search engines can usually handle small amounts of duplication, but over time it can create indexing confusion. I frequently see newer WordPress sites with pages competing against themselves simply because canonical URLs were never configured properly — usually not because nobody set them, but because nobody checked whether the default was actually correct once the site grew past a few dozen pages.
The Short Version
Canonical URLs tell search engines which version of a page should be treated as the main version. WordPress core has output a self-referencing canonical tag on every post and page automatically since version 4.6 — most sites already have correct default canonicals with zero configuration. Where manual adjustment genuinely helps is custom pages, filtered ecommerce URLs, and tracking-parameter duplicates, and the easiest place to manage those overrides is an SEO plugin such as Rank Math or Yoast.
How Duplication Actually Happens on a WordPress Site
A canonical URL acts as a preference signal for search engines. Consider that these could all technically load the same page: https://example.com/product/, https://example.com/product/?utm_source=email, https://www.example.com/product/, and http://example.com/product/. Without a canonical signal pointing all of them at one preferred version, search engines may index them as separate pages — diluting ranking signals, creating duplicate-content warnings, wasting crawl budget, and occasionally showing the wrong URL variant in search results.
On WordPress specifically, this tends to show up around category and tag archives, WooCommerce product filters, pagination, tracking parameters appended by marketing campaigns, printer-friendly page variants, and near-duplicate landing pages built for slightly different keywords or cities.
How the Canonical Tag Works
A canonical URL sits inside a page’s HTML header as a simple link tag:
<link rel="canonical" href="https://example.com/main-page/" />
It tells search engines “this is the preferred version of this content.” Crucially, it does not force a redirect — visitors stay exactly where they are. The canonical only helps search engines consolidate ranking signals toward the preferred page, working invisibly in the background.
To check whether one is present and correct on any given page, open the page, view source (CTRL+U on Windows, CMD+OPTION+U on Mac), and search for rel="canonical". For most standard posts and pages, that tag should simply match the clean public URL of the page you’re looking at.
Setting Canonicals with an SEO Plugin
If you already use Rank Math or Yoast SEO, correct canonicals are almost certainly active on your site already — both plugins generate self-referencing canonicals automatically and add manual override fields for the cases that need them. To override one, open the post or page in the editor, find the plugin’s SEO panel, go to its Advanced tab, and enter the full preferred URL in the Canonical URL field. Save the page and the override takes effect immediately.
In most sites I build, I only set a canonical manually when there’s a specific, identified duplication problem — a filtered WooCommerce URL, a syndicated piece of content, or a genuinely near-duplicate landing page. Standard posts and pages work correctly with the automatic canonical and rarely need a manual override.
Setting a Canonical Without an SEO Plugin
You don’t strictly need Rank Math or Yoast for this, since WordPress core already handles the default case. If you need to override the canonical for one specific page — the actual use case that matters, given the default already covers everything else — a short snippet through a code-management tool like Code Snippets does the job, using WordPress’s own get_canonical_url filter:
add_filter( 'get_canonical_url', function ( $canonical_url, $post ) {
if ( $post->ID === 123 ) {
return 'https://example.com/preferred-page/';
}
return $canonical_url;
}, 10, 2 );
Replace 123 with the post or page ID you want to override, and the URL with the version search engines should treat as canonical. This achieves the same result as the plugin settings above, without adding plugin overhead for a single filter.
Where Canonicals Genuinely Help
WooCommerce stores generate multiple URLs for filtered or variable products — a canonical tag consolidates SEO value back onto the main product page rather than splitting it across every filter combination. Marketing campaigns routinely append tracking parameters like ?utm_source=, and without a canonical, each parameter variant risks competing with the clean URL in search results instead of just passing the click through. Businesses sometimes accidentally create near-identical service pages targeting different cities or keywords; a canonical helps where that overlap genuinely can’t be avoided. And paginated blog archives can create indexing confusion if left unconfigured, though most SEO plugins already handle this reasonably well by default.
Common Mistakes
Pointing every page to the homepage. This is one of the worst mistakes still occasionally seen on poorly configured sites — each page should usually carry a self-referencing canonical unless there’s a genuine reason to consolidate its content elsewhere.
Using canonicals instead of redirects. A canonical tag is not a substitute for a 301 redirect. Use a canonical when similar content genuinely needs to stay live and accessible; use a redirect when an old page is being replaced or a URL is permanently changing. Many WordPress sites end up using both together, for different pages.
Canonicalizing genuinely different content. Search engines may simply ignore a canonical tag if the two pages are too dissimilar — the pages need to be substantially similar for the signal to be respected at all.
Mixing HTTP and HTTPS in canonical URLs. If your site runs SSL, every canonical should consistently use the HTTPS version — a mismatch here can create its own indexing confusion, the same problem canonicals are meant to solve.
Final Thoughts
For most WordPress websites, correct canonical behaviour comes for free out of core, and installing a reliable SEO plugin covers nearly everything else automatically. The important part is checking that canonicals are actually configured correctly rather than assuming they are, and reaching for a manual override only in the specific cases — WooCommerce filters, tracking parameters, syndicated content — where the default genuinely doesn’t fit. As a site grows, duplicate URLs naturally increase through plugins, ecommerce features, filters, and marketing campaigns, so a periodic spot-check is worth building into routine maintenance rather than something you configure once and never revisit.

Etienne Basson works with website systems, SEO-driven site architecture, and technical implementation. He writes practical guides on building, structuring, and optimizing websites for long-term growth.