Technical

What Is Hreflang and When Do You Actually Need It?

Photo of James Chen James Chen August 31, 2026 · 5 min read

Hreflang is an HTML attribute that tells search engines which language and region a page is written for. When you publish the same content in more than one language, or tailor it to different countries, hreflang helps Google show the right version to the right person. If your site exists in a single language for a single audience, you do not need it at all — hreflang is a tool for international and multilingual sites specifically.

What hreflang does

Hreflang annotations map out your language and regional variants so search engines treat them as alternates of one another rather than as competing duplicates. A user searching in French sees your French page; a user in the United Kingdom sees your UK page instead of the US one. The annotation uses ISO language codes, optionally paired with a country code, for example en for English, en-gb for English targeted at the United Kingdom, and es-mx for Spanish targeted at Mexico.

The language code is required and the country code is optional. A common mistake is to reach for a country code when you mean a language: en targets all English speakers regardless of location, while en-gb narrows that to the United Kingdom specifically. Only add a country code when the content is genuinely tailored to that market — different currency, spelling, shipping, or legal terms. If your French page suits every French speaker, plain fr is correct and more useful than pinning it to a single country.

When you actually need hreflang

You need hreflang when you have genuinely equivalent pages aimed at different audiences. Typical cases include:

  • The same article translated into two or more languages.
  • Region-specific versions in the same language, such as en-us and en-gb, with different pricing, spelling, or shipping.
  • A country selector that routes users to localized storefronts.

You do not need hreflang for a single-language site, and it is not a substitute for actual translation — pointing hreflang at a machine-translated or near-empty page will not help users or rankings.

How to implement hreflang correctly

You can add hreflang in one of three places: as <link> tags in the HTML head, in HTTP headers (useful for non-HTML files like PDFs), or in your XML sitemap. Pick one method and use it consistently. Two rules are non-negotiable. First, every page in a set must list all the alternates, including a self-referencing entry pointing to itself. Second, the references must be reciprocal: if the English page points to the French page, the French page must point back. Many teams also add an x-default entry to name a fallback page for users whose language or region you do not specifically target.

The reciprocity rule is where large sites most often come undone. If you have five language versions of a page, all five must list the same complete set of alternates, each with the correct URL. Miss one return link and Google may discard the entire set for that page. Because the annotations multiply quickly — five languages across hundreds of pages is thousands of entries — most teams generate hreflang programmatically from a single source of truth rather than editing it page by page, which keeps the URLs and codes consistent.

Does hreflang affect rankings?

Not directly. Hreflang is a targeting signal, not a ranking factor. It does not push any page higher; it helps Google serve the most appropriate existing version to a given user. The ranking benefit is indirect: when the right-language page is shown, users are more likely to click and stay, and you avoid the situation where your US and UK pages compete against each other for the same query. Think of hreflang as improving the match between page and searcher, not as a lever that lifts your positions.

It is also worth being realistic about scope. Hreflang only matters once you already have solid, genuinely localized pages that deserve to rank in their target markets. It cannot rescue thin or poorly translated content, and it is not a shortcut into a new country’s results. Get the content and the market fit right first; hreflang is the finishing layer that routes users to the version built for them, not the thing that earns the ranking in the first place.

Does hreflang fix duplicate content?

Partly, and only for the case it is designed for. Hreflang tells Google that two same-language regional pages — say en-us and en-gb — are intentional variants for different audiences rather than accidental duplicates, which helps Google show the right one. But hreflang does not consolidate ranking signals the way a canonical does, and it does nothing for duplicate content within a single language on one site. For that, you still need the usual tools; see our guide to finding and fixing duplicate content. A common and serious mistake is combining hreflang with a canonical that points every variant at one URL, which contradicts the hreflang set and confuses Google.

What are the most common hreflang mistakes?

The frequent errors are missing return links, where page A references page B but B does not reference A; wrong or invented codes, such as using a country code where a language code belongs; and referencing URLs that redirect or are blocked. Another is conflicting hreflang and canonical tags, where each variant self-canonicalizes but the canonical points elsewhere. Because these mistakes are easy to make across dozens of pages, validate your setup with the international-targeting reports in Google Search Console and a crawler that checks hreflang reciprocity, and re-check after any URL change or migration.

Share this article
Photo of James Chen

James Chen

Digital PR Strategist

More Articles

James Chen is a Digital PR Strategist at AdvantageBizMarketing with 8 years of experience in link building and media relations. Before joining ABM, James spent four years as a technology journalist at Wired and TechCrunch, giving him deep insight into what makes a story pitchable. He has placed coverage in The New York Times, Forbes, The Guardian, and over 200 niche industry publications. James holds an MSc in Digital Marketing from the London School of Economics and is a regular contributor to the Moz blog on digital PR measurement.

The Weekly Briefing

One email every Tuesday with actionable SEO insights, case studies, and tactics that actually move rankings. No fluff. No spam.

Join 4,200+ marketers. Unsubscribe anytime.

Related Articles