8

Which is better for SEO and page rank?

mysite.com/directory/my-page

OR

mysite.com/directory/my-page/

I know the above two URLs are treated as two separate pages by search engines, but I'm stuck on deciding which format to consistently use and which is better.

Thanks,

Ham

Ham
  • 97
  • 1
  • 2

4 Answers4

9

Matt Cutts (head of Google’s Webspam team) prefer trailing slash.

http://www.mattcutts.com/blog/seo-advice-url-canonicalization/

Anyway, the most important thing is pick one and stick with it uniformly. Do a 301 redirect for user if needed.

tszming
  • 2,084
  • 12
  • 15
  • 1
    Matt's comment is referring to just the home page, and the blog post is from January 2006. – James Lawruk Nov 18 '11 at 14:44
  • 1
    the comment link actually moved to http://www.mattcutts.com/blog/seo-advice-url-canonicalization/#comment-16540 – ps2goat Oct 17 '13 at 06:09
  • Matt's answer is a personal opinion (and a bit outdated today in 2016). See other answer for official Google response. However, you are ultimately right: pick one and be consistent with it. – mr.b May 09 '16 at 09:52
5

Google does not care about trailing slash. Here is their official answer.

http://googlewebmastercentral.blogspot.fr/2010/04/to-slash-or-not-to-slash.html

Google treats each URL above separately (and equally) regardless of whether it’s a file or a directory, or it contains a trailing slash or it doesn’t contain a trailing slash.

Matt is just stating his personal preference quoted in the other answer, not the official preference of Google, which is neither.

giorgio79
  • 3,787
  • 9
  • 53
  • 85
3

.htaccess redirecting to trailing slash urls

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]
Binyamin
  • 7,493
  • 10
  • 60
  • 82
  • From Apache http://httpd.apache.org/docs/2.0/misc/rewriteguide.html `RewriteEngine on` `RewriteBase /` `RewriteCond %{REQUEST_FILENAME} -d` `RewriteRule ^(.+[^/])$ $1/ [R]` It is more generic – Open SEO Jun 17 '11 at 14:21
0

both should be equal regarding SEO (as long as you keep consistency) but tend to have different meanings for the user :

mysite.com/directory/my-page would be the URL to a page while : mysite.com/directory/my-page/ would be the URL to the index of a directory.

these being only habits since you can rewrite any URL you want the way you want...

darma
  • 4,687
  • 1
  • 24
  • 25