hreflang Setup and SEO for Multilingual Sites
Yuuuk94·Published
Summary
hreflang tells search engines "the Korean version of this page is here and the English version is here". Google then shows Korean speakers the Korean page and English speakers the English one.
The key prerequisite is that each language has its own URL. If one URL switches language based on a cookie or browser setting, search engines only ever see one language and hreflang has nothing to work with.
01How to write it
The most common method is link tags in each page's <head>. Every language version must carry the same complete list, including itself.
<!-- identical on /ko/blog/robots-txt and /en/blog/robots-txt -->
<link rel="alternate" hreflang="ko" href="https://example.com/ko/blog/robots-txt" />
<link rel="alternate" hreflang="en" href="https://example.com/en/blog/robots-txt" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/blog/robots-txt" />| Method | Advantage | Good for |
|---|---|---|
| HTML link tags | Simplest, easy to check in source | Most websites |
| HTTP Link header | Works for non-HTML files | PDFs and other documents |
| Sitemap xhtml:link | No changes to page HTML | Very large sites |
Use one method. Mixing them makes maintenance harder and invites conflicting information.
02Language and region codes
- Language: ISO 639-1 two-letter codes such as
ko,en,ja - Region, when needed: add an ISO 3166-1 two-letter country code, as in
en-US,en-GB,zh-TW - A country code can't stand alone:
kris wrong,ko-KRis right - Classic typos: Korean is
ko, notkr; the UK isen-GB, noten-UK
x-default is the page to show when no version matches the user's language: a language picker or the most general version (often English). It is optional but makes your intent explicit.
03The most common mistake: no return link
If the Korean page points to the English page, the English page must point back. One-way annotations are ignored. This stops other sites from claiming your page as their translation.
| Mistake | Result |
|---|---|
| Linked in one direction only | The whole pairing is ignored |
| Page leaves itself out of the list | Flagged by some tools; not the recommended form |
| hreflang URL redirects or 404s | That language link is ignored |
| All language versions canonical to one language | The other language pages drop out of the index |
04The cookie and auto-redirect trap
Many sites switch language automatically based on IP, the browser's Accept-Language header or a cookie. Convenient for users, but a problem for search engines: Googlebot mostly crawls from the US, without a language preference and without cookies.
- A language URL always shows that language. The URL decides.
- Auto-redirect only from a language-neutral root (
/), never from a URL that already has a language. - Offer a banner such as "이 페이지는 한국어로도 볼 수 있어요" or a language switcher instead.
05Translation quality and thin pages
hreflang only links translations; whether a translation deserves indexing is a separate question. Unedited machine translation can be judged low quality. Also avoid listing empty pages in one language for content that only exists in another.
That is why META_SCAN kept its English blog index noindex until English articles existed, and only links language versions that actually exist for each post.
06How to verify
- Search each language page's source for
hreflangand confirm the full list is identical on every version. - Open each URL in the list and confirm it returns 200 in the right language. Use a private window without cookies.
- In Search Console URL Inspection, check that the Google-selected canonical for the English page is the English page itself.
- META_SCAN's i18n & UX card checks whether hreflang is present along with the mobile viewport setting.
FAQ
- Q. Isn't the html lang attribute enough?
- Google barely uses
<html lang>and detects language from the content. Links between translations can only be expressed with hreflang. Still set lang correctly, since screen readers and browser translation use it. - Q. My site is in one language. Do I need hreflang?
- No. hreflang only matters when the same content exists in other languages or for other regions.
- Q. Does Bing use hreflang?
- Bing relies more on the content-language meta tag and the html lang attribute than on hreflang. Setting hreflang for Google plus a correct lang attribute covers both.
Related reading
References
How does your site do?
Enter one URL to run the free SEO/AEO/GEO checklist, including everything covered in this post.
Check for free