Redirect Loops

My website is in a redirect loop

When you experience a redirect loop, this can be caused by several things, I’ve listed the most common causes below.

Most checks can be done without access to the back-end. If these steps all fail, and you still have a redirect loop, you can try to activate Really Simple SSL in safe mode. This will activate Really Simple SSL without redirect and without your site url becoming https. If all fails you can always deactivate using the remove script, or manually.

A redirect back to http

This is the most likely cause, and you can check if this is the case by typing in your url with https (when Really Simple SSL is deactivated). If you get redirected back to http, there is a redirect to http active, which will cause redirect loops when a redirect to https is added.

  • Check other plugins
    • Multilanguage plugins,
    • login plugins,
    • redirect plugins
    • WooCommerce with certain settings can redirect to http.
    • Ithemes SSL settings
  • Check if your .htaccess or nginx.conf contains redirects to http.
    If you have other redirects in place, this could conflict with the redirect of Really Simple SSL.

Check if you have Varnish Cache active

Varnish often causes issues on SSL. Ask your hosting company if Varnish is active, and if they can disable it to see if that helps. With a service like www.redirect-checker.org/ you can see if your site uses Varnish Cache. If so, you should be able to deactivate Varnish in your webhosting dashboard, like CPanel.

Check your certificate

In some cases a certificate with chain issues can cause issues. Check if your certificate is ok on https://ssllabs.com/ssltest. It should at least grade an A.

CDN, like CloudFlare

For the most common issues with CloudFlare, see the dedicated CloudFlare article

 

 

Related Articles

  • SSL with CloudFlare and Really Simple SSL

    If you are a CloudFlare user, there are a few things to consider when migrating to SSL. If you run into redirect loops when you use CloudFlare, and have activated...
  • Redirect loop in WordPress admin only, not on front end

    WordPress depends on a variable, $_SERVER[“HTTPS”] to check if it is on SSL. As a consequence, when this variable is not set, and SSL is forced, WordPress tries to redirect back...
  • Using safe mode

    Migrating to SSL can cause unexpected side effects. When caching is causing redirects, or a plugin redirects back to http, or other such issues, it can be helpfull to activate...
  • Website loads well in Chrome, but gives redirect loop in Safari

    This can be caused by your server configuration, or by the SSL certificate. Read this article  on how to check if it is caused by your certificate. For the server configuration,...

10 Comments

  • Eyal Oren

    This redirect loop is so frustrating.

    I literally can’t even save the settings to stop the plugin from writing to .htaccess before it writes to it and locks me out again. I keep removing the added text to the .htaccess file but am not fast enough to save the settings in the plugin.

    No idea why I’m in this look either. Could it be because I have set Settings/General/site address as https://…?

    • Rogier Lankhorst

      There is another way to prevent .htaccess from being edited.
      In the wp-config.php, add:
      define( 'RLRSSSL_DO_NOT_EDIT_HTACCESS', TRUE);

      • Eyal Oren

        Thanks for the quick reply but that did not work

        I added the line at the end of my wp-config file

        Clicked on the SSL Settings page and was back in a redirect loop

        I tried to change the Settings/General/site address to http:// thinking that was the problem but it did not change anything.

        I literally cannot update the plugin or go into the settings without ending up in a redirect loop.

        So strange.

        • Eyal Oren

          UPDATE: Looks like I actually had the Safari redirect issue

          Loaded in Chrome and was able to check the ‘stop editing htaccess file’

          All good now.

  • mark

    there are some problems with these instructions is
    1. Once you have a redirect loop you can’t login to disable other plugins
    2. Lots of people do not use .htaccess – nginx is pretty popular these days.

    Questions;
    How do I disable really simple ssl now that I have redirect loops given I don’t use .htaccess?
    Where is the javascript redirect installled (I’m assuming that’s the problem).
    What do I edit in other plugins to make them play nicely with this plugin (assuming disabling them fixes anything(?
    How do I remove this plugin without being able to login?

  • Clemens

    Hello today I purchased the Really Simple SSL per page to secure just 2 pages in my WP installation. I bought it to avoid errors to the whole installation. So if i enable SSL for this 2 pages they are caught in that famous ssl loop. Woocommerce checkout process works with ssl so there might be no problem with the ssl certificate. Outside the woocommerce checkout i do not use ssl just the 2 pages I want to secure. So how can I avoid that loop for these 2 pages?

    • Rogier Lankhorst

      If you type in the url of one of these pages with https, does it redirect to http? If a redirect loop is generated something else is redirecting back to http. This might be a plugin, or a .htaccess rule.

      • Clemens

        If I type in the page with https it will be shown without! There is a normal page. If I use the plugin and set the page to ssl there is the loop with http and with https.

        • Rogier Lankhorst

          If you type the url with https, and you get a http page in return, there is a redirect to http on your site. This explains the redirect loop. So you need to remove the redirect first.

Leave a Comment