On this page
What this issue is
A canonical tag tells search engines which URL is the main version of a page when several URLs show the same content. It looks like <link rel="canonical" href="https://example.com/page/">. Two things can go wrong.
Canonical in the body. Google's documentation says the tag must be in the <head>. A tag that ends up in the <body> is not valid there and is ignored. This often happens when a script, widget or page builder injects markup, or when the head closes early because of broken HTML.
Multiple canonicals. Two or more canonical tags on one page, for example one from your theme and one from an SEO plugin. If they point to the same URL, Google can usually cope. If they differ, Google treats the signals as conflicting and may ignore all of them.
Why it costs you leads or sales
When Google ignores your canonical, it chooses the main URL itself. That can be a parameter URL, a duplicate path or an old version of the page. Ranking signals such as links get split across copies, and the wrong URL may show in results. Visitors then land on a version with different tracking, a worse layout or a missing form. The business impact is usually medium: it rarely removes a page overnight, but it quietly weakens the pages that bring in leads.
- Page loadsTwo canonicals, or one in the body
- Google reads canonicalSignals conflict or tag is invalid
- Google picks its own URLMay be a duplicate or parameter URL
- Ranking signals splitLinks spread across copies
- Wrong URL gets the visitLead form and tracking may differ
The break happens at the signal step, so every later step works from the wrong URL.
How to check if your site has it
Check the raw HTML, not just what the browser shows after scripts run. Use View Source, not Inspect, to see what Google first receives.
Open view-source
In Chrome, open the page and press Ctrl+U (Cmd+Option+U on Mac), or type view-source: before the URL.
Search for canonical
Press Ctrl+F and search for
rel="canonical". Count the matches.Check the position
Make sure each match sits above the closing
</head>tag. A match below<body>is in the wrong place.Compare the URLs
If there are two or more, note whether the href values are identical.
Confirm in Search Console
Use URL Inspection on the page and compare the user-declared canonical with the Google-selected canonical.
curl -s https://example.com/your-page/ | grep -io '<link[^>]*rel=["'\'']canonical["'\''][^>]*>'One line of output means one tag. Two or more lines mean duplicates. To check position, look at the raw HTML around the match. For a whole site, a crawler such as Screaming Frog can report pages with multiple canonicals and canonicals found outside the head.
How to fix it
The goal is one source of truth for the canonical. Find every tool that can output one (theme, SEO plugin, page builder, tag manager script, custom code) and leave only one active.
Find the sources
Check which SEO plugin is active (Yoast, Rank Math, All in One SEO). Only one should be. Deactivate the others.
Check the theme
Search your theme's header.php and functions.php for
rel="canonical". Remove a hard-coded tag if your SEO plugin already outputs one.Remove the default WordPress tag if needed
WordPress adds its own canonical through
rel_canonical. If a custom setup duplicates it, remove it withremove_action('wp_head', 'rel_canonical');in a child theme or small plugin, only when something else outputs the tag.
Check theme.liquid
Go to Online Store > Themes > Edit code and open layout/theme.liquid. Shopify themes normally include
<link rel="canonical" href="{{ canonical_url }}">once.Remove duplicates
Search all files for
canonical. Delete extra tags added by old apps or manual edits, and keep the one inside<head>.Check SEO apps
If an SEO app injects its own canonical, disable that option in the app or remove the theme line, not both.
Look for custom HTML tags
In Tags, search for tags that create a link element or contain
canonical.Pause or delete the tag
A script that appends a canonical to the page adds a second tag, and one added after load often lands outside the intended place. Remove it if the site already outputs a canonical in the HTML.
Publish and retest
Use Preview mode, then publish the container and re-check the raw source.
Check page settings
Open Pages, then the page's settings, and look at Custom code in the Head. Remove any hand-written canonical there if you also set one in the SEO settings or site-wide.
Check project settings
In Site settings > Custom code, make sure there is no global canonical tag, because it would repeat on every page.
Check embeds
An Embed element places code in the body. Remove any canonical tag from embeds.
Use the built-in setting
Wix adds canonicals automatically. Manage them under SEO settings for the page rather than adding your own.
Remove custom code
In Settings > Custom code, delete any snippet containing a canonical link.
Leave the automatic tag alone
Squarespace outputs a canonical for you. Do not add another.
Check code injection
Open Settings > Advanced > Code Injection and page-level Advanced settings. Delete any canonical tag you added there.
Use one template location
Put a single canonical in the shared head partial or layout so every page uses it.
Search the codebase
Search for
canonicalin templates, components and server code. Remove tags in body templates and any second source.Fix broken head markup
An unclosed or invalid element in the head, such as a stray
<div>or<img>, makes the browser close the head early. Fix it so the tag stays inside.
<head>
<meta charset="utf-8">
<title>Your page title</title>
<link rel="canonical" href="https://example.com/your-page/">
</head>Broken
- Theme outputs a canonical to /page/
- SEO plugin outputs another to /page/?ref=ad
- A widget adds a third tag in the body
- Google ignores them and picks its own URL
Fixed
- One source outputs the canonical
- Single tag sits inside the head
- It points to the clean, final https URL
- Google's chosen canonical matches yours
How to confirm it's fixed
- View source shows exactly one canonical tag on the page
- The tag is above
</head> - The href is an absolute https URL that returns 200 and is the version you want indexed
- Test a home page, a landing page, a blog post and a product or category page
- Run URL Inspection in Search Console and request indexing for key pages
- Re-crawl the site and confirm no pages report multiple canonicals
- After a few weeks, check that Google-selected canonical matches the declared one
How to prevent it happening again
- Pick one owner for canonicals: theme, plugin or custom code, never several
- Test after installing or updating an SEO plugin, theme, page builder or app
- Keep canonical tags out of tag manager scripts and embeds
- Validate your HTML so the head does not close early
- Run a scheduled crawl and review the multiple canonicals and outside-head reports
- Add a canonical check to your release checklist for template changes
How FunnelGuard handles this
FunnelGuard does not check this yet. Looking for duplicate or misplaced canonical tags is a possible future check, not a current feature.
What FunnelGuard does today is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons. It checks each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a canonical problem sends visitors to a duplicate URL where a form or tag is broken, a journey check can show that failure, but it will not point to the canonical as the cause.
To watch for this issue yourself, run a crawler such as Screaming Frog on a schedule, review the Page indexing and URL Inspection reports in Google Search Console, and re-check the raw source after every theme or plugin change. FunnelGuard also offers a free read-only website audit, and a Free plan with 1 site and 2 journeys.
Questions people ask
Can a page have two canonical tags?
It can, but it should not. If both point to the same URL, Google can usually cope. If they point to different URLs, Google sees conflicting signals and may ignore both and choose a canonical itself.
Does a canonical tag have to be in the head?
Yes. Google's documentation says rel=canonical must be in the head of the HTML. A canonical placed in the body is invalid there and will be ignored.
Why does my page have multiple canonical tags?
Usually two sources are both active, such as a theme and an SEO plugin, or a plugin and a hard-coded tag. Page builders, apps and tag manager scripts can add another. Find each source and keep one.
How do I find multiple canonical tags on my site?
View the page source and search for rel="canonical", or use curl and grep to count matches. For a whole site, crawl it with a tool such as Screaming Frog and check the reports for multiple canonicals or tags outside the head.
Why is my canonical tag in the body instead of the head?
A script or widget may be injecting it, or invalid markup in the head may make the browser close the head early. Everything after that point, including your canonical, ends up in the body. Fix the markup and the injection source.
Will Google ignore my canonical if there are two?
Google treats a canonical as a hint, and conflicting tags weaken it. With two different URLs, it may ignore both and select its own. Leaving a single tag removes that risk.
How do I remove the duplicate canonical tag in WordPress?
Make sure only one SEO plugin is active, then check header.php and functions.php for a hard-coded tag. If needed, remove the default one with remove_action('wp_head', 'rel_canonical') only when another source outputs it.
Does FunnelGuard detect duplicate canonical tags?
No. FunnelGuard does not check canonical tags yet, though it is a possible future check. It monitors funnels, tracking hits and lead delivery, so use a crawler and Search Console for canonicals.
Related issues
- SEO-042Missing rel=canonical on indexable pagesFix guide
- SEO-048Canonical set by JavaScript differs from the raw HTML canonicalFix guide
- SEO-052Google chose a different canonical than declaredFix guide
- SEO-051Canonical chains (A -> B -> C)Fix guide
- SEO-043Canonical points to a 404, redirect or noindex URLFix guide
- SEO-050Cross-domain canonical to a partner or old domain by mistakeFix guide