Can't Issue New Certificate

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: certbot --nginx

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for and

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Type: unauthorized
Detail: 2a01:4f9:c010:ce96::1: Invalid response from 404

Type: unauthorized
Detail: 2a01:4f9:c010:ce96::1: Invalid response from 404

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

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): nginx/1.22.1

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

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 2.1.0

Yes, I know there's a newer version of certbot. I've tried using the snap version with the same result and promptly uninstalled because I hate snaps.

Can you share your nginx server configurations? It seems like certbot's attempt to add the handler for the acme challenge isn't working. There's potentially something in the nginx config.

It looks like your homepage may be static html. If you've already got it serving files off disk, an alternative approach to --nginx is to use certbot's --webroot: User Guide — Certbot 2.6.0 documentation


It's the stock configuration from Debian 12's repository with the following in /etc/nginx/sites-available/ (and symlinked into /etc/nginx/sites-enabled):

server {
    listen 80;
    if ($host = {
        return 301$request_uri;
    location / {
        proxy_set_header Host $host;

For additional context the IP range is being handled by a WireGuard VPN.

Your DNS has an AAAA record for IPv6 but your nginx is not listening on IPv6. So, inbound requests fail to reach the expected server block.

Your listen for port 80 should look like below and similarly for port 443 when you get to that.

    listen 80;
    listen [::]:80;


You're awesome. Thanks! :smiley:


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