Opens in a new tab

Local SEO

Hreflang: how to tell Google about your English and Spanish pages

What hreflang does, the codes Google accepts and rejects, the rules it checks, seven steps to add it and what our English and Spanish pages declare.

CheckedNovember 3, 2026
Reading time
Listen to this guide
0:00 /5:22

Short answer: Hreflang is a tag that tells Google which pages are language or region versions of each other, such as your English page and its Spanish translation. Google then shows each searcher the most appropriate version. Each version must list itself and all the others, and the links must point both ways.

Hreflang codes that work and codes that don’t

Code What it targets Valid?
es Spanish speakers anywhere Yes
es-US Spanish speakers in the United States Yes
en-US English speakers in the United States Yes
x-default Searchers whose language you don’t list Yes
es-419 Spanish for Latin America No, Google doesn’t support it
US A region with no language No, the language is required

A code is a language from ISO 639-1, optionally followed by a region from ISO 3166-1 Alpha 2. Google names es-419 as unsupported, and a region on its own isn’t valid.

From Google Search Central, “Tell Google about localized versions of your page”, read November 3, 2026.

When to use hreflang

Google recommends it when your site is fully translated, such as English and Spanish versions of each page. It also helps when content in one language has small regional variations, or when only the menus and footer are translated.

Google may find your other language versions without it, but it says explicit tags are usually best. Translated pages don’t count as duplicates; only versions whose main content stays untranslated do.

The rules Google checks

You can declare versions in the HTML head, in HTTP headers or in your sitemap. Google treats the three methods as equivalent, and using all three brings no benefit in Search.

Each version lists itself and every other version, with full addresses that include http or https. If two pages don’t point to each other, Google ignores the tags, so another site can’t claim to be your translation.

Add an x-default version for unmatched languages, especially on language selectors or home pages that redirect.

How to add hreflang to your pages

  1. List each page with its versions, such as the English page and its Spanish translation.
  2. Choose the codes, such as en-US and es-US, from the ISO lists.
  3. In the head of each version, add one link element per version, including the page itself.
  4. Use full addresses, with http or https, in every href.
  5. Add an x-default link for searchers whose language you don’t list.
  6. Check that every version carries the same set of links, so each link has a return link.
  7. Give each version a canonical page in its own language.

Our guides to canonical tags and to XML sitemaps cover the two other places where language versions must agree.

What our own English and Spanish pages declare

We checked three pairs on November 3: the home page, the local SEO service and the robots.txt guide. In each pair, both versions list the same three links: en-US for English, es-US for Spanish and x-default pointing to English.

Each page also declares its language in the html lang attribute and names itself as canonical. We use es-US rather than es-419, the code Google doesn’t accept.

Before you publish a translation

  • Both versions list themselves and each other.
  • Every code is a valid ISO language, with an optional region.
  • Every href is a full address with http or https.
  • An x-default version is set.
  • The links sit inside a valid head section.
  • Each version’s canonical is in its own language.

RememberHreflang pairs your translations: every version lists all the others and itself, with valid codes and full addresses, and every link has its return link.

If you want us to check your English and Spanish pages, see our technical SEO service.

Quick answers about hreflang

Does hreflang tell Google what language my page is in?

No. Google says it doesn’t use hreflang or the HTML lang attribute to detect a page’s language; it uses its own algorithms. Hreflang tells Google which versions of a page belong together, so it can show the right one to each searcher.

Is es-419 a valid hreflang code?

No. Google supports language codes from ISO 639-1 and region codes from ISO 3166-1 Alpha 2, and it names es-419 as one that isn’t supported. Use es on its own, or a code such as es-US or es-MX.

What does x-default do?

It marks the page for searchers whose language you don’t list, often a home page that redirects or lets people pick a language. Google suggests it as a fallback, especially on language selectors and auto-redirecting home pages.

Are my English and Spanish pages duplicate content?

Not if the main content is translated. Google says localized versions count as duplicates only when the main content stays untranslated, such as a page where only the navigation and footer change language.

Why does Google ignore my hreflang tags?

The most common reason is a missing return link: if page X names page Y, page Y has to name page X too. Google also ignores codes outside the ISO lists and tags that sit outside a valid head section.

Sources

Read on November 3, 2026. Google Search Central: Tell Google about localized versions of your page and How to specify a canonical URL with rel="canonical" and other methods. Our own case: the tags of three English and Spanish pairs of our site, on November 3, 2026.

Pedro Galindez

Pedro Galindez

Founder of Feedback Studios, a bilingual growth studio in Miami.

Listen0:00 /5:22

More guides

Checked November 3, 2026

H1 tag: what it is and how to use headings for SEO

What the H1 tag is, how it differs from the title tag, what Google and MDN say about headings, seven steps and what our pages use.

Checked November 3, 2026

Noindex: what it does and how to keep a page out of Google

What noindex does, the meta tag and the X-Robots-Tag header, why robots.txt can hide it, seven steps and what our own site sends.

Checked November 3, 2026

Internal links: what they are and how to use them for SEO

What internal links do, the links Google can follow, how to write anchor text, seven steps to add them and what our own count found.

Checked November 3, 2026

Open Graph tags: what they are and how to control your link previews

What Open Graph tags do, the four every page needs, the image size and alt text, seven steps and what our own pages send.

Checked November 3, 2026

Google Ads conversion tracking: how to set it up in 2026

How Google Ads counts a conversion, how to set up website conversions step by step, calls, enhanced conversions, sales you close later and how to check it works.

Checked November 3, 2026

Click-through rate (CTR): what it is and how to raise yours

What click-through rate measures in Google Ads and Search Console, how to calculate it, what a good CTR is, seven steps and our own numbers.

Next step

Rather talk it through?

In a 20-minute call we look at your business and tell you what we would do first.