Infographic explaining hreflang tag implementation for multilingual SEO with code examples and browser icons for English, Spanish, and French versions.

Hreflang Tags Explained for Beginners – Multilingual SEO Guide

If your website has multiple language versions or targets different countries, you’ll want to make sure Google shows the correct version to the right audience. That’s exactly what hreflang tags are for.

In this guide, we explain what hreflang tags are, how they work, and how to apply them correctly—especially in multisite setups and common use cases.

What is a hreflang tag?

A hreflang tag is an HTML attribute that tells search engines which language and/or regional version of a page is intended for which audience. It helps avoid duplicate content issues and ensures the right version of your content appears in search results.

Basic Example:

<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />

In this example:

  • en stands for English
  • de stands for German
  • Each link points to the corresponding language version of the same content

Why is hreflang important?

Without hreflang tags, you may encounter:

  • The wrong language version appearing in Google search results
  • Duplicate content issues that can harm SEO
  • Higher bounce rates due to users landing on irrelevant pages

With hreflang tags, you benefit from:

  • Better targeting by language and region
  • Improved user experience and engagement
  • More accurate indexing and visibility across markets

Language vs. Language-Region

Hreflang supports targeting by language only (e.g., en) or by language and region (e.g., en-GB for British English).

Regional Example:

<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/" />

What is x-default?

x-default is a special hreflang value used for pages that do not target a specific language or region. This is commonly used for landing pages where users choose their language or location.

Example:

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

Common hreflang Use Cases

1. Single domain with language folders

Your site uses one domain with subdirectories per language:


example.com/en/
example.com/es/
example.com/fr/

Hreflang implementation:

<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />

2. Multisite structure (multiple domains)

You manage separate domains for each region or language:


example.co.uk
example.de
example.fr

On example.co.uk:

<link rel="alternate" hreflang="en-gb" href="https://example.co.uk/" />
<link rel="alternate" hreflang="de" href="https://example.de/" />
<link rel="alternate" hreflang="fr" href="https://example.fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/global/" />

Each site must also reference the other language versions with hreflang.

3. E-commerce product pages

You sell products internationally and have translated product pages:


example.com/en/product/shoes
example.com/de/produkt/schuhe

Each page should include hreflang links pointing to the equivalent product in other languages.

Where to place hreflang tags?

You can implement hreflang tags in three ways:

  1. In the <head> section of your HTML pages (most common)
  2. Via HTTP headers (for non-HTML content like PDFs)
  3. In your XML sitemap (recommended for large websites)

Best Practices and Common Mistakes

✅ Best Practices:

  • Always include a self-referencing hreflang tag
  • Use correct ISO language-region codes (en-GB, not en_UK)
  • Include x-default for global or selector pages
  • Test your setup using tools like Merkle’s Hreflang Tag Tester

❌ Common Mistakes:

  • Missing reciprocal links between language versions
  • Using incorrect canonical and hreflang combinations
  • Pointing to broken URLs, redirects, or non-indexable pages

Bonus: Use hreflang together with canonical tags

Hreflang and canonical tags serve different SEO purposes:

  • Canonical: Declares the preferred version of a page among duplicates
  • Hreflang: Targets content by language and region

Each translated page should have a self-referencing canonical tag, not one pointing to the main language version.

Conclusion

Hreflang tags are essential for international SEO. Whether you’re using language folders or separate domains, implementing hreflang properly ensures that your multilingual content ranks in the right markets and avoids SEO pitfalls.

Need help setting up hreflang tags on your website? Feel free to leave a message below!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top