Canonical URL for Joomla 1.5 and 2.5

  • Friday, 04 July 2014 04:30
Written by 
Rate this item
(2 votes)

Canonical Meta tag is introduced to solve duplicate contents in a website. Suppose if you have a Joomla website and you have turned on the mod_rewrite settings and URL rewriting settings in your Global configuration, you will have your URL something like http://yoursite/some-page.html. Well that's it, NO...

You can still access this http://yoursite/some-page.html as http://yoursite/some-page. Well try that out. That's bad for SEO. What shall you do? Put redirect? No, that's not the right solution. Here Canonical URL will come to our rescue.

Joomla! 3 has settings for this and a few more free plugins to do this without hacking any codes. But what about Joomla! 2.5 and 1.5? A large number of websites run on these versions. Try searching for a free plugin to handle this and you will will come up with nothing or paid plugins( I also did the same thing once, lol).. You would not want to throw away a few $$ for this simple thing..

Well here is the solution, Download the attached zip file, extract it and upload it to the includes folder of your Joomla installation.

Then, head to your template index.php file or the head section of your template file(it will differ from template to template) and put the following lines of code snippet.

<?php include_once (JPATH_ROOT.DS.'includes'.DS.'canonical_tag.php');?>


That's it. Try visiting your http://yoursite/some-page.html and http://yoursite/some-page. Now, http://yoursite/some-page will have the canonical tag as

<link rel="canonical" href="http://yoursite/some-page.html">

Well, it tells Google or other search engine that both http://yoursite/some-page and http://yoursite/some-page.html are same .

How easy is that? Have any suggestions, don't hesitate to write it on the comments. We will appreciate that
Read 16277 times


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.


Anti-spam: complete the task

Our Services

  • Web Design & UX Design
  • eCommerce sites
  • Social Media Marketing
  • Joomla Upgrade and troubleshooting
  • Blogging
  • Website Maintenance

Latest Offer from eManipur!

Joomla   Upgrade Your Old Joomla Website For Free*.
   For More Information click on the Link Below.

Upgrade Joomla

Drop in here

Keishamthong Elangbam Leikai,
Imphal -795001,
Manipur, India

Emanipur Location

Call

+91 8131 05 0034

Subscribe to our Tips

Receive our tips and hacks right into your Inbox. We promise you, it will be be a unique experience for you.


Receive HTML?

Social Icon
Facebook    Linked In    Gplus     Twitter