Earlier this month a new <link> tag parameter became available with the purpose of providing search engines with the definitive URL for pages. I have created a (hugely) basic plugin which will generate these tags for you, so long as your site’s URL structure is completely segment-based. 99.99% of EE sites will be.
To see why you should bother with this see Google’s documentation, Matt Cutts’ writeup and SEOmoz, which describes it as ‘The Most Important Advancement in SEO Practices Since Sitemaps’.
To implement the plugin just upload it and add {exp:canonical_tag} within your <head> tags.
Hi! Interesting plugin. I put this on my templates… Quick question: How is this different than just outputting the URL to the page you are on? As far as I can see, the cononical link is the same as the URL in the location bar. Why can’t google use that? Thanks! Micky
EE does do a very good job of generating consistent links, but you can’t control every link to every page on your site and this is basically a simple means of telling search engines which one is correct.
For example, I can be pretty much certain that it would be possible to access a single page on your site via all of the following URLs:
What this plugin does is ensure that the correct address, in this case http://www.example.com/seg1/seg2/, is output as the canonical tag setting irrespective of which URL variation is accessed.
The links in my first post all do a much better job of describing it than me, however.
The links in my first post all do a much better job of describing it than me, however.
Hi!
I do not mean to sound like I dislike your plugin… I like it a lot.
All of the links you provided were very interesting to read/watch. The yahoo video definitely did a good job at describing the situation.
I guess I just could not think of a spot on my EE powered site where the URL was not already the canonical link… But I think your last post put that into perspective for me. 😊
Thanks for the clarification.
Nice work!
Cheers, Micky
Hi, still loving your plugin!
Just thought I would put in a feature request:
$this->return_data = '<link rel="canonical" href="' . $FNS->fetch_current_uri() . '" >';
It would be nice if the plugin allowed one to change the ” />” at the end… I personally use a non-XHTML dtd, and the ” />” breaks validation.
Thanks! Micky
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.