Error when creating certificate (failed challenges)

I'm getting a failed challenges error that I didn't encounter the first time I used certbot long time ago.

My domain is:

I ran this command: sudo certbot certonly --standalone -d

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Requesting a certificate for
Performing the following challenges:
http-01 challenge for
Waiting for verification...
Challenge failed for domain
http-01 challenge for

Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
  Type:   unauthorized
  Detail: Invalid response from []: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /.well-known/"

Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.

Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): None, there's nothing on port 80 nor 443. The first time I used certbot it worked perfectly with the same command.

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

My hosting provider, if applicable, is: Contabo

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

There's an Express webserver listening on port 443 and port 80 is redirecting to HTTPS. HTTPS is offering a Cloudflare Origin certificate for * and

All these hostnames resolve to Cloudflare IP addresses by the way.


After reading this I checked the only Express server I have: it is running in different ports, and running netstat -an |grep :80 does not show anything + I don't own that domain name anymore.

Then I remembered that I had an iptables rule redirecting ports 80 and 443. Disabled them and I could get my certificate.

Thank you!


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