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 -> XXX.XXX.XXX.XXX DigitalOcean IP Address. Currently, if you type in 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 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…

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi nothanks32432, I’m from RunCloud. Here’s few tips to help you.

Firstly, please take a seat and a cup of coffee and take a break…

  1. “Pause” Cloudflare service so that we only use cloudflare DNS. This will exclude any CF setting error.

  2. Make sure the domain name A record is point to the droplet IP address, as well as “www” sub domain

  3. Make sure WordPress/Site Address are the correct domain name, not IP address. (Remove the hard coded address in wp-config.php)

  4. Check .htaccess for any unexpected redirection

  5. Patient… DNS stuff sometimes take times to take effect.

  6. You can check global dns propagation using tool like

Lastly, feel free to open a RunCloud support ticket for assistant

Without screenshot of DNS settings and URL it’s very hard to understand what is the problem. Need more information: about server stack, wp-config file and so on

You said you removed the A record, tphokas from this page suggests that you need to have an A record for for the domain that points to the host (domain name to IP address) rather than forwarding or redirecting. I’m not sure exactly what your DNS configuration looks like, could you share that? With any identifying information blocked of course.