Get exclusive CAP network offers from top brands

View CAP Offers

google webmaster tools, preferred domain and .htaccess rewrite

You have affiliate marketing questions. CAP has answers!Category: Search Engine Optimization – (SEO)google webmaster tools, preferred domain and .htaccess rewrite
HVDB asked 3 years ago
Hi,

I read somewhere that it hurts your rankings if your domain can be found with AND without the preceding www in the url. So if:
htt://mydomain.com and http://www.mydomain.com both point to your homepage then google might consider this as duplicate content and therefore this could hurt rankings.

To make sure my rankings would remain ok I did the following:
First, I went to google webmaster tools and I configured my preferred domain as being http://www.mydomain.com

Second, I included the following code in my .htaccess file to make sure that any request for htt://mydomain.com would be rewritten as http://www.mydomain.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

Recently, my rankings dropped dramatically and now I wonder if this has anything to do with the changes above. Anyone who can advice me on this?

2 Answers
elgoog answered 3 years ago
drop in rankings must have another reason,
i think you did it exactly right

ixian answered 3 years ago
I did something similar to my site and Google dropped my home page from their listings. I panicked and un-did everything. Google re-indexed my home page shortly there after.

I think Google is smart enough to realise that these references lead to one and the same page.