Multilingual SEO & hreflang: One Article, Two Languages
Short answer
hreflang is a tag that tells search engines which language versions a page has, so searchers see the version in their own language. Every version must list all versions including itself (return links in both directions), language codes must use ISO format (for example zh-TW, en), and an x-default should be added as the fallback.
When do you need hreflang?
When the same content exists in multiple language or regional versions. For example, every article on this site has a Traditional Chinese version and an English version. Without hreflang, search engines might:
- Show the English version to users in Taiwan, or vice versa.
- Treat the two versions as duplicate content and index only one of them.
A single-language site doesn’t need hreflang.
Which URL structure should you choose?
| Structure | Example | Pros | Cons |
|---|---|---|---|
| Subdirectory | example.com/en/ |
Shares domain authority; easiest to maintain | Weaker regional signal |
| Subdomain | en.example.com |
Can be deployed separately | Authority is split |
| Country-code domain | example.co.uk |
Strongest regional signal | Expensive; each must be run separately |
| URL parameter | ?lang=en |
— | Not recommended by Google |
In most cases a subdirectory is the best value. That’s what this site uses: the default language, Traditional Chinese, has no prefix, and English gets /en/.
How do you write hreflang?
Put the complete set in the <head> of every language version:
<link rel="alternate" hreflang="zh-TW" href="https://example.com/articles/geo/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/articles/geo/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/articles/geo/" />
Three rules:
- Include itself: The Chinese version must also list a
zh-TWentry pointing to itself. - Link in both directions: If the Chinese version points to the English version, the English version must point back to the Chinese version. One-way hreflang is ignored.
- Use absolute URLs: Include
https://and the domain.
What is x-default?
x-default specifies which page to show when no version matches the user’s language. It usually points to the default language or a language selector page.
Where else can you declare it besides HTML?
Google supports three methods; pick any one (official documentation):
<link>tags in the HTML<head>(most common)- HTTP headers (suited to non-HTML files such as PDFs)
xhtml:linkin an XML sitemap
This site uses both HTML tags and the sitemap; since they’re consistent, they don’t conflict.
What are the most common mistakes?
- Wrong language codes:
en-UKis wrong; the UK isen-GB. A region code can’t be used on its own, soTWis not a valid hreflang value. - One-way links only: Adding an English version and forgetting to go back and update the Chinese version.
- Canonical pointing to another language: This prevents that language version from being indexed.
- Automatic IP-based language redirects: Googlebot crawls mainly from the US, so it may never see your other language versions. Let users switch languages manually instead of forcing a redirect.
Check any URL with this site’s health check tool; it verifies whether the hreflang set includes the page itself and an x-default.
FAQ
If I use hreflang, do I still need a canonical?
You need both. Each language version should have a self-referencing canonical. Don't point the English version's canonical to the Chinese version, or the English version will be treated as a duplicate and won't be indexed.
Should Traditional Chinese use zh-TW or zh-Hant?
Google accepts both. zh-TW means "Chinese as used in Taiwan," while zh-Hant means "Traditional Chinese script." If your main readers are in Taiwan, zh-TW is the most direct choice.
Can I create the English version with machine translation alone?
You can, but be careful. Poor-quality machine-translated content may be treated as low-quality pages. At a minimum, have a human review it and make sure the content is useful to the target audience.