# Hreflang

The HTML attribute that tells search engines which language and region a page targets for multilingual or regional websites.

**Hreflang** is the HTML attribute that tells search engines which language and geographic region a page is intended for. It is essential for multilingual or multi-regional websites.

Hreflang can be implemented in three ways:

```
<!-- 1. In the HTML head -->
<link rel="alternate" hreflang="tr" href="https://site.com/" />
<link rel="alternate" hreflang="en" href="https://site.com/en/" />
<link rel="alternate" hreflang="x-default" href="https://site.com/" />

<!-- 2. HTTP header -->
Link: <https://site.com/en/>; rel="alternate"; hreflang="en"

<!-- 3. In the XML Sitemap -->
<url>...<xhtml:link rel="alternate" hreflang="en" href="..."/></url>
```

Important rules:

- **It must be reciprocal:** If page A points to page B, page B must also point to page A.
- **x-default:** The default page to show when no language matches.
- **Language-region format:** Language only (“en”) or language-region (“en-GB”). Region only (“GB”) is invalid.
- Self-referencing is required: The page must also list its own hreflang.

**Tip:** The “International Targeting” report in Search Console shows hreflang errors. A missing return tag is the most common error.
