Err_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. https://crt.sh/?q=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: maillist.naturalintelligence.us

I ran this command: via broswer https://maillist.naturalintelligence.us/

It produced this output: ERR_TOO_MANY_REDIRECTS

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

The operating system my web server runs on is (include version): Ubuntu 20.04.1 LTS

My hosting provider, if applicable, is: self

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.7.0

nginx error.log output
2020/09/07 05:06:34 [error] 4105#4105: *26368 open() “/var/www/html/GponForm/diag_Form” failed (2: No such file or directory), client: 64.227.110.183, server: _, request: “POST /GponForm/diag_Form?style/ HTTP/1.1”, host: “192.168.0.1:443”

nginx access.log output
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”
157.131.253.99 - - [07/Sep/2020:06:00:19 -0700] “GET / HTTP/1.1” 301 162 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”

Hi @walpi

checking your domain - https://check-your-website.server-daten.de/?q=maillist.naturalintelligence.us#url-checks

It's a wrong https + non-www -> https + non-www redirect.

Find and remove that redirect.

Thank you; however, I don’t see the offending line in my server block (see below). I’m not using the ‘www’ in my hostname or DNS at all. Please advise further.

server {
# Listen on ipv4

server_name maillist.naturalintelligence.us;

# Redirect all insecure http:// requests to https://
return 301 https://$host$request_uri;

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/maillist.naturalintelligence.us/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/maillist.naturalintelligence.us/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = maillist.naturalintelligence.us) {
return 301 https://$host$request_uri;
} # managed by Certbot

listen 80;
listen [::]:80 ipv6only=on default_server;

server_name maillist.naturalintelligence.us;
return 404; # managed by Certbot

}

Do you have Wordpress running? Looking at the return headers I think your web-software is redirecting from HTTPS to HTTP again, probably an error in the configuration.

I suggest to disable the HTTP to HTTPS redirect in the Apache configuration temporarily by commenting it out, so you can reach your site control panel and check if you can change the settings. If Wordpress (just guessing here, perhaps you run other software) is redirecting to HTTPS (or at least it doesn’t redirect back to HTTP), you can choose to enable the HTTP to HTTPS redirect in your Apache again.

If your server block isn't used, you have to check your complete configuration.

And checking your domain - see the output - a wrong redirect https -> https you have to find and remove.

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