Hot Posts

10/recent/ticker-posts

How should I use hreflang tags for targeting European countries correctly


 

Using hreflang tags correctly is essential when targeting multiple European countries, especially when they share the same language but differ in content, currency, or legal requirements (e.g., Germany, Austria, Switzerland).

Here’s a clear, actionable guide for proper hreflang implementation:


✅ 1. Understand What hreflang Does

hreflang tells search engines:

  • What language your content is in

  • Which country it is intended for

It helps prevent duplicate content issues and ensures users see the right version of your site in search results.


✅ 2. Use Correct hreflang Format

The standard format is:

html
<link rel="alternate" hreflang="language-country" href="https://example.com/path/" />

Example for German in different countries:

html
<link rel="alternate" hreflang="de-DE" href="https://example.com/de-de/" /> <link rel="alternate" hreflang="de-AT" href="https://example.com/de-at/" /> <link rel="alternate" hreflang="de-CH" href="https://example.com/de-ch/" />

Always include:

html
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

This is a fallback for users outside your targeted locales.


✅ 3. Placement Options

You can place hreflang tags in three ways:

MethodBest ForNotes
<head> of HTMLMost reliable and commonRecommended
XML SitemapVery large sites or non-HTML pagesMust list all alternates
HTTP headersFor non-HTML files (e.g., PDFs)Less common

✅ 4. Be Consistent Across All Variants

Each version of a page must reference all others, including itself:

Example: On https://example.com/de-at/:

html
<link rel="alternate" hreflang="de-DE" href="https://example.com/de-de/" /> <link rel="alternate" hreflang="de-AT" href="https://example.com/de-at/" /> <link rel="alternate" hreflang="de-CH" href="https://example.com/de-ch/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />

✅ 5. Language–Country Codes Reference

CountryLanguage Codehreflang
Germanydede-DE
Austriadede-AT
Switzerlanddede-CH
Francefrfr-FR
Belgiumfr/nl/defr-BE / nl-BE / de-BE
Spaineses-ES
UKenen-GB
Irelandenen-IE

✅ 6. Common Mistakes to Avoid

🚫 Mixing language-only and language-region formats
✅ Always use full language–region if content is country-specific.

🚫 Not including self-referencing hreflang
✅ Each page must include itself in the list.

🚫 Incorrect language codes (e.g., using de-EU or en-EU)
✅ There’s no “EU” region — use real country codes.

🚫 Mismatched URLs across variants
✅ Make sure each hreflang points to a valid, unique URL.


✅ 7. Validate Your Implementation

Post a Comment

0 Comments