Too Many Redirects

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: hirnschall.bio

I ran this command:

It produced this output:

My web server is (include version): nginx/1.18.0

The operating system my web server runs on is (include version): Debian 11

My hosting provider, if applicable, is: vultr

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.32.2

I keep getting a too_many_redirects error after installing my certificate with Cerbot.
I followed this guide and did nothing else on the server How to Install Nginx, MariaDB & PHP (LEMP) on Debian 11 - Vultr.com

Thanks in advance for your help

Jakob

You need to review your Cloudflare redirect settings and how those interact with your Origin Server. The Cloudflare community (here) is best place to ask about this.

What is happening is that an HTTP request gets redirected to HTTPS (which is good). But, that HTTPS request is redirected back to HTTP and the sequence repeats forever.

curl -iL hirnschall.bio
HTTP/1.1 301 Moved Permanently
Location: https://hirnschall.bio/
Server: cloudflare

HTTP/2 301
location: http://hirnschall.bio/
server: cloudflare

HTTP/1.1 301 Moved Permanently
Location: https://hirnschall.bio/
Server: cloudflare

HTTP/2 301
location: http://hirnschall.bio/
server: cloudflare
3 Likes

While the Cloudflare Community is definitely the right place for this topic, I can quickly share that the most common cause of ERR TOO MANY REDIRECTS is having your Cloudflare SSL set to Flexible instead of Full (Strict). Flexible sends requests from Cloudflare to the origin over insecure HTTP. This makes it easy to get stuck in an infinite loop by an HTTP -> HTTPS redirect on the origin server.

5 Likes

Thanks linkp
I changed the SSL mode of Cloudflare and now everything works.
Thanks a lot

With kind regards,
Jakob

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.