What are hreflang tags and how do they work in international SEO?

Home / Everything About / Everything About SEO / What are hreflang tags and how do they work in international SEO?

You serve the same content in multiple languages. You have versions of your site for different countries. Without hreflang tags, search engines get confused. They see multiple versions of the same page and do not know which one is for which audience. Hreflang tags tell search engines which page is for which language and region. They prevent duplicate content issues and ensure users see the right version.

What are hreflang tags?

Hreflang tags are HTML links that tell search engines which page is meant for which language and region. They look like this:

<link rel="alternate" hreflang="en" href="https://example.com/page">
<link rel="alternate" hreflang="es" href="https://example.com/es/page">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page">

This tells search engines: "This page is the English version. Here is the Spanish version. Here is the French version. Show each version to speakers of that language."

You add hreflang tags to the head of each page. Every language version includes tags pointing to all other versions (including itself).

Why hreflang tags matter

Without hreflang tags, search engines see multiple pages with similar or identical content. They may index all versions or pick randomly. Users may see the wrong language version. This creates duplicate content issues and confusion.

Hreflang tags consolidate ranking power. Instead of splitting authority across ten language versions, all versions share authority for their respective languages and regions. English users see the English version ranked. Spanish users see the Spanish version ranked.

Hreflang tags improve user experience. Spanish speakers in Spain see the Spanish version. English speakers in the US see the US English version. Users get content in their language.

How to structure hreflang tags

Use language codes (en, es, fr, de) or language-region codes (en-US, en-GB, es-ES, es-MX).

Language codes are simpler (en means any English). Language-region codes are more specific (en-US is American English, en-GB is British English).

If you serve English globally, use hreflang="en". If you serve American English specifically, use hreflang="en-US".

Always include a self-referential hreflang tag. The English version should have hreflang="en" pointing to itself. This tells search engines "this is the primary English version."

Include an x-default tag for users whose language or region is not covered. Example:

<link rel="alternate" hreflang="x-default" href="https://example.com">

This says "if the user's language is not in our hreflang list, show them this version."

Implementation methods

HTML head tags are the most common. Add <link rel="alternate" hreflang="..."> tags to the head of every page that has alternate versions.

Sitemap method: Include hreflang information in your XML sitemap. Each URL entry can list alternate versions.

HTTP header method: Send hreflang information in HTTP headers. This works for PDFs and non-HTML content.

Most sites use the HTML head method because it is simplest. Use your CMS to generate these tags automatically if possible.

Common hreflang mistakes

Forgetting self-referential tags. Each page should include a tag pointing to itself. English page should have hreflang="en" pointing to itself.

Inconsistent implementation. If English page links to Spanish version but Spanish page does not link back to English, hreflang is broken. All versions must reference all other versions.

Wrong language codes. Using "english" instead of "en". Using "US" instead of "en-US". Use standard ISO language codes.

Missing x-default. If your site serves visitors in countries you do not have specific versions for, include x-default to show them a default version.

Pointing to non-canonical URLs. If hreflang points to a URL that is not canonical, search engines may not follow the relationship. Always point to canonical URLs.

Hreflang vs geotargeting settings

Hreflang tags and Google Search Console geotargeting settings work together. Hreflang tags tell search engines which page is for which language. Geotargeting in GSC tells Google which country you are targeting.

If you have example.com/es/ for Spanish speakers in Spain, use hreflang="es-ES" and set geotargeting to Spain in GSC.

If you have example.com/es/ for Spanish speakers globally, use hreflang="es" and do not set country-specific geotargeting.

Frequently asked questions

Do I need hreflang tags if I use different domains?

What is the difference between hreflang and canonical tags?

Should I use hreflang for regional dialects?

Can I use hreflang for paginated content?

How many hreflang tags should each page have?

Will hreflang boost my rankings?