Canonical url for a home page and trailing slashes

Posted by serg on Pro Webmasters See other posts from Pro Webmasters or by serg
Published on 2012-07-06T23:11:14Z Indexed on 2012/07/07 3:23 UTC
Read the original article Hit count: 528

Filed under:
|

My home page could be potentially linked as:

http://example.com
http://example.com/
http://example.com/?ref=1
http://example.com/index.html
http://example.com/index.html?ref=2

(the same page is served for all those urls)

I am thinking about defining a canonical url to make sure google doesn't consider those urls to be different pages:

<link rel="canonical" href="/" /> (relative)
<link rel="canonical" href="http://example.com/" /> (trailing slash)
<link rel="canonical" href="http://example.com" /> (no trailing slash)

Which one should be used? I would just slap / but messing with canonical seems like a scary business so I wanted double check first.

Is it a good idea at all for defining a canonical url for a home page?

© Pro Webmasters or respective owner

Related posts about seo

Related posts about canonical-url