0Pricing
HTML Academy · Lesson

Canonical URLs and robots meta

Control crawling and avoid duplicate content with meta tags.

Duplicate Content Problem

Search engines may encounter your page at multiple URLs:

  • http://example.com/page
  • https://example.com/page
  • https://www.example.com/page
  • https://example.com/page/ (trailing slash)
  • https://example.com/page?utm_source=newsletter

Google must decide which URL to index — and may penalize for duplicate content.

The canonical Link Tag

Tell search engines the preferred URL with rel="canonical":

<head>
  <!-- This is the canonical URL for this content: -->
  <link rel="canonical" href="https://example.com/blog/html5-guide">
</head>
<!-- No matter which URL the page is accessed from,
     this tag signals to Google which URL to index -->
<!-- Link equity is consolidated at the canonical URL -->

All lessons in this course

  1. title and its Role in SEO
  2. meta charset viewport author and description
  3. Canonical URLs and robots meta
  4. Favicon and Apple Touch Icon
← Back to HTML Academy