If you’ve spent time on SEO, you’ve probably come across the term canonical URL.
It’s one of those concepts that sounds more complicated than it is. But get it wrong, and it can cause real indexing and ranking problems without any obvious warning signs.
This guide covers what canonical URLs are, why they matter for SEO, and when and how to use them. It also discusses implementation best practices and how to audit your website for canonical problems.
What is a canonical URL?
A canonical URL is the URL you want search engines to treat as the official one when the same content is accessible from multiple URLs.
Not clear? Let’s walk through an example.
Imagine WebYes has a homepage accessible at all of these URLs:
http://example.com/– the non-secure HTTP versionhttps://www.example.com/– the www versionhttps://m.example.com/– the mobile version
Three different URLs, but every single one loads the exact same homepage with the exact same content. So which page do you want Google to index and show in results?
Well, you need to tell Google: “This is my main page. This is the one I want you to show people.”
You do that with a canonical tag. A canonical tag is a line of HTML code you add to the <head> of a page that points to the URL you want search engines to treat as the official one. You add it to every duplicate version pointing to your one main URL.
Let’s say you want your main version to be https://www.example.com/.
You add this tag to the <head> of every other version:
<link rel="canonical" href="https://www.example.com/" />
That tag tells Google: “Whatever URL you found this page at, this is the one I want you to index and show in results.”
That URL, https://www.example.com, is your canonical URL.
In other words, a canonical URL is simply the one URL you want Google to index, rank, and show in search results, when multiple URLs serve the same content.
But there is a twist.
The canonical tag is not a hard rule. Google treats it as a hint, not a directive.
That means even if you tag https://www.example.com/ as your canonical URL, Google can ignore it and index a different URL if it thinks that one is a better fit.
So setting a canonical tag is important, but it is not a guarantee.
We cover how Google makes that decision, and what you can do to make sure it follows your instructions in the next section.
How Google selects a canonical URL
When Google crawls your site, it identifies the main content of each page. If it finds multiple pages with the same or very similar content, it picks the one it considers most complete and useful for searchers and marks it as canonical.
To decide which URL to canonicalize, Google looks at a handful of signals:
- The
rel="canonical"tag - Redirects pointing to or from the page
- Internal links pointing to the page
- Whether the URL appears in your sitemap
- Whether the page is served over HTTP or HTTPS
- A clean, well-structured URL
When Google overrides your canonical tag, you can spot it in Google Search Console.
Go to the Page Indexing report and look for the status “Duplicate, Google chose different canonical than user.” If you see it, that means Google has ignored your declared canonical and chosen a different URL as the main page.
In the next section, we cover how to fix it.
What to do when Google overrides your canonical
The answer is simple: pick the URL you want Google to treat as the official one and use it consistently across your entire website.
In other words, make sure every signal points to that same URL:
- Set the canonical tag on every duplicate version pointing to your preferred URL.
- Update your internal links so they all point to the preferred URL, not the duplicates.
- Add your preferred URL to your sitemap so Google sees it as the intended primary page.
- Redirect any duplicate versions to the preferred URL.
When every signal agrees, Google has no reason to choose differently.
Keep in mind that it can take time to reflect. Once you have aligned all your signals, Google needs to recrawl and reprocess your pages before it updates its choice. This can take anywhere from a few days to a few weeks, depending on how frequently Google crawls your site.
You can speed things up by submitting your preferred URL in Google Search Console. Go to the URL Inspection tool, paste your preferred URL, and click “Request Indexing.” This prompts Google to crawl it sooner, but it is not an instant fix.
Why canonical URLs matter for SEO
Canonical URLs matter because they put you in control of which page Google indexes, ranks, and how your crawl budget and link equity are spent.
Without a canonical tag, Google decides which version of your page to index, rank, and credit with backlinks. It may get it right. But it may not.
When Google picks the wrong version, three problems follow.
1. Your link equity gets diluted
When other sites link to your content, those links may point to different URL variations of the same page. If Google has not consolidated them under the right canonical, search engines divide that authority across every version instead of counting it toward one. The page you want to rank ends up weaker than it should be.
2. Your crawl budget gets wasted
Search engines allocate a finite number of pages to crawl on your site per visit. If Googlebot keeps revisiting URL variations with session tokens or filter parameters, it has fewer resources left to discover new content. On large sites, this becomes a meaningful problem.
3. The wrong page ranks
If Google picks the wrong canonical, the wrong version surfaces in search results. It may carry the wrong title, the wrong URL, or weaker signals than your preferred page. And even when you do set a canonical tag, Google can still override it if your other signals conflict.
When to use a canonical tag
Canonical tags solve a specific set of problems.
Here are the five situations where you are most likely to need one.
1. URL parameters that create accidental duplicates
Tracking links and on-site filters often change the URL without changing the page. example.com/shoes?utm_source=email and example.com/shoes show identical content, but search engines can treat them as separate pages. Set the canonical on the parameter version to point back to the clean URL.
2. HTTP, HTTPS, www, and non-www variations
Your homepage might load correctly at http://example.com, https://example.com, http://www.example.com, and https://www.example.com. All four are the same page. Without a canonical, search engines may split signals across every version instead of crediting one.
3. Syndicated content republished on another site
If another website republishes your article in full, both versions exist on the web with nearly identical content. The canonical tag on the republished version should point back to your original. Your site keeps the authority; theirs gets the traffic benefit of hosting the piece.
4. E-commerce product variants
A t-shirt page might generate a separate URL for each option: ?color=red, ?color=blue, ?size=large. Each variant URL shows the same product with minor differences. Set the canonical on each variant to point to the main product URL.
5. Mobile versions of the same page
If your site serves a separate mobile version at a different URL, the canonical on that mobile page should point to the desktop version. This tells search engines which version to index and ensures your signals consolidate on one URL.
How to add a canonical tag
There are four ways to declare a canonical URL. Each works differently, suits different file types, and sends a different strength of signal to Google.
1. HTML canonical tag
When to use: You have duplicate HTML pages and need to keep both URLs live.
Limitation: Does not work for non-HTML files such as PDFs or DOCX documents.
Add it inside the <head> of the duplicate page, pointing to the preferred URL.
<link rel="canonical" href="https://www.example.com/preferred-page/" />
2. Redirects
When to use: You are retiring old URLs or consolidating domains and do not need both versions to stay live.
Limitation: Both versions cannot stay accessible.
A redirect sends both Google and users from one URL to another. A common example is redirecting HTTP to HTTPS. Google prefers HTTPS, so redirecting the HTTP version consolidates your signals onto one URL. Use a 301 for permanent moves.
3. HTTP header
When to use: You have non-HTML files or cannot modify the HTML of a page directly.
Limitation: Requires access to your server configuration.
HTML pages use a canonical tag in the <head>. Non-HTML files like PDFs and DOCX documents have no <head>, so there is nowhere to place the tag. For those, the canonical signal goes in the HTTP response header instead.
Add the following to your .htaccess file, adjusted for your file path:
Header add Link: <https://www.example.com/downloads/filename.pdf>; rel="canonical"
4. XML sitemap
When to use: You want to reinforce other canonicalization signals.
Limitation: Not strong enough to stand alone as your only canonical method.
Submit only canonical URLs in your sitemap. Leave out alternate versions such as parameterized URLs, paginated pages, and HTTP versions if HTTPS is your canonical.
Note: These methods can stack. Using a canonical tag and a sitemap listing together sends a stronger combined signal than either one alone.
Platform setup: WordPress, Shopify, and Wix
Most website platforms handle canonical tags automatically. But “automatic” does not mean problem-free. Here’s what each platform does by default and where you need to step in.
WordPress
Both Yoast SEO and Rank Math add a self-referencing canonical to every page and post automatically. You don’t need to configure anything for standard pages.
To override the canonical on a specific post or page:
Using Yoast SEO:
- Open the post in the WordPress editor.
- Scroll to the Yoast SEO panel.
- Click the Advanced tab.
- Enter your preferred URL in the Canonical URL field.

Using Rank Math:
- Open the post in the WordPress editor.
- Scroll to the Rank Math SEO panel.
- Click the Advanced tab.
- Enter your preferred URL in the Canonical URL field.

Save the post. The new canonical replaces the default self-referencing tag.
Shopify
Shopify automatically adds canonical tags to product pages, collection pages, and blog posts. No setup is required.
However, there is a known duplication problem. Shopify generates two valid URLs for products that appear inside collections:
yourstore.com/products/blue-widgetyourstore.com/collections/widgets/products/blue-widget
Shopify sets the /products/ URL as canonical by default, but this is worth verifying. Check your collection pages by viewing the page source (Ctrl+U or Cmd+U in most browsers) and searching for <link rel=”canonical”. Confirm that the canonical matches your preferred URL pattern and that collection-path URLs are not being indexed separately.
Wix
Wix adds self-referencing canonical tags automatically across all pages. For most sites, no action is needed.
To change the canonical for a specific page, go to your Wix dashboard, open Advanced SEO tab for that page, and update the canonical URL field in the Additional Tags panel.

Canonical tag best practices
A canonical tag only works when it’s implemented correctly and backed up by consistent signals across your site.
Here are some guidelines to follow for the best results:
1. Use absolute URLs, not relative ones
Always write the full URL, including the protocol and domain.
Do this:
<link rel="canonical" href="https://www.webyes.com/blog/" />
Not this:
<link rel="canonical" href="/blog/" />
Relative URLs can resolve differently depending on how a page is served. A relative canonical that works in one environment may break in another.
2. Set a self-referencing canonical on every page
Even pages with no duplicates should have a canonical tag pointing to themselves. This protects against parameter variations and scraped copies that could appear elsewhere on the web.
For example, the WebYes homepage has no duplicate. But someone could share a link as https://webyes.com/?ref=twitter. Without a self-referencing canonical, Google may treat that parameter URL as a separate page and split signals between the two.
With the canonical in place:
<link rel="canonical" href="https://www.webyes.com/" />
Google knows the official version is https://www.webyes.com/ regardless of what parameters are appended.
3. Specify only one canonical URL per page
Multiple canonical tags on the same page create conflicting signals. Google may disregard all of them.
Accidental duplication is common when canonicals set through your CMS overlap with ones added manually. Audit your pages and plugins to confirm only one canonical tag is generated per page.
4. Point to the HTTPS version
If your site runs on HTTPS, your canonical must point to the HTTPS version too.
Do this:
<link rel="canonical" href="https://www.webyes.com/blog/" />
Not this:
<link rel="canonical" href="http://www.webyes.com/blog/" />
A canonical pointing to the HTTP version sends a mixed signal and can split authority across both versions.
5. Be consistent with trailing slashes
Google can treat https://webyes.com/blog and https://webyes.com/blog/ as separate pages. Pick one format and stick to it across your site. Your canonical tag must match whichever format you use.
6. Be consistent with www and non-www
Search engines treat https://www.webyes.com/ and https://webyes.com/ as separate domains. Your canonicals should always reference one or the other consistently. Pick a preferred version and make sure every canonical on your site uses it.
7. Canonicalize paginated pages to themselves
Paginated pages (page 2, page 3, and so on) should self-reference their own URL, not point to page 1. Only point a paginated URL to page 1 if you have a dedicated view-all URL that contains all the content.
How to audit canonical tags on your site
You can audit your canonical tags directly in Google Search Console.
Make it a habit to check them as part of your periodic technical SEO audit. Pages get added, URLs change, and canonical tags can break without you noticing.
Step 1: Check the Page Indexing report
In GSC, go to the Page Indexing report and look for either of these statuses:
- Duplicate without user-selected canonical: Google found duplicate pages but you have not set a canonical tag. Google is making the choice for you.
- Duplicate, Google chose different canonical than user: You have set a canonical tag but Google has ignored it and chosen a different URL.
If you see either of these, you have a canonical problem that needs fixing.

Note: If you see Alternate page with proper canonical tag, that is not a problem. It means Google found your duplicate, saw your canonical tag, and respected it. That is exactly what you want.
Step 2: Inspect the affected URLs
Click into the status to see a list of all affected URLs.
- For URLs under “Duplicate without user-selected canonical”:
You have not set a canonical tag on these pages. Add a canonical tag to each one pointing to the URL you want Google to index. - For URLs under “Duplicate, Google chose different canonical than user”:
You have set a canonical tag, but Google has ignored it. Go through the signals checklist: make sure your internal links, sitemap, and redirects all point to the same preferred URL. If they conflict, Google will keep overriding your tag.
Step 3: Request indexing
Once you have made your fixes, go back to Google Search Console, use the URL Inspection tool, and click Request Indexing on each corrected URL.
This prompts Google to recrawl the page sooner. Keep in mind it can still take a few days to a few weeks for the changes to reflect in the Page Indexing report.
Canonical tags for syndicated content
Cross-domain canonicalization solves a specific problem: your content gets republished on another site, and Google indexes their version instead of yours.
When a media outlet or partner republishes your article in full, add a rel=canonical tag to their page pointing back to your original URL. The format is identical to a same-domain canonical:
<link rel="canonical" href="https://yoursite.com/original-article/" />
That tag goes in the <head> of the republished page, not your own.
If you are the original publisher
Add the canonical to your own page before syndicating. Then ask your partner to include the cross-domain canonical tag pointing to your URL when they publish. Do not assume they will do it automatically.
If you are the syndicator
Set the canonical on your version to point to the original source. If you cannot set a custom canonical, use a noindex meta tag instead to keep your copy out of Google’s index.
Note: Platform canonical behavior can change without warning. Medium currently sets its own canonical automatically for imported posts, pointing to your original URL. LinkedIn does not support custom canonicals on articles, so republishing there carries duplicate content risk you cannot fully resolve with a tag. Verify the current behavior in each platform’s help documentation before syndicating.
FAQs on canonical URLs
What is the difference between a canonical tag and a noindex tag?
A canonical tag tells Google which version of a page is preferred but keeps all versions accessible to users. A noindex tag removes a page from search results entirely. Use a canonical when you want duplicate content consolidated under one URL. Use noindex when you want a page excluded from search altogether, regardless of which version it is.
Can a page have two canonical tags?
No. If a page contains more than one canonical tag, Google will likely ignore both. Each page should have exactly one canonical tag placed in the <head> section, pointing to a single preferred URL. Conflicting canonicals are one of the most common causes of Google selecting a different canonical than the one you intended.
Does a canonical tag pass PageRank?
Yes. A canonical tag consolidates ranking signals, including backlinks, from duplicate or similar pages to the declared canonical URL. This means link equity pointing to non-canonical versions is funneled to the preferred page rather than being split across multiple URLs.
Should every page on a website have a canonical tag?
Yes. Every indexable page should have a self-referencing canonical tag, even pages with no duplicate versions. This makes your intent explicit to Google and prevents the search engine from assigning an arbitrary canonical based on URL variations such as trailing slashes or tracking parameters that may appear in external links.