Local & International · Glossary · Updated May 2026

Locale targeting

Definition

Locale targeting is the practice of targeting a specific language + region combination — `en-US`, `en-GB`, `es-MX`, `es-ES`, `pt-BR`, `pt-PT`. It's the canonical unit [hreflang](/blog/hreflang) operates on and the right granularity when content varies by region within a language.

Find related

Long definition

A locale is the pairing of a language code (ISO 639-1) and a region code (ISO 3166-1 alpha-2). es-ES is Spanish-as-spoken-and-priced-for-Spain; es-MX is Spanish-for-Mexico; es-AR is Spanish-for-Argentina. The same Spanish-speaking visitor in Madrid and Buenos Aires should land on different pages — different prices, different legal disclosures, different vocabulary, different phone number formats — and locale targeting is how the site signals that to Google.

The mechanism is hreflang. Each locale variant gets its own URL (typically a subdirectory: /es-es/, /es-mx/, /es-ar/) and the page declares its locale plus the locales of its siblings:

<link rel="alternate" hreflang="es-ES" href="https://example.com/es-es/page" />
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/page" />
<link rel="alternate" hreflang="es-AR" href="https://example.com/es-ar/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />

Critically, hreflang's region code uses ISO 3166-1 alpha-2, which means es-419 (UN region code for Latin America) was not accepted historically. Google added support for es-419 and a handful of macro-region codes more recently, but es-MX for Mexico and es-ES for Spain remain the safer canonical patterns.

Locale targeting differs from language targeting in granularity. hreflang="es" says "any Spanish speaker" — useful when the same content serves all Spanish markets. hreflang="es-MX" says "Spanish speakers in Mexico specifically" — necessary when the page differs by country.

When to choose locale over language: regional pricing differences, legal/regulatory requirements (GDPR vs LATAM data laws), local phone/address fields, regional vocabulary that changes meaning ("coger" in Spain vs Mexico), shipping rules, payment methods. When the content genuinely is the same across all regions of a language, language-only targeting is simpler and avoids the cross-canonical complexity.

The most common implementation failure is asymmetric hreflang — page A links to B, but B doesn't link back to A. Google requires reciprocity; missing return links cause hreflang clusters to be ignored. Search Console's International Targeting report flags these.

Common misconceptions

  • "es-MX automatically ranks for es queries everywhere." Hreflang chooses among declared variants; if no general es page exists, Google picks the closest locale match for each user. Without x-default or a language-only entry, the choice can be unpredictable.
  • "Locale targeting requires separate ccTLDs." It doesn't. Subdirectories on a single gTLD (example.com/es-mx/) work fine when paired with proper hreflang and localization.
  • "Region code is optional." It is — but if you write hreflang="es" you're targeting language only, not locale. Don't conflate the two.
  • "hreflang fixes geotargeting." It signals locale match. Geotargeting is broader (see geotargeting) and depends on additional signals beyond hreflang.