<link rel="canonical" href="..."> looks like the simplest tag in your <head>. Then someone asks "should paginated pages be canonical to page one?" or "why is Google ignoring our canonical?" and the simplicity disappears.
Here are ten questions developers ask about canonical tags, with direct answers. Where search engines' behaviour is involved, I'm describing how they document it; check the current official documentation for anything you plan to rely on.
1. What does a canonical tag actually do?
It tells search engines which URL you consider the main version of a page when several URLs show the same or very similar content. For example:
https://example.com/shoes/red-trainers
https://example.com/shoes/red-trainers?utm_source=newsletter
https://example.com/shoes/red-trainers?sort=price
All three show the same product. A canonical tag on each, pointing to the first, says "please treat this one as the real page." Signals like links are then consolidated on that URL, and it's the one more likely to be shown in results.
2. Is it a directive or a hint?
A hint, and this surprises people. Google, for instance, documents canonical tags as one strong signal among several. It also looks at redirects, internal links, sitemaps and whether the pages really are duplicates. If your signals disagree, it may choose a different canonical than you asked for.
That's why "Google ignored our canonical" usually means "our other signals pointed somewhere else."
3. Should every page have a self-referencing canonical?
It's a widely recommended default, and I'd do it. A page pointing its canonical at itself protects against tracking parameters, session IDs and other variants creating duplicates you didn't expect. It costs one line.
Just make sure it's the clean URL, not whatever URL the request came in on. A self-canonical built from the current request URL, parameters included, defeats the purpose.
4. Absolute or relative URLs?
Use absolute URLs, including the protocol and domain:
<link rel="canonical" href="https://example.com/shoes/red-trainers">
Relative URLs are technically allowed but invite mistakes, especially when a staging site, a CDN hostname or a scraped copy serves your HTML.
5. Should page 2 of a list be canonical to page 1?
Generally no. Page 2 of a category shows different products from page 1, so it isn't a duplicate. Pointing it at page 1 asks search engines to ignore the products only listed on later pages. Give each paginated page a self-referencing canonical, and make sure the pages link to each other with normal links.
6. Can I use a canonical across different domains?
Yes. Cross-domain canonicals are supported. A common use is syndication: if your article is republished on another site, the copy can carry a canonical pointing back to your original. Whether the other site agrees to add it is a separate conversation.
Many blogging platforms, including dev.to, let you set a canonical URL when you cross-post, for exactly this reason.
7. What's the difference between a canonical and a 301 redirect?
A 301 redirect moves users and crawlers to another URL. The old URL effectively stops being a page.
A canonical leaves both URLs working for users and asks search engines to prefer one.
If a URL shouldn't exist any more, redirect it. If it needs to keep working, such as a filtered view or a tracking-parameter version, use a canonical.
8. Can I canonical and noindex the same page?
You can, but you're sending mixed signals: "this page is a duplicate of that one" and "don't index this page". Google has advised against combining them. Pick the one that reflects what you mean. For a duplicate, use a canonical. For a page that shouldn't be in search at all, use noindex.
9. How do I check what canonical a page really has?
View the rendered HTML, not just your template. Common surprises:
- Two canonical tags on one page, one from the theme and one from a plugin. Search engines may ignore both.
- A canonical injected by JavaScript that differs from the one in the initial HTML.
- A canonical in an HTTP header (
Link: <...>; rel="canonical") that contradicts the HTML.
A quick check from the command line:
curl -s https://example.com/shoes/red-trainers | grep -io '<link[^>]*rel="canonical"[^>]*>'
curl -sI https://example.com/shoes/red-trainers | grep -i '^link:'
Then, in Google Search Console's URL Inspection tool, compare the "user-declared canonical" with the "Google-selected canonical".
10. What are the canonical mistakes that cause real damage?
The ones I'd test for:
- Every page canonical to the homepage. Usually a template bug. It asks search engines to drop the rest of your site.
- Staging or development URLs in canonicals. Often from building the tag with an environment variable that's wrong in production.
- Canonicals pointing at redirects or 404s. The target should be a live page that returns 200.
-
HTTP canonicals on an HTTPS site, or the wrong
wwwvariant. - Canonicals to pages blocked by robots.txt. Search engines can't confirm a page they can't crawl.
Catch it before it ships
Canonical bugs are usually template bugs, so they affect thousands of pages at once. A small test in CI that fetches a handful of representative pages and checks for exactly one absolute canonical, pointing to the expected URL, catches most of the list above:
const html = await (await fetch(url)).text();
const tags = html.match(/<link[^>]*rel=["']canonical["'][^>]*>/gi) || [];
if (tags.length !== 1) throw new Error(`${url}: expected 1 canonical, found ${tags.length}`);
Checks like this, kept running on your real pages, are what we build at seotto.com.
Related reading
- There is no duplicate content penalty (but duplicate content still costs you)
- Pagination SEO in 2026: rel=next is dead, and these 5 checks matter instead
- Quick tip: a tiny script that prints the title, canonical and robots tags of any URL (so you stop opening view-source)
- What I'd do differently with SEO on a developer documentation site (versions, search and all)
What's the strangest canonical tag you've found in production, and how long had it been there?
Top comments (0)