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.
When a canonical is missing
Site Audit groups analyzed indexable pages without a canonical declaration. A self-reference can clarify your preferred URL when variants exist, but absence alone does not prove an indexing problem. Review the page template and URL policy first.
Target returns an error
Site Audit observed a canonical target returning 4xx or 5xx. Open the source and target, fix the target if it should exist, or point to a healthy equivalent URL. Recheck the final response.
Target redirects
Site Audit observed a redirect at the declared target. Inspect the final URL and content. If it is the intended equivalent representative, reference that final URL directly.
Target is noindex
Site Audit observed noindex on a canonical target. Inspect the source, target and indexing intent. A target meant to represent an indexable page should normally be indexable; change the canonical or noindex only when the new setting matches your policy.
Target outside this crawl
A canonical outside this Site Audit’s configured scope could not be fully validated in the run. A cross-domain canonical can be deliberate. Open and verify the external target separately, including its content and indexability.
Decide from the observed target state
2xx and indexable: confirm equivalent content and intended preference. Redirect: consider the final destination. Error: repair or replace the target. Noindex: reconcile the target’s indexing intent. Outside crawl scope: validate separately. These are observed states, not a guarantee that Google will select your canonical.
| Observed target | What to inspect |
|---|---|
| 2xx and indexable | Confirm equivalent content and your preferred URL. |
| Redirect | Check the final destination; reference it directly when appropriate. |
| 4xx or 5xx error | Repair the target or select a working equivalent. |
| Noindex | Reconcile the target’s indexability with your canonical choice. |
| Outside crawl scope | Verify the target separately; cross-domain is not inherently wrong. |
Check a malformed canonical URL
Page Audit can flag a canonical href that is empty, malformed or not a usable HTTP(S) URL. Inspect the final HTML head, correct the href to the intended absolute URL, and confirm it resolves after any template changes.
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 - 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
- Robots.txt and noindex: control crawling and indexing safely
- Hreflang: connect the right language and regional pages
- XML sitemap errors: repair URLs that should be indexed
- Redirect loops and chains: find the final URL
- HTTPS and mixed content: fix insecure page references
- Exact duplicate pages: decide what to consolidate
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 SEOTeraFind sitewide issues with Site Audit