---
title: "Hreflang"
description: "An HTML attribute that specifies the language and optional regional targeting of a web page, helping search engines serve the correct language or regional version of a page to users in different countries or language groups."
url: "https://skribra.com/glossary/hreflang"
type: "glossary-term"
category: "Technical SEO"
updated: "2026-06-09"
---

# Hreflang

**Definition.** An HTML attribute that specifies the language and optional regional targeting of a web page, helping search engines serve the correct language or regional version of a page to users in different countries or language groups.

**In short.** Hreflang tells Google 'this page is for French speakers, that one is for Spanish speakers in Mexico.' Without it, Google may show the wrong language version to international visitors, hurting both UX and rankings.

## Key points

- Hreflang is relevant for sites with content in multiple languages or region-specific versions of the same language (e.g., en-US vs en-GB)
- Hreflang must be bidirectional — every page must link to all its alternate versions, and each alternate must link back
- Implementation can be done via HTML `<link>` tags, HTTP headers, or XML sitemap
- Hreflang does not affect ranking strength — it only affects which version Google serves to different users

## When to Implement Hreflang

Hreflang is necessary when your site serves similar content in multiple languages or regional variants[1]. A global SaaS company with US English, UK English, French, and German versions of their site needs hreflang to prevent French users from being served the German page. Without it, Google consolidates the pages as [duplicate content](https://skribra.com/glossary/duplicate-content) and may serve the wrong version. Note that hreflang is for language/regional targeting — not for every country. If you only have one English version for global use, hreflang is not needed. It's also not needed for pages that are truly unique per region with different content and different topics — those are separate pages, not alternate versions of the same page.

## Implementing Hreflang Correctly

The most common hreflang implementation uses `<link>` tags in the `<head>` of each page[1][2]. For a page with US English, UK English, and French versions, each version includes three link tags pointing to all three versions (including itself). The format: `<link rel='alternate' hreflang='en-us' href='https://example.com/en-us/page/'>`, `<link rel='alternate' hreflang='en-gb' href='https://example.com/en-gb/page/'>`, `<link rel='alternate' hreflang='fr' href='https://example.com/fr/page/'>`. Each version must include all the same alternate tags. The self-referencing tag (pointing to the current page) is required. Language codes follow BCP 47 format (e.g., 'fr' for French, 'fr-CA' for Canadian French). For large sites, XML sitemap implementation is more maintainable than per-page `<link>` tags.

## Common Hreflang Errors

Hreflang implementation errors are very common and prevent the feature from working correctly[1][2]. The most frequent mistake is broken bidirectionality: if page A lists page B as an alternate but page B doesn't list page A, Google ignores the entire hreflang cluster. Return links must be complete. Using the wrong language code format (e.g., 'en_US' with underscore instead of 'en-us' with hyphen) prevents recognition. Pointing hreflang to [redirected URLs](https://skribra.com/glossary/301-redirect) or non-canonical URLs causes confusion. Using hreflang with noindex pages is contradictory. Check for these issues using Google Search Console's International Targeting report or specialized hreflang validation tools like hreflang.org. For enterprise sites, auditing hreflang across thousands of pages requires automated crawling.

## Related terms

- [Canonical URL](https://skribra.com/glossary/canonical-url): An HTML tag that tells search engines which version of a page is the preferred, authoritative URL when multiple URLs serve the same or very similar content.
- [Duplicate Content](https://skribra.com/glossary/duplicate-content): Substantively identical or very similar content that appears on multiple URLs, either within the same site or across different sites, which can confuse search engines about which version to index and rank.
- [Crawlability](https://skribra.com/glossary/crawlability): The ability of search engine bots to access, navigate, and read the pages on your website without encountering technical barriers.
- [XML Sitemap](https://skribra.com/glossary/sitemap): A file (typically in XML format) that lists all the important URLs on a website, helping search engines discover and crawl content more efficiently.

## Sources

1. [Google Search Central — Localized Versions of Your Pages (hreflang)](https://developers.google.com/search/docs/specialty/international/localized-versions)
2. [Ahrefs — Hreflang: The Easy Guide for Beginners](https://ahrefs.com/blog/hreflang-tags/)

## Machine-readable index

- HTML version of this page: https://skribra.com/glossary/hreflang
- Site index for agents: https://skribra.com/llms.txt
- Sitemap: https://skribra.com/sitemap.xml
- Public REST API: https://skribra.com/api/v1
- OpenAPI specification: https://skribra.com/openapi.json
