Challenge failed for domain (second request for the same domain)

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:
mail.meetle.xyz

I ran this command:
sudo certbot certonly --webroot --agree-tos --email alexander.seidl+letsencrypt@gmail.com -d mail.meetle.xyz -w /var/www/html/

It produced this output:
root@mail:~# sudo certbot certonly --webroot --agree-tos --email alexander.seidl+letsencrypt@gmail.com -d mail.meetle.xyz -w /var/www/html/
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mail.meetle.xyz
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Challenge failed for domain mail.meetle.xyz
http-01 challenge for mail.meetle.xyz
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: mail.meetle.xyz
    Type: connection
    Detail: 2606:4700:3033::6815:2839: Fetching
    https://mail.meetle.xyz/.well-known/acme-challenge/Bi4oosBTgXJDQwy5Fcnk42apPSObEX72lAhhSu7cx0w:
    Redirect loop detected

    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.

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

The operating system my web server runs on is (include version):
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
root@mail:~#

My hosting provider, if applicable, is:
Hetzner

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 0.40.0

Show us the nginx config handling that domain name (the server blocks for port 80 and 443 should be enough)

1 Like

Can you provide a command i can do to get this Information?

This is not a Let's Encrypt specific issue, but a generic issue with your site. If I go to http://mail.meetle.xyz/ in my browser, it too errors out with a "too many redirects" error.

Please fix your site in general and after that you can try to get a certificate again.

2 Likes

If you are on Ubuntu, it's most likely a file somewhere in /etc/nginx

but if you don't know how to configure nginx, it's unlikely you'd recognize the proper config. Who installed this for you?

1 Like

I managed to solve the problem.
I have a backup of the certificate from my request before.
And i could install it in nginx.

Thanks for taking the time to solve my problem.

Regards

2 Likes

I am glad you got it working. For the future the command format should have the webroot path (-w) before the domain name (-d). From the certbot docs:

webroot:
Place files in webroot directory

--webroot-path WEBROOT_PATH, -w WEBROOT_PATH
public_html / webroot path. This can be specified multiple times to handle different domains; each domain will have the webroot path that preceded it.
For instance: -w /var/www/example -d example.com -d www.example.com -w /var/www/thing -d thing.net -d m.thing.net (default: Ask)

3 Likes