What does a canonical do?
A rel=canonical annotation suggests which URL should represent a group of equivalent pages. It is a signal, not a command: Google can select a different canonical. It neither redirects visitors nor protects content from access.
Avoid competing URL signals
Tracking links, alternate paths and duplicate templates can expose the same content at several addresses. Agreeing on one destination makes your publishing decisions clearer. Missing a self-reference is not automatically an indexing failure, and a cross-domain destination may be intentional.
Choose a representative page
Write down the source URL, its final URL after redirects and the proposed canonical. Open both pages. Are they substantially the same content, and should the target represent this page in search? Do not canonicalize a distinct article or category to the home page simply to eliminate a warning.
Use a redirect when users should permanently move to the replacement URL. Keep a canonical when equivalent URLs still need to remain accessible. Coordinate any cross-domain choice with the owner of that destination.
1. Output one consistent canonical
Inspect the HTML head and HTTP Link headers. Remove conflicting output from templates or extensions; choose one authoritative implementation. Use an absolute URL with the intended HTTPS origin. A canonical placed outside the head can be ineffective.
2. Review URL details, not just strings
Remove tracking parameters and fragments from the chosen representative URL. Do not strip parameters that identify genuinely different content. Test path case and trailing-slash variants before normalizing: a server may redirect them, serve different content or return an error.
A canonical differing from the originally requested address may be correct after a redirect. Compare it with the final page and your intended URL policy, not just the input string.
3. Verify the target and supporting links
Check that the target is reachable, represents the same content and is intended to be indexed. Avoid chains, loops and targets marked noindex. Point internal links and sitemap entries to the preferred URL instead of sending contradictory signals.
4. Validate a small sample after release
Test a clean URL, a tracking URL and any alternate path affected by the change. Inspect the live output and redirects. In Search Console, compare the user-declared and Google-selected canonical after processing. A single-page audit cannot confirm all remote target conditions or Google's selection.
Example: tracking URL, clean destination
If the only difference is campaign tracking, both the clean and campaign versions can identify this same representative page.
<link rel="canonical" href="https://example.com/bicycle-repair">Next.js App Router
Set alternates.canonical in the page's metadata. Generate it from a trusted site origin and the intended content path; do not use an unvalidated request Host header. Check for inherited layout values on dynamic pages.
export const metadata = {
alternates: { canonical: "https://example.com/bicycle-repair" },
};Related SEOTera checks
These checks cover signals within this topic. An observation or warning needs context; it does not always mean a change is required.
- Canonical link
canonical-presence - Canonical link count
canonical-count - Canonical link validity
canonical-valid - Canonical domain
canonical-domain - Canonical self-reference
canonical-self-reference - Insecure canonical on HTTPS
canonical-http-on-https - Canonical URL fragment
canonical-fragment - Canonical tracking parameters
canonical-tracking-parameters - Canonical trailing-slash consistency
canonical-trailing-slash - Canonical path case consistency
canonical-case-mismatch - Canonical target consistency
canonical-target-mismatch - Redirect and canonical consistency
canonical-requested-url-consistency
Sources and further reading
Related guides
Check your page with SEOTera
Run a single-page audit, then use the findings and these guides to decide what to address.
Check your page with SEOTera