Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

301 Redirection Issue in Magento

         

janakbhutani

11:33 am on May 22, 2015 (gmt 0)

10+ Year Member



Hi All,
I have implemented correct 301 redirection code from HTTP To HTTPS in .htaccess file for my E commerce website.
Buy when i check redirect from any tool its showing it a 302 redirection. Keyword ranking is also going down as i am working for HTTPS version but search engines giving preference to HTTP version.
I checked every thing regarding 301 implementation is fine.
kindly suggest me what to do so that search engine read redirection correct and website ranking improve.

aakk9999

4:57 pm on May 24, 2015 (gmt 0)

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



Welcome to WebmasterWorld, janakbhutani.

I am confused - you say you have implemented redirect correctly but all tools show 302 redirect.
Here are a few questions:
Have you checked your server logs, what is the response googlebot is getting, is it 301 or 302?
How are you linking internally within your site? When you hover on internal links, do they show http or https?

lucy24

5:33 pm on May 24, 2015 (gmt 0)

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



Is there a CMS involved? Yup, there is, subject line says "Magento". Crystal ball says the requests are getting intercepted by Magento before they ever reach the htaccess code, and Magento itself is then issuing the 302. If this is the case, your raw logs will show neither 301 nor 302 but 200.
I have implemented correct 301 redirection code

Well, we have only your unsupported word that this is true. I'm not saying that to be rude; there are many many possible ways an htaccess can contain mistakes. But that's a question for the Apache subforum.

seoskunk

9:19 pm on May 24, 2015 (gmt 0)

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



Try doublechecking with [web-sniffer.net...]

Then check your settings in magento System > configuration to make sure your not instructing a 302 redirect.

Lucy is right php intercepts the redirect in magento and it doesn't hit htaccess

I guess I should also point out that the redirect in magento to https as the set domain points everything at the homepage and does not take into account the request url, so "http://www.yoursite.com/widgets" is redirected to "https://www.yoursite.com/" along with every other page.