When you have multiple links in a chain, it can be difficult to know where the problem might be.
So to help with troubleshooting, kindly temporarily disable your Cloudflare proxy (ie put your domain in DNS-only or grey-clouded mode in Cloudflare).
Standing by.
I’ve disabled clouflare proxies for all the DNS records.
Another point which I forgot mention in my question is: the wp-admin is not accessible even using AWS public ip address.
Thanks for the update.
With Cloudflare proxy disabled, I’m now getting ERR_CONNECTION_REFUSED for every URL on your domain, including the homepage. No more redirect loop.
So it seems that even though your WordPress site is configured to use HTTPS, you don’t have SSL configured on your server for this domain at all (not even a self-signed SSL certificate)… and you were solely relying on Cloudflare’s SSL proxy for HTTPS connections.
With no SSL on the origin (ie your server) at all, you can only use Cloudflare’s FLEXIBLE SSL option. And here’s what they say about this option:
Flexible SSL: Visitors will be able to access your site over HTTPS, but connections to your origin will be made over HTTP. Note: You may encounter a redirect loop with some origin configurations.
And that’s exactly the redirect loop you were seeing before turning off the Cloudflare proxy. Please see this: https://developers.cloudflare.com/ssl/troubleshooting/too-many-redirects/
I’ll recommend you setup an SSL certificate for your domain on your server.
Then you can turn on your Cloudflare proxy (orange cloud) again, and select the appropriate Cloudflare SSL/TLS option (perhaps FULL or even FULL (Strict))
Good luck!
Thanks a lot @gappiah !
You saved my several days!
I’ve installed a SSL certificate in my WordPress website and now it’s able to load smoothly.