hreflang
Definition and how it works
hreflang is an HTML attribute that tells search engines which language and region each URL on a multilingual or multi-regional site is meant for. Google’s Localized Versions documentation says that if you have multiple language or regional versions of the same page, you should tell Google about them, because doing so helps Google Search point users to the most appropriate version for their language or region. Google (official) The key requirement is a two-way declaration in which, for example, the Korean page and the English page reference each other.
The reason this attribute is needed lies in how Google detects language. Google’s documentation on managing multi-regional and multilingual sites states clearly that to determine a page’s language, Google uses only the visible content, not code-level information such as the lang attribute or the URL. Google (official) Content alone doesn’t convey “which users should see this version,” and hreflang fills that gap.
Why it matters
Implemented correctly, it sends Korean and English visitors to their own language versions accurately, but in practice this attribute is notoriously tricky. Google’s John Mueller said: “hreflang is one of the most complex aspects of SEO. It looks easy like a meta tag, but it gets really hard quickly.” Google (Mueller) The Ahrefs guide explains that hreflang is a signal, not a directive, so Google may show a different version even when it is implemented perfectly. Ahrefs (data) So the benefit of accurate implementation is not higher rankings but fewer wrong-version results and duplicate judgments.
The relationship with duplicate detection is also worth noting. Google says language versions are treated as duplicates only when the main content remains in the same language. Google (official) This applies to cases like US and UK English pages whose content is essentially the same, and the multi-regional documentation recommends using canonical tags and hreflang together in that case so the right version is shown to searchers. Google (official)
How to write it
According to Google’s documentation, the first code in an hreflang value is an ISO 639-1 language code (ko, en), optionally followed by an ISO 3166-1 Alpha 2 region code to narrow the target (en-US, en-GB). The same document states that specifying a country code alone is not valid, and that Google does not infer the language from a country code. Google (official) There are three rules to follow: each language version must list every version, including itself; use fully qualified URLs that include the protocol (https); and specify x-default for users whose language doesn’t match any version.
<link rel="alternate" hreflang="ko" href="https://example.com/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/" />
Put this same set in the head of both the Korean page and the English page. Google’s documentation recommends x-default as the fallback page to show when a user’s language settings don’t match any version. Google (official) The 2013 Google Search Central Blog post that introduced this value also gave the example of designating a homepage with a country selector as x-default, and noted that Google and Yandex supported the annotation at the time. Google Blog Choose one of three implementation locations; Google’s documentation says all three are equivalent from Google’s perspective, so pick whichever is most convenient for your site. Google (official)
| Implementation location | Method | Google’s guidance |
|---|---|---|
| HTML head | <link rel=”alternate”> tag | Use when you can’t configure the sitemap or HTTP response headers |
| HTTP header | Specify hreflang in the Link response header | Useful for non-HTML files such as PDFs |
| XML sitemap | Add an xhtml:link element for each URL entry | Declare everything in bulk in the sitemap without changing page markup |
Practical checkpoints from an agency’s perspective
WordPress does not output hreflang by default. Multilingual plugins such as WPML and Polylang output it automatically, but with custom themes you often have to output it yourself via the wp_head hook. Either way, the basic step is to open the final rendered HTML source and check the actual output.
- The URLs hreflang points to must match the canonical URLs specified by the canonical tag. Google’s documentation on consolidating duplicate URLs advises specifying a canonical page in the same language when using hreflang Google (official), and the Ahrefs guide warns that if an hreflang target is canonicalized to a different URL, the two signals conflict. Ahrefs (data)
- Each language version must be in a state search engines can crawl and index normally, and the Ahrefs guide states explicitly not to put noindex on hreflang target pages. Ahrefs (data)
- Because Google’s documentation requires absolute URLs, check that domains are replaced at deployment so the staging domain doesn’t remain in hreflang when you deploy to the live server. Google (official)
- As language versions grow, each page needs as many tags as there are versions. Since Google’s documentation treats the three implementation methods as equivalent, you can move to the XML sitemap method and manage everything in one place. Google (official)
Common mistakes
The most common mistake is missing return links. Google’s Localized Versions documentation states that if two pages don’t point to each other, the tags are ignored, explaining that this prevents third-party sites from arbitrarily declaring themselves as alternate versions. Google (official) In a 2017 Semrush study of 20,000 multilingual websites, 58% had hreflang conflicts in their page source code, and 96% of the pages with conflicts lacked a self-referencing hreflang. Semrush (study)
- Wrong language codes – Korean is ko. kr is a country code, and according to Google’s documentation, a country code alone is not valid. Google (official) To also specify the region, write ko-KR. The ISO 3166-1 code for the United Kingdom is GB, so British English is en-GB; the Semrush study found that writing UK is a common country code mistake. Semrush (study)
- Using relative URLs – Google’s documentation requires fully qualified URLs including the protocol, so relative paths like /en/ don’t meet this requirement. Google (official)
- Missing self-reference – Google’s documentation states that each language version must list all language versions, including itself. Google (official)
- Missing x-default – It’s not required, but Google’s documentation recommends specifying a fallback page for users whose language doesn’t match. Google (official)
In short, hreflang is a signal, not a mandatory rule, so Google may show a different version even if it’s implemented perfectly. Ahrefs (data) That’s why, as Google’s multi-regional documentation recommends, the prerequisite is to provide each page’s content and navigation consistently in a single language. Google (official)
References
- Localized Versions of your Pages – Google Search Central
- Managing Multi-regional and Multilingual Sites – Google Search Central
- Introducing x-default hreflang for international landing pages – Google Search Central Blog
- Consolidate Duplicate URLs with Canonicals – Google Search Central
- Google: hreflang The Most Complex Aspect Of SEO (John Mueller, 2018) – Search Engine Roundtable
- Hreflang: The Easy Guide for Beginners – Ahrefs
- 13 Most Common Hreflang Mistakes [Semrush Study, 2017] – Semrush
Jul.2026By Studio JT