0

When implementing hreflang in the head section, do you call out the alternative and main language on every single page?

So for example if I'm implementing Brazilian Portuguese where the main language of the site is English, for my English site it would place the following in the head section:

<link rel="alternate" href="http://example.com/about" hreflang="en-US" />
<link rel="alternate" href="http://example.com/about" hreflang="en" />
<link rel="alternate" href="http://example.com/pt-br/about" hreflang="pt-br" />

Then for the Portuguese site it would be:

<link rel="alternate" href="http://example.com/pt-br/about" hreflang="pt-br" />
<link rel="alternate" href="http://example.com/pt-br/about" hreflang="pt" />
<link rel="alternate" href="http://example.com/about" hreflang="en" />
1

Yes that is how Google know it.

But use only one line out of these two lines,

<link rel="alternate" href="http://example.com/about" hreflang="en-US" />
<link rel="alternate" href="http://example.com/about" hreflang="en" />

because it is pointing to same URL. I can't say weather it is harmful or not for SEO but if Google have any testing tool for hreflang then it will trigger some error on that. So If your webpage completely written in US English language then keep it first line otherwise choose second one.

Same apply to Portuguese hreflang links. On this Google official article you can see one example about that.

It's a good idea to provide a generic URL for geographically unspecified users if you have several alternate URLs targeted at users with the same language, but in different locales. For example, you may have specific URLs for English speakers in Ireland (en-ie), Canada (en-ca), and Australia (en-au), but want all other English speakers to see your generic English (en) page, and everyone else to see the homepage. In this case you should specify the generic English-language (en) page for searchers in, say, the UK. You can annotate this cluster of pages using a Sitemap file or using HTML link tags like this:

<link rel="alternate" href="http://example.com/en-ie" hreflang="en-ie" />
<link rel="alternate" href="http://example.com/en-ca" hreflang="en-ca" />
<link rel="alternate" href="http://example.com/en-au" hreflang="en-au" />
<link rel="alternate" href="http://example.com/en" hreflang="en" />
  • I currently only have 1 English version of the site which is our main version. So I'm thinking that using hreflang="en" would be the way to go for mey defaults. – brandozz Nov 9 '16 at 17:42
  • But you're point same URL with two different English language, which is not right. That's why I given example at last, so you will get it what I want to say. – Goyllo Nov 9 '16 at 18:31
  • Sorry if I didn't explain properly...I would just use one version for English hreflang="en" not both – brandozz Nov 9 '16 at 19:05
  • If I have a translation for Portuguese in Brazil, does it make sense to target Portugal with the same translation? – brandozz Nov 10 '16 at 20:06
  • and if that's the case do I bother with location targeting? – brandozz Nov 10 '16 at 20:16
0

Yes, hreflang links must be identical for all pages in the cluster. And like @Goyllo said, use only 1 version because what you have right now is redundant. Your hreflangs should be like this on both pages:

<link rel="alternate" href="http://example.com/about" hreflang="en" />
<link rel="alternate" href="http://example.com/pt-br/about" hreflang="pt" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.