How to fix Infinite Redirect Loop with WordPress Site / Exposed IP Address?
I’m sure that this is going to end up being a ‘DUH!’ situation, but i’m new to the technical side of things and, frankly, going a bit crazy with this situation. I’d love some fresh eyes on the situation to help me see what i’m sure i’m missing.
Right now i’ve got a WordPress site living on DigitalOcean by way of RunCloud. DNS is managed by CloudFlare and have an A Record set up pointing from domain.com -> XXX.XXX.XXX.XXX DigitalOcean IP Address. Currently, if you type in www.domain.com you get redirected to the IP address and the site is there for the world to see… except that the IP is in the address bar which is no good and looks sketchy.
So the first thing I tried was changing the WordPress/Site Address in the WordPress General Settings page from being http://XXX.XXX.XXX.XXX to http://domain.com. BAM. Infinite redirect loop. A quick SSH into the server and a bit of monkeying with the wp-config file later, and I hard coded the WordPress/Site address back to the IP address. Site comes back up. And I can remove the hard-coded address. But now we’re back to where we started.
I try removing the A Record from cloudflare. No dice.
I tried turning SSL on and off and every setting in between. Nada.
I’ve monkeyed around with the WordPress/Site Address some more. Same redirect loop.
I’m about at my wits end trying to solve this, and I KNOW it’s going to be something stupid and obvious. So can anyone put me out of my misery and help point me in the right direction?
Thank you SO much in advance for anyone who might have a lead on this…
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.