SEO

Hreflang Tags

What are hreflang tags? HTML tags for multilingual or regional websites. Help Google show the correct version.

What are Hreflang Tags?

Hreflang tags are HTML attributes that tell Google which version of a page is for which language or region. If you have a website available in German, English, and French, you need hreflang tags to tell Google: "This page is the German version, this page is the English version, this is the French version." Without hreflang tags, Google might interpret your German and English pages as duplicate content and only rank one variant.

Hreflang is part of technical SEO and is critical for websites with multilingual or regional content. Incorrect hreflang implementation can lead to ranking problems, indexing issues, and wrong-language search results for users.

Hreflang in B2B Context

Many B2B companies are international. They have a German website, an English website, and possibly French, Spanish, etc. Hreflang is essential for correct structure:

  • Multi-country B2B: If you operate in Germany, Austria, and Switzerland and have separate subdomains or subfolders, you need hreflang between them.
  • Multi-language B2B: If you have German and English content to reach international customers, you need hreflang to avoid cannibalization.
  • SEO efficiency: With hreflang, each language version gets its own rankings, instead of Google trying to rank one version. This means more traffic overall.
  • User experience: With hreflang, you can automatically direct users to the right language (based on browser language). That is better UX.

How Hreflang Works - Technically

Hreflang is implemented in two ways:

Method Format Best for Example
HTML link tag In HTML head: <link rel="alternate" hreflang="de" href="..." /> Standard implementation, all websites See example below
XML sitemap Hreflang in XML sitemap referencing separate URLs Many language variations (10+) Cleaner for large sites
HTTP header Link header in HTTP response Non-HTML content like PDFs Rarely used for B2B

The HTML link tag method is most common. Here is an example. If you have German and English versions of the same page:

  • German page (example.de/content): <link rel="alternate" hreflang="en" href="example.com/en/content" /> + <link rel="alternate" hreflang="de" href="example.de/content" />
  • English page (example.com/en/content): <link rel="alternate" hreflang="de" href="example.de/content" /> + <link rel="alternate" hreflang="en" href="example.com/en/content" />

Important: Each version must reference itself (hreflang="de" on German page) and all other versions.

Hreflang Formats and Best Practices

Hreflang supports multiple formats:

Format Meaning Use
hreflang="de" German language (any region) For single-language pages
hreflang="de-DE" German language, Germany region For region-specific content
hreflang="de-AT" German language, Austria region For Austria-specific page
hreflang="x-default" Fallback when no exact language match For default/English page or redirect page

Example for multi-region: A B2B software company with German-language pages for DE, AT, CH would have:

  • DE page: hreflang="de-DE" to itself, hreflang="de-AT" to AT page, hreflang="de-CH" to CH page
  • AT page: hreflang="de-DE" to DE page, hreflang="de-AT" to itself, hreflang="de-CH" to CH page
  • CH page: hreflang="de-DE" to DE page, hreflang="de-AT" to AT page, hreflang="de-CH" to itself

This is labor-intensive, but necessary if Google is to understand that these are three separate regional variations.

Hreflang vs. Canonical Tags - Important Difference

These are often confused, but they are different:

  • Hreflang: "Show German version to German users, English version to English users"
  • Canonical: "This page is the original, all others are duplicates"

Hreflang is not for duplicate content. It is for legitimate variations. Canonical says "one version is primary", hreflang says "multiple versions are all important for different audiences".

With hreflang, you can have:

  • example.de/content/ with canonical to itself and hreflang to example.com/en/content/
  • example.com/en/content/ with canonical to itself and hreflang to example.de/content/

Each version has its own canonical and hreflang links to other versions.

Best Practices for Hreflang Implementation

  • Use absolute URLs: Hreflang must always be absolute URLs (with domain), not relative. Relative URLs do not work.
  • Bidirectional: If German page has hreflang to English, English must have hreflang to German. One-way links are ignored.
  • Self-references: Each page must have hreflang to itself. This may seem redundant, but is necessary for Google.
  • List all variations: If you have 5 language versions, each page should have hreflang to all 5 versions. Incomplete hreflang implementation is useless.
  • Do not misuse x-default: hreflang="x-default" should only be a fallback, not for every page. Use it for your "default" or "English" version.
  • Test with search console: Google Search Console has a hreflang report. Check regularly that Google interprets your hreflang tags correctly. If errors appear, fix immediately.
  • XML sitemap for large sites: If you have 20+ language variations, use XML sitemap for hreflang instead of HTML tags. This is cleaner.
  • Test in staging: Before deploying hreflang to production, test thoroughly in staging environment. Wrong hreflang can be a ranking disaster.

Common Hreflang Mistakes

  • Only one direction: German page has hreflang to English, but English does not have hreflang to German. That is wrong.
  • Relative URLs: hreflang="en/content" instead of "https://example.com/en/content". Relative URLs do not work with hreflang.
  • Missing variations: If you have 5 language versions and page only links to 3, Google does not know about the other 2.
  • Wrong language codes: hreflang="deu" instead of "de". Wrong codes are ignored. Use ISO 639-1 codes (de, en, fr, es).
  • Hreflang on CMS pages without content versions: If your blog page exists only in German, it should NOT have hreflang to English version (which does not exist). That causes 404 errors.
  • Incorrectly directed hreflang: German page should have hreflang to "de" or "de-DE", not to "en". Make sure you connect the right language page to the right hreflang.

Hreflang Monitoring and Maintenance

After implementation, monitor regularly:

  • Google Search Console: Check hreflang report. Google will show errors if something is broken.
  • URL Inspector: Test random URLs with URL inspector in GSC. Verify that Google sees hreflang correctly.
  • Crawl test: Use tools like Screaming Frog or SEMrush to validate your hreflang tags.
  • After changes: If you add new language variations or change structure, check hreflang immediately.

Hreflang is complex, but if you do it correctly, it will massively improve your international SEO. Done wrong, it can break rankings. Take time to do it right.

Sounds like a topic for you?

We analyze your situation and show concrete improvement potential. The consultation is free and non-binding.

Book Free Consultation