Trailing double forward slashes in URL’s in the SERPs…

This query gives a result I hadn't seen before (image), the same page was indexed with both a single trailing forward slash, which is of course normal, and with a double trailing forward slash... This is of course a duplicate content issue, especially when people link to the double slash one by accident. The fix for it in Apache is quite easy, just add this to your server config or htaccess:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)//$
RewriteRule . http://yoast.com%1/ [R=301]

8 Responses to “Trailing double forward slashes in URL’s in the SERPs…”

  1. Hi Joost,

    Thanks for that, I had a site where /, was being indexed (strange).

    Have used your solution to fix it.

    Thanks again.

    Gary.

  2. Nice read, more info to add to my useless knowledge of search engine ranking lol

    you may be interested in this

    liveblueprints

  3. thanks so much. i usually don't comment on websites but your post helped fix a little bug of mine. it was totally annoying. thanks again!

  4. Hi Joost, do you think that would be useful if the "//" are showing up not in the serps, but in the google analytics? thanks...

  5. very helpful! thanks for solving this problem for me!

Comments closed, if you feel you have something to say:
drop me a line.