When working with canonical URLs, does a trailing slash make any difference on a root URL?
I put the following canonical tag into my Rails site head:
<link rel="canonical" href="<%= url_for(:only_path => false) %>" />
...to ensure any parameterized URLs resolve to the base URL.
However, when I navigate to http://www.example.com
, the canonical link shows up with a slash at the end:
<link rel="canonical" href="http://www.example.com/" />
I know trailing slashes DO matter when a path element is present in the URL, but thought they didn't matter on root URLs. However, I then ran into Matt Cutts presentation on canonical tags, where he clearly states that they are considered different URLs:
From http://www.mattcutts.com/blog/canonical-link-tag/ (See slide 3):
These URLs are all different:
www.example.com
example.com
www.example.com/
example.com/
Can anyone shed some light on what he means?