too many redirects

I have a port forward rule in my router that forwards 443 to my NGINX instance. If I go to https://<public IP> I see my website and I can confirm it is serving my certificate with my domain. In cloudflare I created an A record for my website pointing to my external IP. I also have SSL/TLS encryption Current encryption mode set to full, but for some reason going to https://<my domain> causes the 'too many redirects' error. What am I missing? NGINX does not redirect, and I also don't see anything in the access log if I go to my domain so I don't think it's making it to my IP address for some reason.
16 Replies
Laudian
Laudian4d ago
Hard to say without knowing your domain. Please make 100% sure that you are using the Full (Strict) SSL mode.
oberse
oberseOP4d ago
My domain is oberse.io Changing from Full to Full (strict) doesn't seem to change anything
Laudian
Laudian4d ago
Can you check if you have any Redirect Rules, Pages Rules or Bulk Redirects on Cloudflare?
andrew_nyr
andrew_nyr4d ago
do you have either a valid cert or cf origin cert on your origin server?
oberse
oberseOP4d ago
my cert is generated via certbot's cloudflare dns plugin The only redirect rule I have is 'Always Use HTTPS' flag. Turning it off doesn't seem to fix the issue either. I have no page rules or Bulk redirect rules
Laudian
Laudian4d ago
Hmm, that's weird tbh. The redirect is coming from Cloudflare. Could you share screenshots of all 3 redirect types and also disable Always Use HTTPS for a moment?
oberse
oberseOP4d ago
huh. Disabling it from under 'Edge Certificates' doesn't disable the rule. Once I disabled it under rules the site works now. Thanks
Laudian
Laudian4d ago
Hmm, that sounds like a bug. I'll ask someone to take a look. What happens if you enable Always Use HTTPS again now if I can bother you to try once more?
oberse
oberseOP4d ago
The UI shows it activated but in the rules overview it shows the template is disabled
Laudian
Laudian4d ago
Oh, you had a separate Redirect Rule?
oberse
oberseOP4d ago
I didn't think so, but now I'm not so sure
Laudian
Laudian4d ago
Could you share a screenshot of that redirect rule? There was a bug not long ago where http -> https redirect rules triggered when they shouldn't, so I'm curious now.
oberse
oberseOP4d ago
Darn. I deleted the rule to see if changing the flag under Edge Certificates would recreate it It did not so I guess I did create that rule
Laudian
Laudian4d ago
Rules and Always Use HTTPS aren't related, though they do the same thing. Ah well, I'll just try a few rules myself.
oberse
oberseOP4d ago
Thanks for the help
Laudian
Laudian4d ago
np

Did you find this page helpful?