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.
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.
If your site has any of the following, use hreflang.
Don’t use hreflang if you just have one language version of your site. It adds complexity with no benefit in that case.
There are three valid methods.
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.
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.
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.
These are not optional best practices. If any of these are missing, Google will likely ignore your hreflang tags entirely.
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.
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.
Always write the full URL including https://. Relative URLs like /en/about are invalid in hreflang tags and will be ignored by Google.
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
Here’s a straightforward process that covers everything from setup to validation.
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 |
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:
Run all three. They catch different things. Don’t rely on just one.
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.
Need guidance? Request a callback, and our expert will reach out at your convenience.