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

Learn what hreflang tags are, how to implement them, and how they help with international and multi-language SEO.

Draft

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?

Yes. If you have example.com for English and example.es for Spanish, hreflang tags tell search engines these are related versions. Without hreflang, search engines treat them as separate sites. With hreflang, they understand the relationship and consolidate authority appropriately. With WEMASY's website builder, you can set this up directly on your website.

What is the difference between hreflang and canonical tags?

Canonical tags say "this page and that page are duplicates, rank this one." Hreflang tags say "this page and that page are alternate language versions, rank each for their language." They serve different purposes. Use canonical for duplicates. Use hreflang for language variants.

Should I use hreflang for regional dialects?

Yes, if you have different versions for different regions. English-US, English-UK, English-AU are different enough to warrant separate versions. Use hreflang="en-US", hreflang="en-GB", hreflang="en-AU" to differentiate them. This helps search engines serve the right version to the right region.

Can I use hreflang for paginated content?

No. Hreflang is for language and regional variants, not pagination. Paginated content (page 1, page 2, page 3) is not an alternate language version. Use rel="next" and rel="prev" for pagination instead. Use hreflang only for language and region variants.

How many hreflang tags should each page have?

One for each language version you offer, plus x-default. If you have English, Spanish, and French versions, each page has three hreflang tags (one per language) plus x-default. All versions reference all other versions. This creates a bidirectional relationship.

Will hreflang boost my rankings?

Not directly. Hreflang does not rank you higher. But it prevents duplicate content penalties and ensures search engines understand your site structure. By clarifying which version is for which language/region, hreflang helps each version rank better in its target market. Indirectly, proper hreflang improves rankings by consolidating authority.

Put it to work
on your own website.

Start free with WEMASY and build your site in a few minutes.