Use Rel=Canonical Within HTTP Headers

Jun 20, 2011 • 8:32 am | comments (8) by twitter Google+ | Filed Under Google Search Engine Optimization
 

Google now officially supports the use of the rel=canonical attribute within HTTP Headers.

In 2009, Google, Yahoo and Bing introduced the canonical tag as a way to allow webmasters to do 301 redirects without physically redirecting humans. A few months later, Ian Macfarlane tweeted asking for a method to do this over the X-robots protocol.

That is what this does - in a sense.

Since you cannot stick a rel=canonical attribute within a PDF, DOC or other file formats, outside of an HTML page - you can use the rel=canonical within the HTTP header to communicate the redirect.

Webmasters are cautiously concerned about the tag - but I honestly think it will be used well for the most part.

Forum discussion at WebmasterWorld & Sphinn.

Previous story: Google Goes Gray With New Design Test
 

Comments:

Perez_marc

06/20/2011 11:30 pm

How do you implement it into an HTTP header?

Alex

06/28/2011 11:53 pm

Hi, Can you give me an example of how I can implement it into an HTTP header ? Do I have to put the code below into my home page? Thanks in advance

Barry Schwartz

06/28/2011 11:55 pm

It's done via server response code.

Alex

06/29/2011 12:20 am

Thank you Barry for your answer. Can you precise me if I can use the code given by Google as example  http://goo.gl/AEDQZ ? If yes, where have I to put this code, in my home page, in .htaccess file ?  Thank you

Barry Schwartz

06/29/2011 12:24 am

Can't do it now, but check the google faqs and support forums. Linked to them in the post.

Alex

06/29/2011 12:25 am

Ok. Thank you for the advice

Kevin

07/13/2011 01:52 pm

Alex, I couldn't find any great guides either, so I wrote a tutorial on how to set these headers using httaccess. http://makeitrank.com/how-to-set-http-header-canonical-links

Alexandre Penyauski

07/13/2011 01:58 pm

Thank you very much. I'l tweet your guide

blog comments powered by Disqus