0Pricing
HTML Academy · Lesson

Hreflang for International Pages

Signal language and region variants to search engines.

The Problem hreflang Solves

When you publish the same article in English, Turkish and Japanese, search engines need to know which version to show in each user's search results. Without hreflang, Google may serve the wrong language or treat the variants as duplicate content.

The Link Tag

Declare each alternate version with <link rel="alternate" hreflang="..." href="..."> in the <head>. The hreflang attribute is a BCP-47 language code (en, tr) or language-region pair (en-US, en-GB, pt-BR).

<link rel="alternate" hreflang="en" href="https://example.com/en/article">
<link rel="alternate" hreflang="tr" href="https://example.com/tr/article">
<link rel="alternate" hreflang="ja" href="https://example.com/ja/article">

All lessons in this course

  1. OpenGraph og:title og:description og:image
  2. Twitter Card Meta Tags
  3. JSON-LD Structured Data Basics
  4. Hreflang for International Pages
← Back to HTML Academy