Duplicate listings on Google?
To www or not to www – redirects needed!
Duplicate listings on Google? Here – look at this solution.
That would dillute your effectiveness, right – if 2 identical pages are both indexed by Google for your site…. right???
A common problem for many web sites is that they are linking to their site with URL’s that have both www in them and no www in them.
If Google sees BOTH they will usually index BOTH.
I know this is confusing but you need to decide on one way and stick to it.
In other words – when you set up your domain – you should decide what your home page address will be – I personally include the www – so the URL I would link for the home page for this site would be
I never use
I also never use
/index.html in the address
I always use / which is the same things as index.html
Now – what IF you already made the mistake of having BOTH links pointing to your site? Or maybe someone else got it worng and linked to your site the OTHER way and now Google has you indexed with BOTH…
The best way is to fix it in your .htaccess file by including a line of code that will redirect to the way you want. Eventually Google will drop the duplicate page.
—————
Here is the code I add to my .htaccess files to force the redirect
code for .htaccess file – replace yourdomain.com with your domain – copy and paste this into your .htaccess file – CAUTION: always keep a backup of the orginal file before you make changes so you can replace it in case something is wrong
—————–
RewriteEngine on
#Redirect http://yourdomain.com to http://www.yourdomain.com
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [r=301,L]
————–
On my servers – if that code is in the .htaccess file in the root folder for my domain it will FORCE the page to be redirected to the WWW version
Here – try – click on both and look at the address bar
Either way – they end up on
So – if you wanna make sure you don’t get duplicate listings – be sure to use this code in your .ntaccess file for your domain
CAUTION: Your .htaccess file may have other code on it – so be careful if you make any changes or rpelace it – you could cause some problems – like I said – make sure you back it up before you make changes OR if you are unsure how to do this ASK YOUR HOST to help you.

Comments
By mysoftoffice on September 12th, 2011 at 11:29
Nice info….i really need this. Thanks for sharing this info dud…
By ravisoft on September 19th, 2011 at 12:53
Pretty good article. I was facing this problem with one website. I really got here a impressive information. Please write something else about same.