Last modified: 2014-05-23 08:50:22 UTC
Go to https://en.wikipedia.org/w/index.php?title=San_Francisco Canonical URL: <link rel="canonical" href="http://en.wikipedia.org/w/index.php?title=San_Francisco"> Go to https://en.wikipedia.org/wiki/San_Francisco <link rel="canonical" href="http://en.wikipedia.org/wiki/San_Francisco"> They are exactly the same resource though - so which one is the real canonical URL?
In wmf5 the canonical Tag isn't set, when the URL page isn't a redirect, if i'm right. Test: Redirect page: http://www.houseofcardswiki.de/OTA > Tag URL: /Over_the_Air -> redirect resource http://www.houseofcardswiki.de/index.php?title=OTA > Tag URL: /Over_the_Air -> redirect resource Content Page: http://www.houseofcardswiki.de/Over_the_Air > No Tag http://www.houseofcardswiki.de/index.php?title=Over_the_Air > No Tag Maybe it's a configuration setting (my wiki is clean without anything), because in MediaWiki is the same bug :)
My local wiki doesn't have a canonical link in the head in either case. Any idea what the purpose of that tag is?
If i see this right, canonical link will only be add, if the page requested by user is a redirect, so for example, the user requests /wiki/OTA which is a redirect to /wiki/Over_the_Air, so in the page will a canonical tag with "/wiki/Over_the_Air" added. That's so in the clean install, but not in mediawiki and wikipedia (wmf4 and 5).
This gives a good breakdown: http://moz.com/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps Essentially a canonical URL points to the one true URL for that content that search engines should index. In mobile http://en.m.wikipedia.org/wiki/Main_Page declares http://en.wikipedia.org/wiki/Main_Page as it's canonical URL (e.g. desktop site) We do this to stop mobile results for the same content showing up in search results. I can see this being less of a problem to Wikipedia, but for new projects like Wikivoyage we're probably not helping them rise up the rankings with this bug.