Renew SSL: 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: crabwp.com

I ran this command: ./certbot-auto certonly --webroot -w /var/www/html/ -d crabwp.com -d www.crabwp.com

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is: Google Cloud

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):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): -bash: certbot-auto: command not found
Too many redirects
** To fix these errors, please make sure that your domain name was**
** entered correctly and the DNS A/AAAA record(s) for that domain**
** contain(s) the right IP address. Additionally, please check that**
** your computer has a publicly routable IP address and that no**
** firewalls are preventing the server from communicating with the**
** client. If you’re using the webroot plugin, you should also verify**
** that you are serving files from the webroot path you provided.**
The IP address is 34.80.120.253 and I am currently able to access the website via that address. Help me.
Challenge failed for domain crabwp.com
Challenge failed for domain www.crabwp.com
http-01 challenge for crabwp.com
http-01 challenge for www.crabwp.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:

Hi @tieunct

there is a check of your domain, 6 hours old - https://check-your-website.server-daten.de/?q=crabwp.com

Read the output.

You have a loop http -> https -> http, so Letsencrypt can't check your domain.

Remove the https -> http redirect, that's wrong.

And please don't use Cloudflare, if you don't have a working configuration.

First step: Working configuration.

Then add Cloudflare.


PS: Checked your raw ip, now it works - https://check-your-website.server-daten.de/?q=34.80.120.253

Now you have no redirect, http and https have a http status 200, creating a screenshot is possible.

Now add the redirect http -> https.

1 Like

I received another error
./certbot-auto has insecure permissions!
To learn how to fix them, visit Certbot-auto deployment best practices
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Cert is due for renewal, auto-renewing…
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for crabwp.com
http-01 challenge for www.crabwp.com
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification…
Challenge failed for domain crabwp.com
Challenge failed for domain www.crabwp.com
http-01 challenge for crabwp.com
http-01 challenge for www.crabwp.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: crabwp.com
Type: dns
Detail: No valid IP addresses found for crabwp.com
Domain: www.crabwp.com
Type: dns
Detail: DNS problem: NXDOMAIN looking up A for www.crabwp.com

1 Like

I know, that was the result of my first check - one hour old - https://check-your-website.server-daten.de/?q=crabwp.com

Host T IP-Address is auth. ∑ Queries ∑ Timeout
crabwp.com A yes 1 0
AAAA yes
www.crabwp.com Name Error yes 1 0

If you remove Cloudflare, you have to add your own ip address as A-record.

1 Like

@JuergenAuer
This is my current DNS configuration, is it wrong or missing? Thanks.

Please use online tools to check that.

I pointed to the correct ip but the error still occurs :face_with_raised_eyebrow:
Domain: crabwp.com
Type: dns
Detail: No valid IP addresses found for crabwp.com
Domain: www.crabwp.com
Type: dns
Detail: No valid IP addresses found for www.crabwp.com

Read your last check, 15 minutes old - https://check-your-website.server-daten.de/?q=crabwp.com

There

Host T IP-Address is auth. ∑ Queries ∑ Timeout
crabwp.com A yes 2 0
AAAA yes
www.crabwp.com C crabwp.com yes 1 0

is no ip address.

That's ns1.dnsowl.com your name server, looks like you use a wrong place.

You have an A record named crabwp.com.crabwp.com. and a CNAME record named www.crabwp.com..

So one of them is correct, but one of them has the wrong name.

Looking at a NameSilo tutorial video, it looks like the A record needs to have a blank “hostname” field.

1 Like

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