On-page
Canonical tag: tell search engines which URL is the original
A canonical tag names the preferred URL of a page so duplicates don't compete. An absolute canonical URL earns full points; a relative one earns partial points.
- Category
- On-page
- Points available
- 3 pts
- Effort
- Quick fix
Why it matters
The same page is often reachable at many URLs: with tracking parameters, with and without a trailing slash, sorted or filtered. The canonical tag tells search engines which one to index and where to consolidate link value.
Without it, search engines guess, and may show the wrong URL or split ranking signals across copies.
How we measure it
We look for <link rel="canonical"> and read its href. A full URL starting with http:// or https:// earns full points. A relative path (like /page) earns partial points, because it is easy to get wrong.
We do not check whether the canonical points to the right page, so verify that yourself.
| Result | Points |
|---|---|
| Absolute URL (https://...) | 3 |
| Relative or other value | 1 |
| No canonical tag | 0 |
How to fix it
- Add a self-referencing canonical with the full https URL on every indexable page.
- Point filtered, sorted and tracking-parameter variants at the clean URL.
- In Next.js, set
metadataBaseonce so relative canonicals are output as absolute URLs.
Copy-paste fixes
<link rel="canonical" href="https://www.example.com/shoes/trail-runner-2"><link rel="canonical" href="{{ canonical_url }}">import type { Metadata } from "next";
export const metadata: Metadata = {
// metadataBase turns relative canonicals into absolute URLs.
metadataBase: new URL("https://www.example.com"),
alternates: { canonical: "/" },
};
// In a page: export const metadata = { alternates: { canonical: "/shoes/trail-runner-2" } };Common mistakes
- Every page canonicalising to the home page, which can drop all inner pages from the index.
- A canonical that points to a URL that redirects or returns 404.
- Canonical on http:// while the site runs on https://.
Test your site now
Put your site against a competitor and see how many of these points you earn, and which fixes pay off first.