Adding support for the canonical value of the rel attribute of the link tag in Apache Roller blogging software
Some of the major search engines (Google, MSN and Ask) have come up with a way to get around issues of canonicalisation. Canonicalisation is where a page can be assessed from multiple URL's and to a search engine this is bad as they see the same page twice at different URL's and penalise you because you have duplicate content.
Hunting through Apache Roller .vm files I found that you can add the canonical value as follows. For the weblog.vm file add this into the head of the template:
<link rel="canonical" href="$url.home"/>
and for the permalink.vm template file add this:
<link rel="canonical" href="$url.trackback($model.weblogEntry.anchor)"/>
and you should have no more canonicalisation issues with Roller for the search engines that support this value in the rel attribute of the link tag.
06.03.2009 07:46 - Posted by doahh - Comments: 0 - Java

Comments: