Page 1 of 1

The hreflang tag

Posted: Sat Dec 19, 2015 9:43 am
by filmphotog
I have a website where all pages have two languages. For every pair of pages I have this between the head tags:

Code: Select all

<link rel="alternate" href="http://mywebsite.com" hreflang="en">
<link rel="alternate" href="http://mywebsite.com/sv" hreflang="sv">
This connects pages with the same content in two languages (sub-pages have their own urls).

--

The question is for websites in just English, the webmaster tools complains "Your site has no hreflang tags". Is it possible to set this tag for one language sites?

Thanks :)

Re: The hreflang tag

Posted: Sat Dec 19, 2015 12:42 pm
by Pablo
I'm sorry I am not familiar with the hreflang tag.

Re: The hreflang tag

Posted: Sat Dec 19, 2015 1:29 pm
by filmphotog
Thanks. The hreflang tag is probably not used for a single language site.

Re: The hreflang tag

Posted: Tue Dec 29, 2015 1:43 pm
by filmphotog
Just a tip: The host may automatically change the link mywebsite.com/sv into this mywebsite.com/sv/ with the ending slash. Then the code should have the slash or a search engine can't find the pages.

Re: The hreflang tag

Posted: Wed Mar 02, 2016 7:51 am
by filmphotog
Here are more useful reading material on the hreflang topic, and a testing tool: http://hreflang.org/

And to answer my original question above the hreflang tag is only useful two or more languages. It can also be used for targeting different regions (for example en-AU and en-CA) but if all English pages has the same content Google may decide to show just one version in search.

Re: The hreflang tag

Posted: Wed Mar 02, 2016 9:55 am
by filmphotog
Additional info,

- For a generic .com site in English with a Spanish language .com/es/ alternative, only a single link on each page to the alternative should be enough (self-referencing is not necessary). It's ok to have two hreflang tags like my example above though.

- For multiple language sites all sets of hreflang tags should be the same on the pages, including self-referencing.

Reference doc: https://support.google.com/webmasters/a ... 9077?hl=en