Don't send rel=canonical to variant-neutral page
authorTim Starling <tstarling@wikimedia.org>
Fri, 15 Aug 2014 08:08:46 +0000 (09:08 +0100)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 26 Aug 2014 21:38:40 +0000 (14:38 -0700)
commit91d8a518250e306915032bbfd55d1f06462b8c6e
tree7dd3fbaad68d1594c3fc98223b333e67c4399046
parent277348f440ae0611d15983aeb3390c2068548bf1
Don't send rel=canonical to variant-neutral page

This has been the subject of multiple complaints from Google, it
apparently prevents them from properly indexing the variant-specific
pages. Instead, send the variant-independent link as rel=alternate
hreflang=x-default, which is recommended by Google as the preferred way
of specifying "auto-redirecting homepages" in this help page:

https://support.google.com/webmasters/answer/189077?hl=en

Send rel=alternate links unconditionally, since that is also recommended
by that help page: "each language page must identify all language
versions, including itself".

Remove $wgCanonicalLanguageLinks since it would be rather pointless and
poorly named if it only controlled rel=alternate links.

Bug: 52429
Change-Id: Ic75717f6e4ac1f73aa600c2e1bdb9c60e607edb4
RELEASE-NOTES-1.24
includes/DefaultSettings.php
includes/OutputPage.php