Duplicate content error - same URL
-
Hi,
One of my sites is reporting a duplicate content and page title error.
But it is the same page? And the home page at that. The only difference in the error report is a trailing slash.
www.{mysite}.co.uk
www.{mysite}.co.uk/
Is this an easy htaccess fix?
Many thanks
TT
-
Hi TT,
This should 301 redirect all pages without a trailing slash, to a version with the trailing slash:
RewriteCond %{REQUEST_URI} /+[^\.]+$``RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] -
Thanks for that. The home page is redirecting to a version without the trailing slash. Is that what you meant?
-
Sorry, yes. Hopefully you won't be able to view www.{mysite}.co.uk/ anymore.
-
Does this error even matter? Anyone have documentation suggesting that it does?
-
Yes, it does matter. For some in-depth background about duplicate content, see this blog post by Dr. Pete. http://www.seomoz.org/blog/duplicate-content-in-a-post-panda-world