SEO addition rel="alternate" hreflang in head()

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

SEO addition rel="alternate" hreflang in head()

Post by svasti » Sat Jun 28, 2014 5:49 pm

Concerning the discussion on http://www.cmsimpleforum.com/viewtopic. ... =10#p42129 I wonder if it would make sense to add into the head() dynamically something like

<link rel="alternate" hreflang="x-default" href="http://www.example.xx" />
<link rel="alternate" hreflang="de" href="http://www.example.xx/de/" />
<link rel="alternate" hreflang="fr" href="http://www.example.xx/fr/" />

when the cms finds sublanguages. The x-default would have to be set manually I guess.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: SEO addition rel="alternate" hreflang in head()

Post by cmb » Sun Jun 29, 2014 11:07 am

svasti wrote:<link rel="alternate" hreflang="x-default" href="http://www.example.xx" />
<link rel="alternate" hreflang="de" href="http://www.example.xx/de/" />
<link rel="alternate" hreflang="fr" href="http://www.example.xx/fr/" />
Basically, I like the idea. However, I'm not sure, if the general links are sufficient and after all correct. What about deep links? Won't they require to be identical for all languages? Consider http://www.example.com/?Welcome and http://www.example.com/?Willkommen; how could a search engine know that this is the same page in different languages? Maybe that is not necessary at all. :?
svasti wrote:The x-default would have to be set manually I guess.
We could take it from $cf['language']['default'].

Anyway, I put it on the 1.6.4 roadmap.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: SEO addition rel="alternate" hreflang in head()

Post by svasti » Sun Jun 29, 2014 6:15 pm

cmb wrote:Consider http://www.example.com/?Welcome and http://www.example.com/?Willkommen; how could a search engine know that this is the same page in different languages?
I guess it's not necessary to consider deep links.
cmb wrote:
svasti wrote:The x-default would have to be set manually I guess.
We could take it from $cf['language']['default'].
Not so in my case: German being the default language, but I'd like the English pages being set as x-default, for if somebody, say from China, visits my pages, he probably would want to go to the English pages.
I think usually people will have English as x-default. So we could avoid an additional config setting, with the following rule:

If English is the default language or if English is the language of a subsite, x-default will be English
else if there are subsites, the default language is the x-default
else if there are no subsites, no hreflang entries will be generated.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: SEO addition rel="alternate" hreflang in head()

Post by cmb » Tue Jul 01, 2014 7:26 pm

svasti wrote:I guess it's not necessary to consider deep links.
Indeed, Google doesn't mention that in their explanation.
svasti wrote:Not so in my case: German being the default language, but I'd like the English pages being set as x-default, for if somebody, say from China, visits my pages, he probably would want to go to the English pages.
Um, I'm not sure that any x-default is appropriate for our purposes:
Google Webmaster wrote:Finally, the reserved value "x-default" is used for indicating language selectors/redirectors which are not specific to one language or region, e.g. your homepage showing a clickable map of the world.
We do not have any language redirectors or language selectors on a separate page.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: SEO addition rel="alternate" hreflang in head()

Post by svasti » Wed Jul 02, 2014 10:13 am

cmb wrote:Um, I'm not sure that any x-default is appropriate for our purposes:
Makes it even easier for us, when we don't use it. So just the languages that are on the site. No need for any additional config value.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: SEO addition rel="alternate" hreflang in head()

Post by cmb » Wed Dec 10, 2014 7:20 pm

cmb wrote:
svasti wrote:I guess it's not necessary to consider deep links.
Indeed, Google doesn't mention that in their explanation.
It seems I read to fast. The expandable example at the end of the article uses deep links. Furthermore they are talking about language pages and not sites. This is backed by #2 of http://www.ranking-check.de/blog/hrefla ... l-of-fame/.

It seems that hreflang is not yet standardized or even in the progress becoming so (CMIIW), so that we could check the facts. As I'd rather not risk to put potentially confusing or even faulty hreflang links on all CMSimple pages, I'll vote "later".
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply