Last modified: 2014-05-23 08:50:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67402, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65402 - Canonical URL in link tag may not be an actual canonical URL
Canonical URL in link tag may not be an actual canonical URL
Status: NEW
Product: MediaWiki
Classification: Unclassified
Sites (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-16 16:11 UTC by Jon
Modified: 2014-05-23 08:50 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2014-05-16 16:11:00 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?
Comment 1 Florian 2014-05-22 16:56:51 UTC
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 :)
Comment 2 Ryan Kaldari 2014-05-22 17:09:39 UTC
My local wiki doesn't have a canonical link in the head in either case. Any idea what the purpose of that tag is?
Comment 3 Florian 2014-05-22 17:46:52 UTC
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).
Comment 4 Jon 2014-05-23 08:50:22 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links