1001Ferramentas
🌍SEO

hreflang Generator

Generate hreflang tags for multilingual sites — tells Google which version to show by language/region (pt-BR, en-US, x-default, etc.). Everything in your browser.

Mapeamento idioma → URL (formato: pt-BR https://exemplo.com/pt)

Send each language to the right page

Your site has a Portuguese and an English version, and Google keeps serving the wrong one: Brazilians landing on the English page, Americans on the Portuguese one. hreflang tags exist for exactly this, but writing them by hand is tedious and typo-prone. Here you list one pair per line, in the format pt-BR space URL, and get the block of link rel=alternate tags ready to copy into your head section.

The classic hreflang trap is reciprocity: every version of the page must list all the others and itself. If page A points to B but B does not point back, Google ignores the whole pair. Another one: the code must be a language (ISO 639-1) plus an optional region (ISO 3166-1). Using just br is a common and costly mistake: br means Breton, not Brazil; the right code is pt-BR. The tool accepts whatever you type and silently skips malformed lines, so check that the output has as many tags as your input has lines.

Paste the same block into the head of every version of the page, trimming nothing. Add an x-default line pointing to your fallback version, the one to show visitors who match none of the listed languages. Make sure every URL returns a 200: hreflang pointing at a redirect or a 404 gets dropped. On sites with thousands of pages, consider declaring hreflang in the sitemap instead of the head. Everything is generated in the browser; nothing is sent to a server.

Frequently asked questions

Do the tags need to be on every version of the page?
Yes, and the block should be identical everywhere, including each page's reference to itself. Without reciprocity Google discards the annotations.
What is x-default for?
It is the version shown to visitors who match none of the declared languages, typically an international homepage or a language picker. Always worth including.
Can I use plain pt instead of pt-BR?
You can: pt covers any Portuguese speaker, while pt-BR targets Brazil specifically. Just never use br on its own, which is the code for the Breton language.

Related Tools