Hreflang Tags Explained: How to Implement Them Correctly for Multilingual Sites

If you run a multilingual or multi-country website, hreflang implementation is one of those technical SEO tasks that looks simple on paper but breaks in unexpected ways once you push it live. A missing return tag here, a wrong country code there, and suddenly Google is serving your French visitors the English version of your homepage.

This guide walks you through the exact syntax, the three implementation methods, the most frequent mistakes we see on real websites, and how to validate everything properly. No fluff, just what works in 2026.

What Hreflang Actually Does (And What It Doesn’t)

The hreflang attribute tells Google which language and, optionally, which region a specific page targets. When someone in Spain searches for your product, Google uses hreflang signals to decide whether to serve them the Spanish version or the generic English one.

Two things worth clarifying up front:

  • Hreflang is a signal, not a directive. Google can still ignore it if other signals contradict your tags.
  • Hreflang does not boost rankings directly. It prevents duplicate content confusion and improves the user experience, which indirectly helps performance.
world map languages

Hreflang Syntax: The Rules You Cannot Break

The basic format looks like this:

<link rel="alternate" hreflang="language-region" href="URL" />

Breaking it down:

  • Language code: must follow ISO 639-1 format (en, fr, de, es, pt).
  • Region code (optional): must follow ISO 3166-1 Alpha 2 format (US, GB, CA, MX). Always uppercase by convention, though Google accepts lowercase.
  • URL: must be absolute, including the protocol (https://).

Valid vs Invalid Examples

Tag Status Why
hreflang=”en-US” Valid English for United States
hreflang=”fr” Valid French, any region
hreflang=”en-UK” Invalid UK is not the ISO code, use GB
hreflang=”es-Latin” Invalid Latin is not a country code
hreflang=”x-default” Valid Fallback for unmatched languages
world map languages

The Three Ways to Implement Hreflang

You have three options, and picking the right one depends on the size and structure of your site. This guide goes deeper on it.

1. HTML Tags in the <head>

The most common method. Add link tags inside the <head> section of every page:

<link rel="alternate" hreflang="en-US" href="https://decorateurl.com/us/" />
<link rel="alternate" hreflang="en-GB" href="https://decorateurl.com/uk/" />
<link rel="alternate" hreflang="fr-FR" href="https://decorateurl.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://decorateurl.com/" />

Best for: small to medium sites with a manageable number of language versions.

2. HTTP Headers

Used for non-HTML files like PDFs. The server returns a Link header:

Link: <https://decorateurl.com/en/guide.pdf>; rel="alternate"; hreflang="en", <https://decorateurl.com/fr/guide.pdf>; rel="alternate"; hreflang="fr"

Best for: documents, downloads, and other non-HTML resources.

3. XML Sitemap

The cleanest option for large sites. You declare all language versions inside your sitemap:

<url>
  <loc>https://decorateurl.com/us/</loc>
  <xhtml:link rel="alternate" hreflang="en-US" href="https://decorateurl.com/us/" />
  <xhtml:link rel="alternate" hreflang="fr-FR" href="https://decorateurl.com/fr/" />
  <xhtml:link rel="alternate" hreflang="x-default" href="https://decorateurl.com/" />
</url>

Best for: enterprise sites with dozens of locales or when you cannot easily edit the page head.

Warning: never mix methods. Pick one and stick with it. Using HTML tags on some pages and sitemap on others creates conflicting signals.

The Most Common Hreflang Implementation Errors

After auditing hundreds of multilingual sites, these are the mistakes we see over and over again.

Missing Return Tags

Hreflang must be reciprocal. If your English page points to your French page, the French page must point back to the English one. If the return link is missing, Google ignores the annotation entirely. There’s a good explainer over at weglot.com.

Fix: every page in the language cluster must reference every other page, including itself.

Wrong Country or Language Codes

The classic mistakes:

  • Using en-UK instead of en-GB
  • Using es-LA for Latin America (not a valid region)
  • Using zh instead of zh-CN or zh-TW when targeting specific Chinese-speaking regions
  • Writing eng instead of en (ISO 639-1 uses 2 letters)

Using Relative URLs

Hreflang requires absolute URLs with the full protocol. href="/fr/" will not work. Use href="https://decorateurl.com/fr/".

Pointing to Non-Canonical or Redirected URLs

If your hreflang points to a URL that redirects or has a different canonical tag, Google will drop the signal. Always point to the final, self-canonical version of each page.

Missing x-default

The x-default tag tells Google which page to serve when no language match exists. Not strictly required, but strongly recommended for any site targeting more than two locales.

Conflicts Between Hreflang and Canonical Tags

Each language version must have its own self-referencing canonical. If your French page has a canonical pointing to the English page, hreflang collapses. Every alternate URL needs to canonicalize to itself.

world map languages

How to Validate Your Hreflang Implementation

Once your tags are live, you need to confirm they actually work. Here is the process we use.

1. Google Search Console: International Targeting Report

Search Console reports hreflang errors under the Legacy tools and reports section. Look for:

  • No return tags: another URL claims a relationship, but the target page does not reciprocate.
  • Unknown language code: a code is malformed or invalid.

Note that Search Console can take days to reflect changes, so do not panic if new tags are not immediately reported.

2. URL Inspection Tool

Use the URL Inspection tool in Search Console to check what Google actually sees on a specific page. Look at the rendered HTML and confirm the hreflang tags appear as expected.

3. Third-Party Validators

Free tools that give you instant feedback:

  • Merkle Hreflang Tags Testing Tool: paste a URL and see all detected hreflang annotations plus errors.
  • Screaming Frog: crawl your entire site and audit hreflang in bulk, including return tag checks.
  • Ahrefs Site Audit: flags missing return tags and invalid codes across the whole domain.

4. Manual Spot Check

Pick three or four key pages from different locales. Open source, search for hreflang, and manually verify:

  1. Every language version is listed.
  2. The page includes a self-referencing hreflang tag.
  3. URLs are absolute and match the canonical version.
  4. x-default is present if applicable.

Real Example: Multi-Country Ecommerce Setup

Imagine an ecommerce store selling to the US, UK, France, Germany, and offering a global English version. Here is the correct implementation for the product page:

<link rel="alternate" hreflang="en-US" href="https://decorateurl.com/us/product-a/" />
<link rel="alternate" hreflang="en-GB" href="https://decorateurl.com/uk/product-a/" />
<link rel="alternate" hreflang="fr-FR" href="https://decorateurl.com/fr/produit-a/" />
<link rel="alternate" hreflang="de-DE" href="https://decorateurl.com/de/produkt-a/" />
<link rel="alternate" hreflang="en" href="https://decorateurl.com/global/product-a/" />
<link rel="alternate" hreflang="x-default" href="https://decorateurl.com/global/product-a/" />

Each of the five pages must include this exact same block. That is the reciprocity rule in action.

world map languages

Quick Troubleshooting Checklist

Before you assume hreflang is broken, run through this list:

  1. Are all URLs absolute and using HTTPS?
  2. Does every page reference itself with hreflang?
  3. Do all pages in the cluster reference each other?
  4. Are language and country codes valid ISO codes?
  5. Does each page have a self-referencing canonical?
  6. Is x-default set for the fallback experience?
  7. Are you using only one implementation method (HTML, header, or sitemap)?
  8. Do the referenced URLs return 200 status codes without redirects?

FAQ

Do I need hreflang if my site is only in one language?

No. Hreflang is only relevant when you have multiple versions of the same content in different languages or targeted at different regions.

Can I use hreflang for pages that are only partially translated?

You can, but be careful. If the content is mostly untranslated boilerplate, users may bounce. Google recommends localizing the main content, including navigation and product descriptions.

How long does it take for hreflang changes to take effect?

Once Google recrawls the affected pages, changes can be picked up within days. Full processing across all locales sometimes takes two to four weeks.

Should I use hreflang or geotargeting in Search Console?

You can use both. Hreflang handles page-level signals, while Search Console geotargeting applies to entire domains or subdirectories. They complement each other. This write-up is worth a look.

What is the difference between hreflang=”en” and hreflang=”en-US”?

The first targets English speakers regardless of country. The second targets English speakers specifically in the United States. Use the region-specific version only when your content is genuinely localized for that market.

Does hreflang work for hash URLs or query parameters?

Hreflang ignores URL fragments (anything after #). Query parameters are supported, but you should make sure the parameterized URL is indexable and self-canonical.

Getting hreflang right takes patience, but the payoff is worth it. Cleaner signals mean the right users land on the right pages, bounce rates drop, and Google stops treating your international versions as duplicate content. Start with a small locale group, validate it thoroughly, then scale from there.

Leave a Comment