[Fixed] Infinite Redirect after switching WooCommerce site to SSL

According to Google’s Webmaster Blog, they are going to consider HTTPS as a ranking signal.  With this announcement, it becomes important that site owners switch their entire site to HTTPS.

If you already have SSL on all your pages, you do not need to do anything. However, I had a case where only the Checkout and Account pages were SSL protected. The rest of the site was not SSL protected.

I embarked on the journey to convert an e commerce site to HTTPS on all pages. Doing the conversion itself was easy. I used this guide to transfer the site to HTTPS.

However, the problem was I was receiving the dreaded infinite redirect message from Chrome. Initially, I thought it was a local browser cache issue. That was not the case. Digging deeper using Google Chrome’s FireBug tool, I determined that the http://www.example.com was redirecting to https://www.example.com. In turn the latter would redirect to the former. This 2-way ping pong redirect would continue for about 3 or 4 times before the browser gives up and announces failure.

I found the issue was a non-trivial (in hindsight) setting under WooCommerce. Go to WooCommerce->Settings->Checkout->Force HTTP when leaving the checkout

Make sure that setting option “Force HTTP when leaving the checkout” is Unchecked.

When this option is checked, it will redirect all non-checkout pages to http. There lies the problem. The 301 site-wide redirect for http:// to https:// was conflicting with this WooCommerce setting. Each was reversing each other out, hence the infinite redirect.

I had posted in multiple online groups but never received a proper response, so I hope this helps someone.

 


Posted

in

,

by

Comments

3 responses to “[Fixed] Infinite Redirect after switching WooCommerce site to SSL”

  1. D. Bruce Stevens Avatar

    THANK YOU! I’ve more often than not found answers from people like you rather than the WooCommerce documentation. I really appreciate this, you’ve saved the day!

  2. Emma Avatar

    We started seeing redirects on Chrome when accessing sites using Chrome 44.0.2403.89 m that had this setting on. Thanks so much for sharing this information – it really helped out!

    1. Amit Ramani Avatar

      Emma
      Glad to hear it was helpful. Just to clarify, this is independent of Browser. Other browsers may however report different errors but the end results (infinite redirect) is the same.

Leave a Reply

Your email address will not be published. Required fields are marked *