Skip to content
SEO-Wars

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.

ResultPoints
Absolute URL (https://...)3
Relative or other value1
No canonical tag0

How to fix it

  1. Add a self-referencing canonical with the full https URL on every indexable page.
  2. Point filtered, sorted and tracking-parameter variants at the clean URL.
  3. In Next.js, set metadataBase once so relative canonicals are output as absolute URLs.

Copy-paste fixes

HTML
<link rel="canonical" href="https://www.example.com/shoes/trail-runner-2">
Shopifylayout/theme.liquid
<link rel="canonical" href="{{ canonical_url }}">
Next.jsapp/layout.tsx
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.

Start a duel
← All checksUpdated December 1, 2026
Canonical: why it matters and how to fix it · SEO-Wars