What Are Hreflang Tags and Why Do They Matter?
Hreflang tags are HTML attributes that tell search engines which language and regional version of a page to show users based on their location and language preferences. If your blog targets readers in multiple countries or languages, hreflang tags prevent duplicate content issues and ensure French users see your French content while German users see German versions.
Get hreflang wrong, and you'll watch your international traffic tank. Google might index the wrong language version, users bounce because they land on content they can't read, and your carefully translated articles compete against each other in search results. Get it right, and each piece of content serves its intended audience without cannibalizing your other regional pages.
How Hreflang Tags Work
Hreflang uses ISO 639-1 language codes (like "en" for English or "de" for German) combined with optional ISO 3166-1 Alpha 2 country codes (like "US" or "GB"). The format looks like this: hreflang="en-US" for American English or hreflang="de-DE" for German content targeting Germany.
You can specify language only (hreflang="en") or language plus region (hreflang="en-AU" for Australian English). The regional targeting matters when you have country-specific content, pricing, or spelling differences.
The Three Implementation Methods
You can add hreflang tags in three ways:
- HTML link elements in the head section: Best for smaller blogs with manageable page counts. Each page includes link tags pointing to all its language variants.
- HTTP headers: Required for non-HTML files like PDFs. Less common for blogs.
- XML sitemap: Ideal for large blogs with hundreds of posts. Centralizes all hreflang information in one file and reduces page load overhead.
Most blogs with under 500 pages do fine with HTML implementation. Once you scale beyond that, sitemap implementation becomes easier to maintain.
Step-by-Step Hreflang Implementation for Blogs
1. Map Your Content Relationships
Before writing any code, document every page and its language equivalents. Create a spreadsheet with columns for each language version. A blog post about "SEO basics" might have:
- English (US): /blog/seo-basics/
- English (UK): /en-gb/blog/seo-basics/
- Spanish: /es/blog/conceptos-basicos-seo/
- German: /de/blog/seo-grundlagen/
Not every post needs translations. You might have 200 English posts but only 50 translated into Spanish. That's fine. Hreflang tags only go on pages that have equivalents.
2. Add Hreflang Tags to Each Page
Every page needs to reference all its language versions, including itself. For the English US version of your SEO basics post, add this to the head section:
<link rel="alternate" hreflang="en-US" href="https://example.com/blog/seo-basics/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/blog/seo-basics/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/blog/conceptos-basicos-seo/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/blog/seo-grundlagen/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/blog/seo-basics/" />
The x-default tag tells search engines which page to show users whose language or location doesn't match any specified version. Usually this is your primary English page or a language selector page.
3. Ensure Reciprocal Linking
This trips up most people. If page A references page B, page B must reference page A. All pages in a set must point to each other. Missing reciprocal links cause Google to ignore your hreflang tags entirely.
When you add a new language version, you need to update every existing page in that content cluster. Miss one, and the whole chain breaks.
Common Hreflang Mistakes That Kill Your Rankings
Using Wrong Language or Country Codes
I've seen blogs use "uk" instead of "gb" for United Kingdom, "en-EN" (which doesn't exist), or regional codes without languages (just "US" instead of "en-US"). According to Google's official documentation, invalid codes get ignored completely.
Missing Self-Referencing Tags
Each page must include a hreflang tag pointing to itself. Skip this, and Google may struggle to process the entire tag set.
Conflicting Canonical and Hreflang Signals
If your Spanish page has a canonical tag pointing to the English version, Google receives contradictory signals. Canonical says "this is a duplicate," while hreflang says "this is a regional equivalent." The canonical tag usually wins, and your Spanish page won't rank for Spanish searches.
Each language version should have a self-referencing canonical tag pointing to itself.
Hreflang on Non-Indexed Pages
Placing hreflang tags on pages blocked by robots.txt or marked noindex creates errors. Google can't process relationships between pages it can't crawl or index.
WordPress and Other CMS Solutions
Manual hreflang implementation works for static sites, but CMS-based blogs need automated solutions. For WordPress, plugins like WPML, Polylang, or TranslatePress handle hreflang automatically when you connect translated posts. If you're comparing WordPress vs Webflow for SEO, note that Webflow requires more manual configuration for multilingual setups.
Shopify has built-in hreflang support through its Markets feature. Webflow requires custom code or Weglot integration. Ghost needs third-party translation services.
Whatever platform you choose, verify the implementation. Plugins sometimes generate incorrect code, especially after updates.
Testing Your Hreflang Implementation
After implementation, validate your tags using these methods:
- Google Search Console: The International Targeting report shows hreflang errors for your site.
- Ahrefs or Screaming Frog: Crawl your site and check for missing reciprocal links or invalid codes.
- Manual checking: View page source and verify tags appear correctly in the head section.
Run validation monthly if you publish new multilingual content regularly. A single broken reciprocal link can cascade problems across your entire international structure.
Hreflang for Blogs Without Full Translations
What if you only translate 20% of your content? You have options:
Option 1: Only add hreflang to pages that have translations. Untranslated English posts simply don't have language variants.
Option 2: Point all untranslated content to a regional homepage using x-default. Users land on the homepage and navigate from there.
Option 3: Create thin placeholder pages in other languages that link to the English original. This approach is risky and can look spammy.
Option 1 is safest. If you're building a multilingual content strategy, prioritize translating your highest-traffic posts first and expand from there.
When Hreflang Isn't Enough
Hreflang handles language signals, but international SEO involves more. Consider:
- Server location: Hosting closer to your target audience improves load times.
- ccTLDs vs subdirectories: A .de domain sends stronger geo-targeting signals than /de/ subdirectory.
- Local link building: Backlinks from country-specific domains boost regional rankings.
- Cultural adaptation: Direct translation often misses cultural nuances that affect engagement.
Hreflang prevents technical problems, but ranking requires content that genuinely serves each market. Understanding how to write content that ranks applies doubly for international audiences who have different search behaviors.
FAQ
Do I need hreflang if I only target one language in multiple countries?
Yes, if you have country-specific content. A US blog and UK blog both in English but with different spellings, currencies, or regulations should use hreflang="en-US"