WordPress in HTTPS, causing Redirect Loops

February 16, 2015 771 views

I'm in the process of setting up WordPress over HTTPS, which is hosted on a Digital Ocean droplet with Ubuntu 14.04, managed by Serverpilot (though the HTTPS is set up manually, rather than through Serverpilot). The server has a number of WordPress installations, but there is one in particular I wanted to run securely. WordPress in itself is running in a subfolder (so it's located in domain.com/subfolder/).

I've managed to get SSL certificate up and running, as going to the main URL of the site domain.com and sticking a plain HTML on it works over SSL and the padlock's show.

However the WordPress installation enters a redirect loop.

I've done the following:-

Switched all plugins off

Switched to a default theme (Twenty Thirteen)

Updated everything to their latest versions

Changed to default permalinks

I've then changed the siteurl and WordPress URL to https, and then the site gets caught in a Redirect Loop. I use a Redirect Path plugin for Chrome, and it's effectively getting redirected to itself (so https://domain.com/subfolder/ goes through to https://domain.com/subfolder/). Oddly this redirect appears to switch between a 301 and 302 redirect, without any rhyme or reason.

I also had a bit of a play around with WordPress HTTPS, but that wasn't successful either.

Any ideas? Not entirely sure where to go here...

  • Hey! Any additional information about your setup that you could add will help us figure out the issue. In particular, can pastebin your Apache VirtualHost configuration and any .htaccess file file from the WordPress installation's webroot? Are you attempting to redirect all http connections to https?

  • Hi there :)

    .htaccess - http://pastebin.com/iqfjKB92

    The server is using nginx (sorry I didn't make that clear) in the stack, rather than apache. I believe this is the config file - http://pastebin.com/dkP8TWZ0 - if this isn't, any guidance to where the server file is will be appreciated :)

    At the moment, it's on a quiet test server, so I'm planning on redirecting all from http to https, I'm planning on using an API which requires HTTPS access.

    Let me know if you need anything else, or that anything is incorrect above.



Be the first one to answer this question.