Hreflang for Portuguese: pt-BR vs pt-PT

How to use hreflang tags for Portuguese content. Covers pt-BR vs pt-PT, when to use pt alone, implementation examples in HTML and sitemaps, x-default strategy, and common mistakes.

Portuguese is one of the trickiest languages to handle with hreflang. Not because the syntax is hard, but because the language itself has two major variants that differ enough to matter for search: Brazilian Portuguese and European Portuguese. If you run a site that serves both audiences, getting the hreflang tags right is the difference between Google showing the correct version and Google guessing wrong.

This guide covers the exact codes you need, when to use them, and how to avoid the mistakes that trip up most implementations. For the full hreflang specification, see our comprehensive hreflang guide.

Why Portuguese needs special attention

Portuguese is the sixth most spoken language in the world. Over 250 million people speak it, spread across multiple continents. But the two dominant markets -- Brazil and Portugal -- use noticeably different versions of the language.

Brazilian Portuguese and European Portuguese differ in vocabulary, spelling, grammar, and pronunciation. After the 2009 Portuguese Language Orthographic Agreement tried to unify spelling, differences still remain in everyday usage. A Brazilian reader can understand a Portuguese text and vice versa, but the experience feels off. It's like an American reading a webpage written in British English -- technically the same language, but the phrasing and word choices feel foreign.

For search engines, this matters. Google wants to serve the most relevant version of your content to each user. If you have pages tailored for Brazilian and Portuguese audiences, hreflang tells Google which is which. Without it, Google has to guess based on signals like ccTLD, server location, and content analysis. Those guesses are often wrong.

The correct language and region codes

Hreflang uses ISO 639-1 for language codes and ISO 3166-1 alpha-2 for region codes. For Portuguese, you have three options:

pt -- Portuguese (no region)

Use pt when you have a single Portuguese page that isn't tailored to any specific region. This is generic Portuguese, and Google will treat it as applicable to all Portuguese-speaking users regardless of location.

<link rel="alternate" hreflang="pt" href="https://example.com/pt/page" />

pt-BR -- Brazilian Portuguese

Use pt-BR when your content is specifically written for a Brazilian audience. This includes Brazilian spelling conventions, local vocabulary, currency (BRL), and references relevant to Brazil.

<link rel="alternate" hreflang="pt-BR" href="https://example.com/pt-br/page" />

pt-PT -- European Portuguese

Use pt-PT when your content is specifically written for a Portuguese (European) audience. This covers Portugal-specific spelling, vocabulary, currency (EUR), and local context.

<link rel="alternate" hreflang="pt-PT" href="https://example.com/pt-pt/page" />

For a full list of valid codes, see the hreflang language codes reference.

When to use pt alone vs pt-BR and pt-PT

This is where most people get confused. Here's a simple decision framework:

You have one Portuguese version of your content. Use pt. Don't add a region code. Google will serve this page to all Portuguese-speaking users.

You have separate versions for Brazil and Portugal. Use pt-BR and pt-PT. Both pages need hreflang tags pointing to each other and to themselves.

You have versions for Brazil, Portugal, and other Portuguese-speaking countries (Angola, Mozambique, etc.). Use pt-BR for Brazil, pt-PT for Portugal, and consider pt as a fallback for everyone else. Or use specific region codes like pt-AO for Angola if you have truly localized content for those markets.

You have a Brazilian version and a generic version. Use pt-BR for the Brazilian content and pt for the generic version. Users in Brazil get the Brazilian page. Everyone else gets the generic one.

The key rule: never use pt-BR and pt-PT without including both in the hreflang cluster. If you only tag one, Google can't form the bidirectional relationship it requires.

Implementation examples

HTML link tags

The most common method. Place these in the <head> of every page in the cluster. Here's an example for a site with Brazilian Portuguese, European Portuguese, English, and a fallback:

<link rel="alternate" hreflang="en" href="https://example.com/en/about" />
<link rel="alternate" hreflang="pt-BR" href="https://example.com/pt-br/about" />
<link rel="alternate" hreflang="pt-PT" href="https://example.com/pt-pt/about" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/about" />

Every page in this cluster -- the English page, the Brazilian page, and the Portuguese page -- must contain all four of these tags. That includes the self-referencing tag. Missing the self-reference is a common mistake. See the full implementation guide for more detail, and check our HTML examples for additional patterns.

XML sitemap

If you prefer to keep hreflang out of your HTML, you can declare it in your XML sitemap using the xhtml:link element:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://example.com/pt-br/about</loc>
    <xhtml:link rel="alternate" hreflang="pt-BR"
                href="https://example.com/pt-br/about" />
    <xhtml:link rel="alternate" hreflang="pt-PT"
                href="https://example.com/pt-pt/about" />
    <xhtml:link rel="alternate" hreflang="en"
                href="https://example.com/en/about" />
    <xhtml:link rel="alternate" hreflang="x-default"
                href="https://example.com/en/about" />
  </url>
  <url>
    <loc>https://example.com/pt-pt/about</loc>
    <xhtml:link rel="alternate" hreflang="pt-BR"
                href="https://example.com/pt-br/about" />
    <xhtml:link rel="alternate" hreflang="pt-PT"
                href="https://example.com/pt-pt/about" />
    <xhtml:link rel="alternate" hreflang="en"
                href="https://example.com/en/about" />
    <xhtml:link rel="alternate" hreflang="x-default"
                href="https://example.com/en/about" />
  </url>
</urlset>

Each <url> block must contain the full set of alternate links, including the self-reference. This approach works well for large sites where modifying the HTML template isn't practical.

x-default strategy for Portuguese sites

The x-default tag tells Google which page to show when no hreflang value matches the user's language and region. For Portuguese sites, your x-default strategy depends on your site structure.

Multilingual site with Portuguese as one language among many. Point x-default to your English page or your language selector page. Portuguese-speaking users will be directed to pt-BR or pt-PT by the specific hreflang tags. Everyone else lands on x-default.

Portuguese-only site with both pt-BR and pt-PT. Point x-default to whichever version you consider your primary audience. If most of your traffic comes from Brazil, x-default should point to pt-BR. If your audience is primarily European, use pt-PT.

Portuguese-only site with a single version. You might not need x-default at all, since there's only one version. But including it is never harmful and makes your intent explicit.

The common mistake here is omitting x-default entirely. While it's technically optional, leaving it out means Google decides on its own which version to show users who don't match any hreflang tag. That's a gamble.

Handling other Portuguese-speaking markets

Beyond Brazil and Portugal, Portuguese is an official language in Angola, Mozambique, Cape Verde, Guinea-Bissau, Sao Tome and Principe, East Timor, and Macau. If you have localized content for any of these markets, you can use their ISO 3166-1 region codes:

  • pt-AO -- Angola
  • pt-MZ -- Mozambique
  • pt-CV -- Cape Verde
  • pt-TL -- East Timor
  • pt-MO -- Macau

In practice, very few sites create content specifically for these markets. Most use pt-BR for Brazilian audiences, pt-PT for European audiences, and one of those as a fallback for everyone else. That's a perfectly reasonable approach. You don't need a separate version for every Portuguese-speaking country unless your content genuinely differs for those audiences.

Common mistakes with Portuguese hreflang

Using pt-br instead of pt-BR

The language code is lowercase (pt), but the region code should be uppercase (BR). While Google's documentation says the tag is case-insensitive, the ISO standard uses uppercase region codes, and matching the standard avoids any ambiguity. Be consistent.

Forgetting the return link

If your pt-BR page points to your pt-PT page, the pt-PT page must point back to pt-BR. This is the bidirectional requirement that applies to all hreflang implementations, and it's the single most common error across all languages. Read more about this in our common mistakes guide.

Using pt when you should use pt-BR or pt-PT

If you have content tailored for Brazil, tag it as pt-BR, not pt. Using pt tells Google this content is for all Portuguese speakers, which isn't true if the page contains Brazilian-specific pricing, references, or vocabulary. Be specific when your content is specific.

Missing the self-referencing tag

Your pt-BR page must include a tag pointing to itself with hreflang="pt-BR". Your pt-PT page must include a tag pointing to itself with hreflang="pt-PT". Skipping the self-reference breaks the cluster.

Mixing implementation methods

Pick one method -- HTML link tags, XML sitemap, or HTTP headers -- and use it consistently. Don't declare some hreflang relationships in your HTML and others in your sitemap. Google can get confused when the same relationship is declared differently in different places.

Test before you launch

After implementing hreflang for your Portuguese pages, validate the tags using a crawler or hreflang checker. One broken return link or typo in a region code can silently invalidate the entire cluster. Automated validation catches problems that manual review misses.

Putting it together

Portuguese hreflang boils down to a few decisions. If you have one Portuguese version, use pt. If you have separate content for Brazil and Portugal, use pt-BR and pt-PT. Always include return links, self-references, and an x-default fallback. Validate everything before going live.

The syntax is simple. The discipline of keeping it consistent across every page on your site is the hard part.

Generate your Portuguese hreflang tags

Create correct pt-BR and pt-PT hreflang markup in seconds. Validates return links and language codes automatically.

Try Hreflang Generator

References

Generate perfect hreflang tags

Create and validate hreflang markup for your multilingual site. Free.

Try Hreflang Generator