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. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
sudo certbot certonly --webroot --agree-tos --email -d -w /var/www/html/

It produced this output:
root@mail:~# sudo certbot certonly --webroot --agree-tos --email -d -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
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Challenge failed for domain
http-01 challenge for
Cleaning up challenges
Some challenges have failed.


  • The following errors were reported by the server:

    Type: connection
    Detail: 2606:4700:3033::6815:2839: Fetching
    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

My hosting provider, if applicable, is:

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

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


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.



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:

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 -d -w /var/www/thing -d -d (default: Ask)


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