In the hope of looking supercool I have decided to jump on the rev=”canonical” bandwagon and implement short urls on this site. I am sure that you will also want to bask in the glory of doing something so ground-breaking and undeniably impressive so I have kindly shared my experience with you. Please read the rest of this post first and then thank me profusely in the comments.
Is rev canonical a type of vicar?
Nope. rev=”canonical” involves specifying a shorter url for each of your web pages so that people don’t have to rely on 3rd party sites like tinyurl to shorten your urls. Over the last week the whole idea has sprung out of nowhere and there are various great blog posts explaining what rev=”canonical” is, why it might possibly be completely flawed, and why it might just help save the internet!
Fortunately for me the url of this site is quite short so I didn’t need to buy a new domain for the purpose. I was also lucky that the text in the 2nd segment of my blog posts is completely arbitrary and purely there for SEO, usability and decorative purposes. All these urls for example all link to the same blog post:
Without making any other changes then I can use the format of the last example url for my shorter urls.
Correct rev=”canonical” syntax
Now I have the format of my preferred short urls I can move on to specifying this on each individual page. Currently the syntax for doing this is:
<link rev="canonical" href="http://rdjs.co.uk/-/3" />
As I have put the rev=”canonical” into the link element it must therefore live in the HEAD of my html.
The future of rev=”canonical”
Using the rev element in this context has been critised for being semantically incorrect, furthermore it is planned to be depreciated in HTML5. It is very likely therefore that I will need to make some changes to my implementation. As Drew McLellan rightly points out however:
You don’t need to worry about early adopters – early adopters are smart enough to worry about themselves. Something that takes 5 minutes to implement only takes 2 minutes to change, if necessary.
<link rel="alternate shorter" href="http://rdjs.co.uk/web/-/3" />
In the future I might also consider making the urls even shorter with one of these options:
His holiness the Reverend Canonical in action
It amazes me how quickly people react to new developments and a cracking example is the speed at which Simon Williams has put out a bookmarklet which automatically fetches the short url for a page if it has been specified otherwise creates one for you. So go on, try it out drag this Shorten Bookmarklet into your bookmarks toolbar and give it a try.
Unfortunately implementing this on my site has not saved the internet nor has it made me supercool. However I hope that if more people show their support for it some of the teething issues can be resolved and it will help improve the web just a tinyurl little bit.