How to add a canonical tag to your website
A canonical tag is one line in the head of a page that tells search engines which web address is the main version. To add one, put a link rel="canonical" tag with the full page address in each page's head, usually through your platform's SEO setting or plugin.
Search engines often find the same page under more than one address. When your pages have no canonical tag, Google has to guess which address to show, and it can guess wrong. Adding the tag is usually a small job, and on most platforms it is a setting or a plugin rather than code.
What a canonical tag is, and what you notice without it
A canonical tag sits in the <head> of a page, which visitors never see. It looks like this:
<link rel="canonical" href="https://www.example.com/blue-widgets/">
It says: "if this content exists at several addresses, this is the one to count." Search engines treat it as a strong hint, not a command.
You rarely see the problem on the page itself. You notice its effects instead:
- The same product or article shows up in Google under a version with tracking parameters, such as
?utm_source=newsletter. - A page you did not expect appears in results, like a filtered or sorted list.
- Google Search Console reports pages as duplicates, for example "Duplicate without user-selected canonical".
- Rankings for a page seem weaker than the content deserves.
Why it matters
The same page can be reachable at many addresses without you doing anything: with and without www, with http and https, with or without a trailing slash, with tracking parameters, or through sort and filter options in a shop. To a search engine these are different URLs.
When the copies compete, links and signals get split between them, Google may pick an address you would not have chosen, and it may spend time crawling copies instead of your new pages. For a business this means the wrong page shown to customers, or a good page held back. It is not a penalty, just lost clarity. If the duplicates come from www versus non-www, also read www and non-www duplicates, because that needs a redirect as well.
How to check whether your site has the problem
There are free ways to check, and none need technical skills.
- Open a page on your site, right-click and choose "View page source" (or press Ctrl+U, or Cmd+Option+U on a Mac).
- Press Ctrl+F (Cmd+F on a Mac) and search for
canonical. - If you find a
link rel="canonical"line with a full address inside<head>, the page has one. If nothing comes up, it is missing. - Repeat for a few different page types: home page, a service or product page, a blog post, a category page.
For a wider view, use the URL Inspection tool in Google Search Console. It shows the "User-declared canonical" (what your page says) next to the "Google-selected canonical" (what Google chose). If the first is empty or the two differ, look closer. A free crawler such as Screaming Frog (its free version crawls up to 500 URLs) can list canonical tags for every page at once.
The SiteMonday week 1 SEO review also checks this and lists affected pages in a ranked fix list.
How to fix it in general
The rule is simple: every page you want in search should have exactly one canonical tag, placed in the <head>, pointing to the full address (including https://) of the preferred version of that page.
- For a normal page, point the tag at the page's own address. This is called a self-referencing canonical and is good practice.
- For duplicates (a tracking-parameter version, a printable version), point the tag at the main page.
- Use one address style everywhere: same
https, samewwwchoice, same trailing slash habit. - Do not point a canonical at a page that redirects, returns an error, or is set to noindex. That sends mixed signals. See accidental noindex tags if you suspect that one.
- Use only one canonical tag per page. If a plugin and your theme both add one, search engines may ignore both.
Fixing it on common platforms
Menu names change between versions and themes, so treat these as pointers to where to look.
WordPress. WordPress adds a canonical tag to posts and pages by default, so a missing one often means a theme or plugin removed it. SEO plugins such as Yoast SEO, Rank Math and All in One SEO manage canonicals and let you override one per page, usually in a panel below the editor under advanced settings. Details are in the WordPress guide.
Shopify. Most themes output the tag through a line in theme.liquid that uses {{ canonical_url }}. If it is missing, a developer can add it inside <head>. See the Shopify guide.
Wix. Wix usually adds canonical tags automatically. Look in the page's SEO settings (often under advanced SEO) to see or change it.
Webflow. Look in the page settings for SEO options. If there is no canonical field in your version, you can add the tag in the page's custom code for the head.
Next.js. In the App Router, set alternates: { canonical: '/your-page' } in the page's metadata, and define metadataBase so the address becomes absolute.
React (single page apps). The tag must be in the head for every route. A library such as React Helmet can set it per page. If the page is built only in the browser, search engines may see it late, so server rendering is safer.
Magento. Under Stores, Configuration, Catalog, Catalog, Search Engine Optimization, there are settings to use canonical link meta tags for categories and products.
For anything custom, the fix is the line from the example above, added to the head of each page template with the right address filled in.
How to confirm the fix worked
- Open your page source again and search for
canonical. Check there is exactly one tag and that the address is correct and complete. - In Google Search Console, run URL Inspection on a few important pages and choose "Test live URL" to see the tag as Google sees it now.
- Wait a few weeks. Google needs to recrawl pages before the duplicate reports shrink, so do not expect changes overnight.
- Watch the Page indexing report. Duplicate warnings should fall, and the right addresses should appear in results.
How to stop it coming back
- Re-check canonicals after you change themes, install or remove an SEO plugin, or migrate to a new platform. These are the usual moments a tag disappears.
- Keep one preferred address style and redirect the others to it. Tidy redirect chains at the same time if you find them.
- Make sure your sitemap lists only the canonical addresses you want indexed.
- Add a quick page source check to your launch routine for new page types, such as a new shop template.
Finding the problem and explaining it is the easy part. Making the change is up to you or your developer.
Step by step for your platform
- Missing canonical tags on WordPress
- Missing canonical tags on Shopify
- Missing canonical tags on Wix
- Missing canonical tags on Webflow
- Missing canonical tags on Next.js
- Missing canonical tags on React
- Missing canonical tags on Magento
Questions
Do I need a canonical tag on every page?
It is good practice, yes. A self-referencing canonical on each indexable page protects you from duplicates created by parameters and other address variations.
Is a canonical tag the same as a redirect?
No. A redirect sends visitors and search engines to another address, while a canonical tag only tells search engines which version to prefer. Visitors stay on the page they opened.
Will Google always follow my canonical tag?
Not always. It is a strong hint, and Google may choose a different address if other signals, such as redirects, internal links or the sitemap, disagree with it.
Should the canonical use a full address or a relative one?
Use the full address, including `https://` and your domain. Relative paths are allowed by the standard but are easier to get wrong.
Can I add a canonical tag without a developer?
Often yes. WordPress SEO plugins, Wix and Webflow provide settings for it, and Shopify themes usually include it already. Custom sites need a template edit.
How long until I see results after adding canonical tags?
It depends on how often Google recrawls your site. Expect a few weeks for the duplicate reports in Search Console to update.