im having a duplicate content problem. both http://www.mysite.com and http://mysite.com are indexed by search engines. most of my backlinks point to http:.//www.mysite.com so i need to remove http://mysite.com from searches. after doing some research i found that i need to use mod_rewrite in .htaccess to fix this problem. but im a little bit confused on the exact code i need to use to fix it. can some on help me out? also i believe i have already been penalized for this, my search ranking have dropped. after i fix this will the penalty be lifted and my rankings go back?
hello, if u have submit google sitemap in google webmaster tool, you can directly remove it from there. kindly check it out, you will get solution.
Hi, you should do a 301 redirect, to redirect the non www to the www. I have just done this myself. You may initially drop in the SERPS but this should only be a short term effect, and in the long term you may even rank a few places higher, (I was told this by a very knowledgable guy, here on DP) one you have corrected the duplicate problem. Here is the redirect code RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.yoursite\.co.uk$ RewriteRule (.*) http://www.yoursite.co.uk/$1 [R=301,L] Dee
This is the proper code to use, don't use the above one. RewriteEngine on RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L] Code (markup): Change yourdomain.com to your domain name, leave all variables around it intact.
lol, i see first one puts site in a loop. thank you, ssandecki there is too much confustion on web for this information.
I actually think that comment was not needed. Just like you supplied the code. Someone of this forum supplied me with the one I posted. Dee
Well I did test it and it did work, but obviously because of the code it was going to take me to the www, but hey no need to shoot me over it, at the end of the day I was only trying to help, and everyone makes mistakes occasionally Dee
Hey Deed and Ssandecki, you should not put your self in personal opinion and expertise. Ssandecki, you are the respected member of DP, leave that guy or explain him, why he is wrong. Hope this will make friendly environment between every one in DP. Enjoy.