Forum Moderators: open

Message Too Old, No Replies

Site Disapeared after 301 Redirect

301 Redirect

         

schenz

4:56 pm on Jul 21, 2004 (gmt 0)

10+ Year Member



Last week we conducted an experiment with our .htaccess file. We were getting customers with problems on our website and I had tracked it down to the fact that they were coming in on an older domain name adding an item to their cart (which took them to our official name of www.[domain 1].com). They would then use the back button to go back to a product listing, which took them to the older domain name. When they went back to the old domain name the shopping cart cookie was no longer valid and they would receive an empty cart error.

I changed the .htaccess file with the following lines:

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

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

This worked exactly as I intended to prevent the described problems with the shopping cart. However it seems to have an unintended side effect with Google because G has www.[domain 2].com indexed and formerly ranked very high. Since last Wednesday, when I started the work, we have virtually disappeared from our regular search engines results where we were listed in the top 5 results

I have researched these re-write rules in relation to Google as well now, and it seems also that this is the correct way to report to you that all of these sites are ours, and that the one that should be listed is www.[domain 1].com. We now need to know what is your recommendation on these 301 Re-directs? Should I leave the htaccess file with the 301's? If I leave the 301's when will the www.domainname.com site get the rankings that we enjoyed with www.domain-name.com?

We have tried to follow all guidelines on submission, and do our best to run a clean and honest site. We would now appreciate any help you may provide us on these issues.

[edited by: ciml at 11:09 am (utc) on July 22, 2004]
[edit reason] Examplified [/edit]