Do I need hreflang tags?
My site is structured somewhat like this:
mysite.com/en-us/producta
mysite.com/en-gb/producta
mysite.com/en-in/producta
I’ve been working on creating sitemaps with the hreflang tag. However, a provider of automated site map software told me that the hreflang tag is unnecessary because the language-country code (i.e. en-gb) is embedded in the URL and Google will recognize the intent for SEO. Is that true?
What about the hreflang tag’s protection against duplicate content?
edit: Here’s what part of an XML site map would look like:
<url>
<loc>http://www.example.com/en-us</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
<xhtml:link href="http://www.example.com/en-us" hreflang="x-default" rel="alternate" />
<xhtml:link href="http://www.example.com/en-in" hreflang="en-in" rel="alternate" />
<xhtml:link href="http://www.example.com/en-au" hreflang="en-au" rel="alternate" />
</url>
2
Answers
No, it is false. Google does not try to detect language from URLs. In your case, it is recommended to set
hreflang
.hreflang
helps Google with indexing. It is not a protection against duplicate content.If your content is automatically translated with Google translate (for example), it might be considered spammy.
Hreflang is a signal, not a directive. That means that other SEO factors may override the hreflang tag and cause a different version of your page to rank higher.
The hreflang tag on each page should include a reference to itself as well as to all the pages that serve as alternates for it. If your Spanish website sells Iberian ham to customers in Spain, France, and Portugal only, the hreflang tags for your homepage might look like this.
If your page serves up content in a variety of languages or just asks a user to select a preferred page, you can use x-default to show that the page is not specifically targeted.
**. That looks like this: