hreflang: the SEO mistake that breaks bilingual sites
Without hreflang, Google treats /pt and /en as duplicate content and picks a version on its own. How to do it right — reciprocal, with x-default — and the different-slug trap that points to a URL that does not exist.
A bilingual site without hreflang is the most common SEO mistake — and one of the most expensive. Without that signal, Google treats /pt and /en as duplicate content, picks one version on its own and serves it to everyone. The Brazilian visitor lands on English, or the duplicated text dilutes the authority of both pages.
Hreflang fixes this by stating explicitly which version serves which language and region. The rule has two parts that are almost always forgotten together: it must be reciprocal and it must have an x-default.
Reciprocal and with x-default
Reciprocal means every page points to all versions — including itself. If the PT page points to the EN one but the EN does not point back, Google ignores the pair. The x-default is the version that serves anyone who does not match a listed language: visitors arriving with no clear preference.
// Every page declares ALL versions — reciprocal + x-default.
export const alternates = {
canonical: 'https://site.dev/en/blog/post',
languages: {
'pt-BR': 'https://site.dev/pt/blog/post',
'en': 'https://site.dev/en/blog/post',
'x-default': 'https://site.dev/pt/blog/post',
},
}The different-slug trap
This is where the silent bug lives. Hreflang is often built assuming both versions share the same slug — just swapping the language prefix. But if the Portuguese post has one slug and the English another (the normal case, when each is actually written), the hreflang points to a URL that does not exist. Google finds a 404 where the translation should be and drops the pair — cancelling the very benefit you were after.
The fix is to look up the real slug of the other version (through the translation reference between them), not to assume it is the same. The same care applies in the sitemap: each post’s entries must declare the language alternates too, with the real URLs.
- Every page points to all versions, including itself.
- Always an x-default, for those who match no listed language.
- Use each language’s real slug — never assume PT and EN share one.
Hreflang is not advanced-SEO decoration: it is what keeps Google from choosing wrong on your behalf. On a site that speaks two languages, it is the difference between being found in the right one and competing against your own translation.