Forum Moderators: goodroi

Message Too Old, No Replies

WWW vs. Non WWW

Site indexed twice need robot.txt help

         

carjocky

3:22 pm on Jan 19, 2006 (gmt 0)

10+ Year Member



My site is indexed 2 times in google 68 pages with the WWW in the url and 850 without the WWW. I am sure I am getting penalized because of these 68 pages that have the WWW in them. How do I take the 68 pages with the WWW in the url and remove them from google without harming the other 850 that I dont want removed.

From what I can tell from googles removel site is that you need to put a text robot file on my server to tell it to remove. But I dont know how to write the robot.txt file so that only the WWW url's are removed and the [site.com...] (without the www) are not removed.

Can anyone help me out?

carjocky

5:53 pm on Jan 19, 2006 (gmt 0)

10+ Year Member



Ok I used this redirect but it is giving me a 404 error instead of redirecting to the non www page.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ [yoursite.com...] [L,R=301]

Why would this be? I still want anyone that gets to my page from a www link to go to the non www url but I dont want the www URLs to be in google anymore.

Thanks

Pfui

4:10 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not sure if what you want to accomplish vis-a-vis Google is desirable, but you might try posting your mod_rewrite Q in the Apache Web Server Forum [webmasterworld.com] (it's covers ".htaccess, mod_rewrite, and other Apache specific topics").