Extension:CanonURL

Adds the canonical links to the head of Mediawiki pages according to Google Canonicalization Content Guidelines to avoid duplicate content issues.

Introduction
Many of the Mediawiki installations out there uses Short URLs including Wikipedia. Almost all these installations makes the URLs short and easy to remember. However, this makes the content available in both long URLs and short URLs. For Example: Main Page of Wikipedia can be accessed from and Even though a normal user is not going to get disturbed by this issue, it can create major problems in search engine rankings.

There are two known methods to fix this issue:

1. Redirect long URLs to short URLs automatically or

2. Specify your canonical.

This extensions makes use of the second method, by specifying the canonical URL. In this method, content is still accessible through both the URLs, but the short URL is set as the canonical URL. Thus search engines will list short URLs only.

Installation

 * Copy the CanonURL directory into the extensions folder of your MediaWiki installation.
 * Add following lines to your LocalSettings.php file towards the end:
 * See Special:Version and confirm the presence of CanonURL under "Installed extensions", "other" category
 * Clear the cache of your browser
 * Reload any Mediawiki page
 * Check the HTML source and confirm the presence of following line before :

Configuration parameters
Change this URL according to your requirement.