International SEO With Hreflang: Technical Implementation

SEO with Hreflang technical implementation for websites targeting multiple languages and international audiences.

Hreflang is an HTML tag that informs Google which version of a web page to show when someone searches. It will be based on the user’s default language and location. This helps users to access the version made for them.

Quick summary: hreflang is an HTML attribute that ensures language and regional targeting match the location from which a website is accessed. It informs search engines which version to show to which audience.

 

John Mueller from Google has called hreflang one of the most complex parts of SEO.  

This article examines how hreflang works and how to implement it right. We will also go through the mistakes involving hreflang and how to fix them.

 

What does hreflang do?

If you have multiple language versions of the same website, hreflang establishes a connection between these versions. It basically tells Google that these versions have the same content but in different languages. And Google will responsibly pick the right one for the right audience.

Think about having two versions of an English page. One version is for the UK. The other is for Australia.

Add hreflang, and Google can sort out which page fits which audience. People in the UK get the UK page. People in Australia get the Australia page.

Without hreflang, Google may pick one page as the default. After that, the same page can be shown to everyone, even if the visitor is not in the target country.

It’s important to know what hreflang does not do. It doesn’t help with pages in the same language and region. It’s only relevant when you have genuine language or regional differences across your site.

 

When should you use hreflang?

If your site has any of the following, use hreflang.

  • There are multiple language versions of the same content.
  • Different versions of the same language targeting different countries (e.g., English for the US and English for the UK or Australia)
  • Subdomains, subdirectories, or separate domains that are language-specific.

 

Don’t use hreflang if you just have one language version of your site. It adds complexity with no benefit in that case.

 

What are the three ways to implement hreflang?

There are three valid methods.

Method 1: HTML head tags (most common)

Add the hreflang tags in the <head> section of the page. This works for HTML pages and is the most popular method.

A basic setup will look like this:

<link rel=“alternate” hreflang=“en” href=“https://example.com/en/” />

<link rel=“alternate” hreflang=“de” href=“https://example.com/de/” />

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

 

That last line, x-default, is the fallback. Google shows that version to anyone whose language or region doesn’t match the others. Always include it.

Method 2: XML sitemap

For large sites, adding hreflang tags to every page’s HTML head becomes difficult to manage. The sitemap approach puts all hreflang annotations in one place.

Each URL entry in the sitemap includes <xhtml:link> elements pointing to all alternate versions. Google’s official documentation on sitemaps covers the required format.

Method 3: HTTP headers

This method is only for non-HTML files, like PDFs. You add the hreflang information to the HTTP response headers rather than the page itself.

Most sites won’t need this. Use it only when the HTML head option isn’t available for your file type.

 

What are the rules that must never be broken?

These are not optional best practices. If any of these are missing, Google will likely ignore your hreflang tags entirely.

Rule 1: Every tag must be reciprocal

If your English page redirects to a French page, the French page should do the same. Basically, every version must be linked to every other version of the page.

So if your page has 3 versions, all three pages should include three hreflang tags. One tag pointing to itself and the other two pointing at the other pages.

Rule 2: Every page must self-reference

Every page should have a hreflang tag for its own URL. Not including a self-referencing tag causes that page to be excluded from the language cluster.

This is one of the most commonly missed rules. It looks unnecessary, but Google requires it.

Rule 3: Use absolute URLs only

Always write the full URL including https://. Relative URLs like /en/about are invalid in hreflang tags and will be ignored by Google.

Rule 4: Use correct ISO language and region codes

The two-letter language codes like “en, fr, de” are from ISO 639-1. If the region codes are needed, they come from ISO 3166-1 alpha-2. Like the US, GB, and AU.

For regions, use uppercase; for languages, use lowercase, as that is the approved format. When written together, it should be like language in lowercase, a hyphen, and region in uppercase.

Example: en-GB

 

How do you implement hreflang step by step?

Here’s a straightforward process that covers everything from setup to validation.

  1. Audit your existing content. List all the language and regional versions of your site. Know exactly which pages exist in which languages before you write a single tag.
  2. Map your URLs. Create a spreadsheet with every page and its corresponding alternate versions. This becomes your reference for building the tags correctly.
  3. Choose your implementation method. Pick one: HTML head, sitemap, or HTTP headers. For most sites, HTML head works fine. For large sites with hundreds of pages, the sitemap approach is easier to maintain.
  4. Build the tags with full reciprocity. Every page version must link to every other version, including itself. Use your URL map from step two to make sure nothing is missing.
  5. Make x-default the default option for each set. Add an x-default tag that links to your main page or default page. This covers users who do not have any specific language or region.
  6. Test prior to broadcasting. Before the tags get indexed, run a program such as Screaming Frog and use Google Search Console‘s International Targeting report to ensure that there are no errors.
  7. Submit your sitemap and monitor. Once it is launched, upload the sitemap to Google Search Console. Review the International Targeting report four weeks later for signs of errors.

 

What are the most common hreflang errors?

Most hreflang implementations have at least one of these errors. Here’s what they are, the problems they cause, and how to fix them.

Error Problem Fix
Missing reciprocal links Google ignores the entire hreflang cluster Every page version must link back to all others
No self-referencing tag That page gets excluded from the cluster Each page must include its own URL in the tag set
Relative URLs used Tags become invalid and are ignored Always use full absolute URLs with https://
Wrong language code format Region or language not recognised Use lowercase lang + uppercase country: en-GB, not en-gb
x-default missing No fallback for unmatched users Add x-default pointing to your primary page
Cross-language canonical Google consolidates to canonical, ignores hreflang Never set canonical from one language to another

 

How do you test and validate your hreflang setup?

Testing is not optional. Hreflang errors are silent: your site looks fine, but Google is ignoring the tags.

Here are the tools that actually work:

  • Google Search Console: Under legacy tools, go to the international targeting report. This targeting report will show the detected hreflang errors.
  • Screaming Frog SEO Spider: Finds missing hreflang tags as it crawls your website, highlighting missing self-references, return links, and incorrect language codes.
  • Merkle Hreflang Tag Tester: A free browser-based tool to validate hreflang syntax per page and correct it.

 

Run all three. They catch different things. Don’t rely on just one.

 

How Inter Smart approaches international SEO for clients

Hreflang errors are hard to spot but easy to make. A structural audit report is needed to spot these errors.

Inter Smart is an SEO company in Kochi with hands-on experience in international SEO for businesses targeting multiple markets and languages.

Inter Smart’s hreflang implementation is built to be easily maintainable. A setup that’s correct on launch but breaks six months later when new pages are added is not a good setup. The team works on embedding hreflang into the CMS workflow as applicable so that new pages automatically receive the proper tags.

Inter Smart is a specialised SEO company based in Kochi, serving businesses in Kerala, India, and businesses that are targeting international markets, from the UAE to the UK. If you have more than one language and/or country and your traffic is not showing that, then it is a technical issue.

Talk to Inter Smart. We will check your system, find out what’s wrong, and correct it.

 

Key Takeaways

  • Hreflang tells Google which language or regional version of a page to show to which user. It does not boost rankings directly.
  • The three valid implementation methods are HTML head tags, XML sitemap, and HTTP headers. Use only one across the whole site.
  • Hreflang tags you set must be reciprocal; every tag should point to the other version.
  • Use full URLs and correct ISO codes.
  • x-default should always be provided for audiences who belong to any other region.
  • The most frequently occurring mistakes are failure to include return links, failure to use self-references, and failure to use relative URLs. All three cause Google to discard all tags.
  • Before and after launching, use Google Search Console, Screaming Frog, and the Merkle Hreflang Tag Tester.
Recent Blogs

Do you want more?

Need guidance? Request a callback, and our expert will reach out at your convenience.