Welcome to WebmasterWorld Guest from 54.144.79.200

Forum Moderators: goodroi

Message Too Old, No Replies

google duplicate title issue

     

jon22

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

5+ Year Member



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

e.g:

/vista-320-litre-box-roof-carrier-fits-audi-r8/
/vista-320-litre-box-roof-carrier-fits-audi-r8

How can I fix this, with a redirect maybe?

phranque

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

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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)

lucy24

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

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



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

The "real" location may be
/vista-320-litre-box-roof-carrier-fits-audi-r8/index.html

or it may be
/vista-320-litre-box-roof-carrier-fits-audi-r8.html

or it may be
/complicatedstuff.php?long-ugly-query-here

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.

jon22

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

5+ Year Member



ok thanks I'll check the htaccess file.

jon22

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

5+ Year Member



does my htaccess file look ok?


<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
<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.*
</IfModule>

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]

phranque

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

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

phranque

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

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



continued .htaccess discussion [webmasterworld.com]