Hreflang is an annotation that tells Google which language and country each version of a page is meant for, so that a buyer in Munich sees your German page and a buyer in Paris sees your French one. For a US company launching European sites, hreflang tags are the technical link between the US original and every localized copy.
This guide explains what hreflang does and what it does not do, which language and region codes European sites need, the three ways to implement it, how x-default and canonical tags fit in, why automatic redirects cause trouble, and how to check your setup now that Search Console no longer has a dedicated report. The code examples can be copied and adapted.
In this article
Hreflang is an attribute value used with rel="alternate" links that tells search engines a page has equivalent versions in other languages or for other regions, and which audience each version targets. Google documents it in its guide to localized versions of your pages.
Each annotation pairs a URL with a code. The code is a language, such as de for German, optionally followed by a region, such as de-AT for German speakers in Austria. A set of annotations that lists every version of the same page is often called an hreflang cluster. When the cluster is correct, Google can show the right URL to each searcher based on their language and location.
Hreflang helps Google choose which of your equivalent pages to show to a given user. It does not make a page rank higher, it does not translate anything and it does not tell Google what language a page is written in.
Google says it uses its own algorithms to detect the language of a page and does not rely on hreflang or the lang attribute for that. Hreflang is a hint about relationships between URLs. If your French page ranks on page three in France, correct hreflang will not move it to page one. What it does is stop the wrong version from appearing, such as your US page showing in Belgian results when a French Belgian page exists.
Hreflang also does not prevent duplicate content handling. Google says localized versions are considered duplicates only if the main content remains untranslated. Two English pages for the US and the UK with almost the same text may still be grouped together, which is why localizing prices, spelling, contact details and examples matters even between English versions.
A US company needs hreflang tags as soon as the same page exists in more than one language or regional version, for example a US English site plus German, French or UK English versions. A single-language site with no regional variants does not need them.
The typical moment is the launch of the first European site. A software company adds /de/ and /fr/ folders. A manufacturer opens a country domain for Germany. An ecommerce brand adds a UK store with prices in pounds. In each case Google sees several pages about the same product or service, and hreflang tells it which one belongs to which audience. Before you add the tags, settle the URL structure itself and the broader international SEO plan.
Hreflang codes use an ISO 639-1 language code, optionally followed by a hyphen and an ISO 3166-1 alpha-2 region code. Google states that only codes listed in those two standards are supported.
Codes are not case sensitive for Google, but writing fr-BE with a lowercase language and uppercase region follows the convention.
Most European rollouts need a mix of language-only codes for large single-language markets and language-region codes for countries that share a language. The choice depends on whether your versions differ by country or only by language.
A useful pattern combines both levels. You can list fr-FR and fr-BE for country pages and also fr for a general French version, which then catches French speakers in other countries. Our guides to SEO in Germany and SEO for Spain explain how search behavior differs in those markets.
You can add hreflang with link elements in the HTML head, with HTTP headers or in an XML sitemap. Google says the three methods are equivalent from its point of view, so choose the one your platform can maintain reliably.
Pick one method per page type and stick to it. Using two methods for the same URLs adds work without benefit, and if the two sets disagree you create conflicting signals that are hard to trace.
In HTML, each version of the page carries one link element per version in its head section, including a link to itself. The block is identical on every version in the cluster.
Here is an example for a US software company with a US English original, a UK version, German pages for Germany and Austria and French pages for France and Belgium:
<link rel="alternate" hreflang="en-US" href="https://www.example.com/pricing/" />
<link rel="alternate" hreflang="en-GB" href="https://www.example.com/uk/pricing/" />
<link rel="alternate" hreflang="de-DE" href="https://www.example.com/de/preise/" />
<link rel="alternate" hreflang="de-AT" href="https://www.example.com/at/preise/" />
<link rel="alternate" hreflang="fr-FR" href="https://www.example.com/fr/tarifs/" />
<link rel="alternate" hreflang="fr-BE" href="https://www.example.com/be-fr/tarifs/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/pricing/" />
Three details matter. Use absolute URLs including the protocol, never relative paths. Put the elements inside a well-formed head section, since Google says the link elements must be there and an unclosed tag or a script that breaks the head can hide them. And make sure each URL returns a 200 status and is the canonical version of that page, not a redirect or a parameter variant.
In a sitemap, each URL gets its own url entry, and inside it you list every version of the page, including itself, with xhtml:link elements. The sitemap must declare the xhtml namespace at the top.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.example.com/pricing/</loc>
<xhtml:link rel="alternate" hreflang="en-US" href="https://www.example.com/pricing/" />
<xhtml:link rel="alternate" hreflang="de-DE" href="https://www.example.com/de/preise/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.example.com/pricing/" />
</url>
<url>
<loc>https://www.example.com/de/preise/</loc>
<xhtml:link rel="alternate" hreflang="en-US" href="https://www.example.com/pricing/" />
<xhtml:link rel="alternate" hreflang="de-DE" href="https://www.example.com/de/preise/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.example.com/pricing/" />
</url>
</urlset>
The repetition is intentional. Every URL in the cluster appears once as a loc and once as an alternate inside every other entry. On a large site this file should be generated by your CMS or a script, never maintained by hand, and it should include only indexable, canonical URLs.
Use HTTP headers when the localized documents are not HTML pages, most often PDF datasheets, manuals and price lists. Google supports a Link header that lists every version of the file, and the header returned for each version must be identical.
The header starts with "Link" and lists each version of the file as a full URL in angle brackets, followed by rel="alternate" and its hreflang value, with the entries separated by commas.
Manufacturers often have PDFs that rank for product codes, and without annotations a German engineer may land on the English datasheet. Headers are set in the server configuration.
Return links matter because Google ignores hreflang annotations that are not confirmed in both directions. If your US page points to the German page, the German page must point back to the US page, or Google disregards the pair.
Without confirmation, any site could declare itself an alternate version of yours. Self-reference means each version also lists itself in the set, and Google's examples always include it. The simplest way to get both right is to generate the same complete block for every page in the cluster from one data source, such as a translation table in your CMS that links each page to its equivalents.
Return link errors usually appear when versions grow apart. The French team deletes a page, the US team renames a URL, or a new market launches with only half the pages. Each change breaks annotations on pages that nobody touched. Our article on quick international SEO improvements lists checks to run after such changes.
Hreflang x-default is a reserved value that tells Google which page to show when no other version matches the user's language or region. For many US companies the x-default is the US English page, used as the global fallback.
Google describes x-default as the value used when no other language or region matches the browser setting, and says it is a good fit for language selector pages. You have two sensible options. Point x-default to your US or international English page if that is what you want visitors from unlisted countries to see. Or point it to a country and language selector if your versions differ enough that guessing would be worse than asking.
Add x-default to every cluster, keep it consistent across all versions and make sure it points to a page that exists in the cluster logic, not to a home page when the cluster is about a product.
Each language version should have a canonical tag pointing to itself, and hreflang should list only canonical URLs. Google advises that when you use hreflang, the canonical should be a page in the same language or the best possible substitute.
The most damaging error is a canonical on every European page that points to the US original. That tells Google the German and French pages are copies of the English one, and Google may drop them from the index, which makes the hreflang set useless. Google's canonicalization guide also notes that hreflang relationships act as a tiebreaker. Pages that are part of a correct hreflang cluster are preferred as canonicals over pages outside it.
No, you should not redirect visitors automatically based on IP address or browser language. Google advises against automatic redirection between language versions because it can stop both users and Googlebot from reaching all versions.
Google explains that most of its crawling comes from US IP addresses and that Googlebot sends requests without an Accept-Language header. A site that forces every US IP to the US page may never show Googlebot the German or French versions. Visitors suffer too. A French-speaking engineer traveling in Chicago wants the French page, and a US buyer researching the German market wants the German one.
The better pattern combines hreflang, so that search engines send the right version from the results page, with a visible language and country selector on every page. If you want to help visitors who land on the wrong version, show a small banner suggesting the matching site and let them choose.
Check hreflang with a site crawler that validates clusters, the URL Inspection tool in Search Console and country-level performance data. Google retired the International Targeting report in Search Console in 2022, so there is no longer a dedicated hreflang error report.
Other search engines handle language signals in their own way, so also set the lang attribute on the html element of every page to the language of its content. It costs nothing and helps browsers and assistive technology too.
The most common hreflang mistakes are missing return links, invalid codes and annotations that point to URLs that are not canonical or not indexable. Google lists the first two among its own examples of common errors.
Most of these come from process. When translation and development teams work apart, nobody owns the cluster as a whole. Our overview of how multilingual search works in Europe explains why ownership per market matters.
Roll out hreflang by mapping equivalent pages first, then generating annotations from that map, then testing before and after launch. The map is the part that takes time, and it is where most later errors begin.
Hreflang works only when each version deserves to rank in its market, so the content matters as much as the code. Our guides on being visible on Google across Europe and on reaching French customers show what localized pages need. If you want a team to plan and check the rollout, our international SEO agency page explains how Mintense works with US companies, with native teams in London, Lille and Verona covering 16 languages.
Hreflang tells Google that a page has equivalent versions in other languages or for other countries, and which audience each version targets. Google then shows the version that best matches the searcher's language and location, for example your German page to a user in Germany instead of your US page. It does not improve rankings by itself, does not translate content and does not tell Google the language of a page, which Google detects on its own. Its job is to send each user to the right version.
No. Hreflang helps Google choose which of your equivalent pages to show, but it does not make any of them rank higher. If your French page has weak content or few links in France, correct hreflang will not lift it. What hreflang prevents is the wrong version appearing, such as the US page ranking in Belgium when a French Belgian page exists. That improves click-through and conversion, because visitors land on prices, language and contact details meant for them.
Often yes. The x-default value tells Google which page to show when no listed language or region matches the user. If your US English page works for visitors from countries where you have no local version, pointing x-default to it is a sensible choice. If your versions differ a lot in prices, products or legal terms, a language and country selector page may be a better fallback. Whatever you choose, use the same x-default on every version in the cluster.
Use en-GB. Hreflang region codes follow ISO 3166-1 alpha-2, where the United Kingdom is GB. Google warns that UK, EU and UN have no effect in hreflang annotations, so en-UK is silently ignored and your British page loses its targeting. The same logic applies to other codes. Use the two-letter ISO code for the country, after a valid ISO 639-1 language code, such as de-AT for Austria, fr-BE for French in Belgium and nl-BE for Dutch in Belgium.
Yes, if the domains carry equivalent pages in the same or different languages. A country domain gives Google a strong signal about the target country, but it does not tell Google which page on your .de site corresponds to which page on your .com site. Hreflang links them across domains, and return links work across domains too. This matters most when two domains share a language, such as a .com for the US and a .co.uk for the United Kingdom, where pages can look very similar.
Crawl all language versions with an SEO crawler that validates hreflang clusters and reports missing return links, invalid codes and non-canonical targets. Then use URL Inspection in Search Console on key pages to see which canonical Google selected. In the Performance report, filter by country and check which URLs receive impressions there. Google retired the International Targeting report in 2022, so there is no dedicated error report anymore, and regular crawls after each release are the most reliable check.
Yes, and the conflict usually breaks the setup. If a German page carries a canonical pointing to the US page, you tell Google it is a copy, and Google may drop it from the index while the hreflang set points to it. Each version should have a self-referencing canonical, and hreflang should list only those canonical URLs. Google advises choosing a canonical in the same language or the best possible substitute, and it uses hreflang clusters as a tiebreaker when picking canonicals.