Skip to main content
SlapMyWeb
Fix Guide

How to Add a Canonical Tag

Name the preferred URL so duplicate addresses do not split your ranking signals.

Easy High Impact 30 min

A missing canonical tag leaves search engines to choose which of several addresses for the same content to index. Any page reachable with tracking parameters, with and without a trailing slash, or on both www and apex has duplicates — and without a canonical, ranking signals split across them instead of accumulating on one.

Why It Matters

Around 40% of audited sites have no canonical tag. It is the cheapest fix available for a problem that quietly divides a page's authority between addresses nobody meant to create.

How to Fix

1

Decide the preferred URL

Pick one form and be consistent: https, one host, one trailing-slash convention, no tracking parameters.
2

Add the tag to every page

Each page should declare its own canonical — pointing at itself where it is the preferred version. Self-referential canonicals are correct, not redundant.
3

Use absolute URLs

A relative canonical is legal but easy to get wrong. Absolute removes the ambiguity.
4

Keep it consistent with everything else

The canonical, the internal links, the sitemap entry and any redirects must all agree. Contradictions are treated as a weak hint and ignored.

Code Fix

html
Before (broken)
<!-- /page, /page/, /page?utm_source=x all indexable as separate URLs -->
After (fixed)
<link rel="canonical" href="https://example.com/page">

Platform-Specific Instructions

WordPress

SEO plugins add self-referential canonicals automatically. The usual problem is a manual override left on a page after a migration.

Next.js

Set alternates.canonical per page in the metadata export; it is not generated for you.

Fixed that one.
Now find the rest.

A free audit ranks every issue on your site by the score points it costs — and links each one straight to its guide.

Run a free audit
Free foreverNo signupResults in 30s