0
votes

I have a Magento store and I have been trying to figure out why I've lost most of my traffic in the past few months. I recently discovered that all categories not preceded by www were being redirected to the home page, overruling other redirects.

On my .htacces, I have made the change from:

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

to

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

I am not an expert in this area and wanted to make sure this change won't screw something else up.

Also could this be a reason why I lost all my traffic? And would changing this help me get my traffic back?

Thanks for any suggestions!

1

1 Answers

1
votes

What are you trying to achieve with these rules? have you tested if they maybe redirecting all of your HTTPS traffic into the non secure HTTP pages?

If you are trying to redirect HTTPS to HTTP on the home page, you should use a different rule. If you are trying to redirect non 'www' to the 'www' subdomain it is also a different ruleset. See below:

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

As for your question: it may have indeed affected your traffic but also have in mind that Google released a new algorithm that have affected many sites either way. Your may have suffered in the negative way. The new algorithm was released on 1/1/2014. Look in your webmaster tools you will see this mark on their reports.