Skip to main content

Canonical URL.

SEO SEO Fundamentals

Prevents duplicate content penalties — tells Google which version of a page is authoritative

What does this check test?

This check verifies that every page has a valid `<link rel="canonical">` tag pointing to the preferred version of that URL. The canonical URL should be an absolute URL (including protocol and domain), should point to a page that returns HTTP 200, should not redirect, and should match the actual URL when the page is the canonical version of itself (self-referencing canonical). Pages accessible via multiple URLs (with/without trailing slash, with/without www, with query parameters) must all point their canonical to a single preferred version.

Why does it matter?

Most websites have multiple URLs that serve the same or very similar content: `https://example.com/page`, `https://example.com/page/`, `https://example.com/page?ref=twitter`, `https://www.example.com/page`. Without canonical tags, Google must guess which version to index and may split ranking signals across all variants, weakening each one. Worse, Google may choose the wrong version — indexing the URL with tracking parameters instead of the clean URL. Canonical tags consolidate all ranking signals (backlinks, engagement metrics) to a single authoritative URL, maximizing its ranking potential. Missing canonicals are one of the most common technical SEO issues at scale.

Who is affected?

Front-end developers setting up page templates, CMS developers generating canonical tags from content slugs, SEO specialists auditing for duplicate content issues, and DevOps engineers managing URL structures (www vs non-www, trailing slashes, HTTP vs HTTPS).

Where does this apply?

Every page on the site needs a self-referencing canonical at minimum. Pages with particular duplicate content risk include: paginated content (page 2, page 3), filtered/sorted product listings, pages with UTM or tracking parameters, AMP versions, print-friendly versions, mobile-specific URLs, and pages accessible via multiple URL paths (category + tag intersections).

How to fix it

Always use absolute URLs with the canonical protocol and domain. Self-reference the page if it is the canonical version. For paginated content, each page should canonicalize to itself (page 2 is canonical to page 2, not page 1). Never point a canonical to a 404 or redirect. Strip tracking parameters from canonical URLs. HTML canonical tag:
html
<head>
  <!-- Always absolute URL, including protocol and domain -->
  <link rel="canonical" href="https://example.com/pricing">
</head>
Next.js App Router canonical metadata:
ts
// app/pricing/page.tsx — static canonical
export const metadata = {
  alternates: { canonical: 'https://example.com/pricing' },
};

// app/blog/[slug]/page.tsx — dynamic canonical
export function generateMetadata({ params }) {
  return {
    alternates: {
      canonical: \`https://example.com/blog/\${params.slug}\`,
    },
  };
}
Lighthouse and SEO crawlers flag missing canonicals and canonical/URL mismatches.

References

AppVet checks Canonical URL automatically

Run a free seo scan and get a full report with actionable fixes, including a Fix with AI prompt you can paste into any coding tool.

Run Audit