The bretteleben.de "Canonical URL" Module for Joomla 1.5 allows to set selective the - supported by Google from this month on - "Canonical URLs" in the HEAD of single Pages. This helps to prevent being punished for delivering DuplicateContent and to concentrate PageRank to the main URL, if a page can be reached from different URLs.
bretteleben.de "Canonical URL" Module for Joomla 1.5
The bretteleben.de Canonical URL Module works with Joomla 1.5.
The module offers 10 pairs of parameters to modify the real URL and use the result to set the TAGs <link rel="canonical" href="/desired link">. Starting with version 1.1 it is possible to run multiple instances of the module against a page. They are executed in the order they are set in the backend.
New in Version 1.1:
- possibility to run multiple instances against one page
- replace single parts of the path
- remove unwanted GET-parameters
- set a fixed URL
- run multiple instances against one page
Installation and Usage
1.) Upload and install the Package.
2.) Activate the module for all or selected Menu-Items.
There are 10 pairs of parameters available.
Each pair consists of the text to search (1th part) and the text to replace with (2nd part).
Sample1: You use Joomfish but don't have translated all of your pages. To prevent getting punished for delivering DuplicateContent, you set the canonical URL of - not translated - pages to URL of the the main language.
Rule01: Find part of URL: lang-de (still delivers english content)
Rule01: Set part of URL: lang-en (this is your main language, we use it as canonical url)
Using this rule for pages - still delivered in english but reached in the section /lang-de/ - sets the canonical URL for this pages to /lang-de/ and prevents DuplicateContent.
Sample2: You use (as I do) yvComment, but don't want to get the pages with the request-parameters (start=10, 20, and so on) to get indexed to concentrate PageRank to the "main"-pages.
Rule02: Find part of URL: start=
Rule02: Set part of URL:
The text in the first part of this rule ends with an equal sign. This tells the module, that we want to modify a request-parameter. The module now replaces not only "start=" but includes the values (0,10,20,30,...) too. The whole parameter is replaced with the text given in the second part of the rule, in this sample: nothing, i.e. the whole parameter is removed from the URL.
Notice: You must not include ? or & (resp. & amp;). These are handled by the module automatically.
Sample3: You want to set for a special page a fixed canonical URL to be used for indexing the page, whatever parameters the page is called with.
Rule03: Find part of URL:
Rule03: Set part of URL: /my-desired-canonical-url.html
In this case the first part of the rule stays empty, this way telling the module that the complete (relative) URL is to replace.
The module works down the rules one by one and inserts the resulting URL as rel="canonical" URL into the head of your page(s).
The domain-part of the URL is NOT modified. This should be done by using redirects.
Bug-reports, Feature-Requests, Hints are highly welcome.
Please handle with care, because wrong settings (unreachable) may cause pages from dissapear from the Google-Index completely! Check every set rule within the source of the concerned page(s)!!!
The module is NO replacement for Joomlas SEF-plugin or an external SEF-extensions! It is only a supplementation!
A step by step tutorial will follow.
The module is used to set a canonical URL for the menu item Very Simple Image Gallery and removes the yvComment-parametrs, even when browsing the comments.
The module is tested successful with Joomla 1.5.6, 1.5.7 and 1.5.8. Anyway, using it aside with one or another existing plugin/modul/component may bring to light problems i haven't foreseen.
Again I suggest a test run before using it on a live site and stand by for your questions and suggestions.
The module is licensed under the GNU Public License (www.gnu.org/copyleft/gpl.html).
update Version: 1.1.0
Version 1.1.0 - 2009-03-29
- check if a canonical URL is already set by another instance and work with it
Version 1.0.0 - 2009-02-13
If you have questions or suggestions, please use the comment-function. Records about the behavior of this extension (positive or negative) are most welcome.
If you use this extensions, you have the possibility to post a rating and a review at joomlaos.de or extensions.joomla.org. Furthermore I appreciate everyone, supporting me with a link back to www.bretteleben.de on his/her website. The extension itself does not produce any hidden links, eastereggs or whatever.
The ZIP-archives contain the module, by downloading it you agree to the terms of the GNU Public License. The ZIP-Archive can be used for both, upgrade and fresh installation.