Canonical tags are a short line of HTML that tells search engines which URL is the main version of a page. When the same or very similar content can be reached at more than one address, the tag points to the one you want indexed and shown in results. It is one of the most useful tools in SEO, and one of the easiest to get wrong without anyone noticing.
This explainer covers what the tag is, how to write it, where it belongs, and the errors we see most often in audits. It forms part of our work in search engine optimization, and sits within the crawling and indexing side of technical SEO. If you are trying to resolve a sitewide duplication problem, the tag is one piece of a wider process that also involves redirects and parameter handling.
What canonical tags are
A canonical tag is a link element with the attribute rel=”canonical”, placed in the head section of a page. It names the preferred URL for that content. Search engines treat it as a strong hint when deciding which version to index and where to consolidate signals such as links.
- It does not redirect visitors. People can still reach the alternate URL.
- It does not remove a page from the index by command. It suggests which version should represent the group.
- It is a hint, not a directive. Google weighs it with other signals and can choose differently.
The tag can also be sent as an HTTP header, which is useful for files such as PDFs that have no HTML head.
The correct syntax
The element itself is simple. In the head of the page, it reads as follows:
<link rel=”canonical” href=”full preferred URL including https and trailing slash”>
Small details decide whether it works.
| Rule | Correct | Avoid |
|---|---|---|
| URL format | Absolute URL with protocol and domain | Relative paths such as /page/ |
| Placement | Inside the head element | Inside the body, where it is ignored |
| Quantity | One canonical per page | Two tags from theme and plugin |
| Target status | A live, indexable page returning 200 | Redirected, 404 or noindex targets |
| Consistency | Matches your protocol, host and slash rule | Mixing www and non-www |
Self-referencing canonical tags
A self-referencing canonical points to the page’s own URL. It looks redundant, but it is a sensible default on every indexable page.
- It protects against tracking parameters. When someone shares a link with a campaign tag, the canonical still names the clean URL.
- It removes guesswork about protocol, www and trailing slash variants that slip past redirects.
- It defends against scrapers that copy your HTML wholesale, as the copied page may still point back to you.
Most SEO plugins for WordPress, including Yoast SEO, add self-referencing canonicals automatically. Check that the theme is not adding a second one.
Common use cases
Beyond self-reference, the tag is used whenever a variant must stay available to visitors but should not compete in search.
Parameters and filters
Sorted or filtered views of a category usually point their canonical to the unfiltered category, unless a specific filter has been built into a page worth ranking on its own.
Products in several categories
If a product appears under more than one path, choose one primary URL and point the others to it. Better still, configure the store so each product has a single URL regardless of the category it is reached from.
Cross-domain canonicals
When the same article is published on a partner site or a second domain you own, the copy can carry a canonical pointing to the original. Google treats cross-domain canonicals as a hint too, so it is worth confirming that the partner has actually added the tag.
Language versions
Arabic and English pages are not duplicates of each other. Each should carry a self-referencing canonical and link to the other with hreflang. Pointing the Arabic canonical at the English page asks Google to drop the Arabic page from results, which is a costly mistake for UAE businesses targeting both audiences.
Common canonical tag errors
These are the problems we find most often, usually introduced by a theme change, a plugin conflict or a migration.
| Error | Symptom | Fix |
|---|---|---|
| Every page canonicalized to the home page | Inner pages disappear from results | Restore self-referencing canonicals |
| Paginated pages pointing to page one | Items on later pages not discovered | Let each page reference itself |
| Canonical to a redirected URL | Google ignores the hint | Point to the final destination |
| Canonical plus noindex on one page | Conflicting signals | Use one or the other |
| Staging domain in canonicals after launch | Live pages point to staging | Update site URL settings and recheck |
| Canonical added by JavaScript only | Inconsistent pickup | Output it in the server HTML |
How to check canonical tags
- View the page source and search for rel=”canonical” to confirm there is exactly one, in the head, with an absolute URL.
- Use URL Inspection in Google Search Console to compare the user-declared canonical with the Google-selected canonical.
- Run a site crawl to list every page whose canonical points elsewhere, then review each group.
- Check the Page indexing report for “Duplicate, Google chose different canonical than user” and investigate those URLs first.
- Recheck after theme updates, plugin changes and migrations.
On WordPress sites, most canonical problems trace back to one setting: the site address in General Settings, the SEO plugin configuration, or a page builder that outputs its own head elements. Keep a short note of which component is responsible for the tag, so anyone who changes the theme or adds a plugin knows to confirm it still appears exactly once. A quick check on five or six key templates after every update catches nearly all regressions before Google does.
Frequently asked questions
Are canonical tags a ranking factor?
Not directly. The tag helps Google decide which version of a page to index and where to consolidate signals such as links. That consolidation can help the preferred page perform better, because its strength is no longer split across several URLs. The tag itself does not add ranking value to a page.
Should every page have a canonical tag?
Every indexable page benefits from a self-referencing canonical. It costs nothing, protects against parameter and protocol variants, and removes ambiguity. Pages that are variants of another page should point to that main version instead. Pages set to noindex do not need one.
What is the difference between a canonical tag and a 301 redirect?
A 301 redirect sends both visitors and search engines to a new URL, so the old address effectively disappears. A canonical leaves the page accessible to visitors and only suggests to search engines which version to index. Use a redirect when the duplicate has no purpose for visitors, and a canonical when it does.
Why does Google choose a different canonical than mine?
Google treats the tag as one signal among several. If internal links, the sitemap, redirects or hreflang point to another URL, or if the pages differ more than the tag suggests, Google may override your choice. Align those signals with your preferred URL and make sure the target is indexable and returns a 200 status.
Clear signals, cleaner indexing
Used correctly, this small element keeps your preferred URLs in search results and concentrates ranking signals where they belong. The essentials are simple: one absolute canonical per page, in the head, pointing to a live indexable URL, with self-reference as the default and language versions kept separate.
If you would like us to check how canonicals are set up across your site, we would be happy to review them with you.