Skip to main content

Canonical Tags Explained: Avoiding Duplicate Content Issues

Technical SEOJune 1, 2026 7 min read

The rel=canonical tag tells search engines which version of a page to index. This guide explains when and how to use it correctly.

What Is a Canonical Tag?

The canonical tag (<link rel="canonical" href="...">) tells search engines which version of a page is the "master" copy when multiple URLs serve similar or identical content.

Common Duplicate Content Scenarios

  • HTTP vs HTTPS — both may be accessible
  • www vs non-www — choose one
  • Trailing slashes — /page vs /page/
  • URL parameters — /products?sort=price vs /products
  • Print versions — /page?print=true

Implementation

Add to the <head> of every page:

<link rel="canonical" href="https://yourdomain.com/the-canonical-url" />

In Next.js App Router:

export const metadata = {
  alternates: { canonical: 'https://yourdomain.com/your-page' }
};

Self-referencing Canonicals

Even pages with no duplicates should have a self-referencing canonical. This prevents third-party content scrapers from outranking you with copied content.

Canonical vs. Redirect

If content has moved permanently, use a 301 redirect rather than a canonical. Canonicals are hints that Google may choose to ignore. 301 redirects are directives that Google always follows. After fixing canonicals, resubmit priority URLs with our index pages faster workflow.

Ready to index your pages faster?

Start submitting URLs directly to Google, Bing, and Yandex. 7-day Pro trial, no credit card needed.

Start for free
CanonicalDuplicate ContentTechnical SEO