/lesson-26

International SEO: Hreflang Tags and Geo-Targeting

Learn international SEO: choose between ccTLDs, subdirectories and subdomains, implement hreflang correctly, and avoid IP-based redirects.

Lesson 26 of 3015 min readUpdated Sep 27, 2026

Key takeaways

  • Choose a structure: ccTLDs give the strongest country signal, subdirectories keep authority on one domain.
  • Hreflang tells Google which language or country version to show; codes are ISO 639-1 plus optional ISO 3166-1 (GB, not UK).
  • Every version must reference itself and all the others, plus an x-default fallback.
  • Never force-redirect by IP; offer a language switcher and give each version a self-referencing canonical.

Going global is one of the most complex technical challenges in SEO. If you get it right, you open up new markets. If you get it wrong, you create massive duplicate content issues and dilute your authority across dozens of pages.

International SEO is essentially about teaching Google to serve the right version of your site to the right user based on their Language and Location.

1. The Foundation: URL Architecture

Before you write a single line of code, you must decide how to structure your international domains. There are three main options, each with a tradeoff between "Signal Strength" and "Authority."

StructureExampleProsConsBest For
ccTLDsexample.frStrongest geo-signal. Users trust it more.Expensive. Splits authority (you start SEO from zero for each country).Large brands with massive budgets & local offices.
Subdirectoriesexample.com/fr/Consolidates authority. New pages rank faster. Easy to manage.Weaker geo-signal (requires hreflang).Most businesses (Recommended).
Subdomainsfr.example.comEasy to set up on different servers/CMSs.Google often treats subdomains as separate sites (authority split).SaaS apps or when using different tech stacks.

Many companies choose subdirectories (example.com/fr/) because building authority on one domain is easier than managing many separate domains.

2. Hreflang Tags: The "Rosetta Stone"

Hreflang is a code attribute that tells Google: "These two pages are the same content, but one is for English speakers in the UK and the other is for English speakers in the US."

Without hreflang, Google sees two nearly identical pages and filters one out as "Duplicate Content." With hreflang, it keeps both and swaps them in the search results based on the user's location.

The Syntax

The tag follows this structure:

<link rel="alternate" hreflang="lang-country" href="URL" />
  • Language Code: Must use ISO 639-1 format (e.g., en, es, fr).
  • Region Code (Optional): Must use ISO 3166-1 Alpha 2 format (e.g., US, GB, CA).

Common Code Mistakes

  • UK vs. GB: The code for the United Kingdom is GB, not UK.
  • EU: There is no region code for "Europe" or "Latin America." You must target specific countries.

3. Implementation Rules

For hreflang to work, follow these three rules. If you break them, Google may ignore some or all of your hreflang annotations.

Rule A: The "Return Tag" (Bidirectional)

If Page A links to Page B as its translation, Page B must link back to Page A.

Analogy: If you list me as your brother, I must also list you as my brother for the relationship to be verified.

Rule B: Self-Referencing

Every page must include a hreflang tag pointing to itself.

Rule C: The "x-default" Tag

This is your safety net. It tells Google where to send users who don't match any of your specific languages (e.g., a user from Turkey visiting your US/UK site).

Example Code Block (Placed in <head>):

Scenario: A site targeting the USA, UK, and a generic English fallback.

<link rel="alternate" hreflang="en-us" href="https://example.com/us/product" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/product" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/product" />

4. XML Sitemaps: The Clean Solution

Google accepts hreflang in the page head, in HTTP headers or in your XML sitemap; all three work. For large sites, the sitemap keeps your HTML lighter and is easier to manage from a database.

Example Sitemap Entry:

<url>
  <loc>https://example.com/us/page</loc>
  <xhtml:link rel="alternate" hreflang="en-gb" href="https://example.com/uk/page"/>
  <xhtml:link rel="alternate" hreflang="en-us" href="https://example.com/us/page"/>
  <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/en/page"/>
</url>

Note: This keeps your HTML code lightweight and allows you to manage languages via a database script.

5. Geo-Targeting & User Experience

Deprecation of GSC "International Targeting"

Google removed the "International Targeting" report from Search Console in late 2022. You can no longer manually tell Google "This folder is for France."

Implication: Your URL structure, hreflang tags and the content itself (language, currency, local details) are now the main signals you control. Be precise.

Avoid Automatic Redirects

Never automatically redirect a user based on their IP address.

  • Why? Googlebot usually crawls from the USA. If you force-redirect all US IPs to example.com/en-us/, Googlebot will never see your French or German pages. It will think they don't exist.
  • Solution: Show a "Language Switcher" banner (popup) asking the user if they want to switch, but let them stay on the current URL if they choose.

Checklist for Launch

  • Validation: Use a tool like Screaming Frog to crawl your site and check for "Missing Return Tags."
  • Canonical Tags: Ensure each language page has a canonical tag pointing to itself, not to the main English version.
    Correct: /fr/page canonical -> /fr/page
    Incorrect: /fr/page canonical -> /en/page (This tells Google to de-index the French page).

/tools/hreflang-generator

Try it now: Hreflang tag generator

Generate the tags for your own language versions, including the self-reference and x-default this lesson describes.

Create hreflang tags or sitemap entries for every language version of a page.