homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
Forum Library, Charter, Moderators: goodroi

Sitemaps, Meta Data, and robots.txt Forum

google duplicate title issue

 6:40 pm on Jul 5, 2012 (gmt 0)

Google seem to be counting two of the same page, one with / and one without, over 2000 errors! nothing but problems.



How can I fix this, with a redirect maybe?



 7:52 pm on Jul 5, 2012 (gmt 0)

you need to fix those with a 301 redirect.
if those are truly disk directories on an apache server, the mod_dir module should fix this for you.
if these are "virtual directory" url paths generated by your CMS then your CMS should handle the redirect.

the other piece of that fix should include internally linking to only canonical urls (ii.e. trailing slashes for directory paths)


 8:13 pm on Jul 5, 2012 (gmt 0)

You may already have one too many Rewrites (not redirects).

The "real" location may be

or it may be

or it may be

But you can be absolutely sure that no more than one of your two names is the "real" location. So if they are both getting indexed, you or your CMS may be rewriting something that shouldn't be rewritten. Search engines know when they've been redirected but they don't know when they've been rewritten.


 8:18 pm on Jul 5, 2012 (gmt 0)

ok thanks I'll check the htaccess file.


 8:22 pm on Jul 5, 2012 (gmt 0)

does my htaccess file look ok?

<IfModule mod_dir.c>
DirectoryIndex index.php
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

RewriteEngine On
RewriteBase /
RewriteRule ^install/?$ install/index.php [QSA,L]
RewriteRule ^freshadmin/?$ freshadmin/$1 [QSA,L]
RewriteRule ^i/?$ library/phpThumb/index.php$1 [QSA,L]
RewriteRule ^img/(.+).jpg$ image.php?n=productimage&var1=$1 [QSA,L]
RewriteRule ^recommends/(.+)?$ linkfowarder.php?linkname=$1 [QSA,L]

#RewriteCond %{DOCUMENT_ROOT}/$1 -f
#RewriteCond %{REQUEST_URI} !^min/
#RewriteCond %{REQUEST_URI} !^install/
#RewriteRule ^(.+\.(css|js))$ min/index.php?f=$1 [L,NE]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?q=$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^example\.org\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.org\.uk$
RewriteRule ^car\-roof\-bars$ "http\:\/\/www\.example\.org\.uk\/roof\-bars" [R=301,L]

RewriteCond %{HTTP_HOST} ^example\.org\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.org\.uk$
RewriteRule ^car\-roof\-boxes$ "http\:\/\/www\.example\.org\.uk\/roof\-boxes" [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

[edited by: jon22 at 9:18 pm (utc) on Jul 5, 2012]


 9:08 pm on Jul 5, 2012 (gmt 0)

there are several problems in your .htaccess file.

you should post your question in the Apache forum on WebmasterWorld.
make sure to read the pinned post in that forum about exemplifying your code.
i.e. using example.com for your domain


 10:02 am on Jul 6, 2012 (gmt 0)

continued .htaccess discussion [webmasterworld.com]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved