Certbot fails to create a certificate. Help

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: deff.com.tr

I ran this command: sudo certbot --nginx -d deff.com.tr -v

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Requesting a certificate for deff.com.tr
Performing the following challenges:
http-01 challenge for deff.com.tr
Waiting for verification...
Challenge failed for domain deff.com.tr
http-01 challenge for deff.com.tr
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: deff.com.tr
Type: unauthorized
Detail: 2a02:4780:8:797:0:2ba9:bf49:2: Invalid response from http://deff.com.tr/.well-known/acme-challenge/qqxf6OQ4W-At0lpj4R292a-f6pqYWXX5sK1yNQF7IFg: 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.
Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. 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.24.0 (Ubuntu)

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

My hosting provider, if applicable, is:

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 3.1.0

sudo tail /var/log/letsencrypt/letsencrypt.log
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/snap/certbot/4325/lib/python3.12/site-packages/certbot/_internal/client.py", line 497, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, self.config, best_effort)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot/_internal/auth_handler.py", line 108, in handle_authorizations
self._poll_authorizations(authzrs, max_retries, max_time_mins, best_effort)
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot/_internal/auth_handler.py", line 212, in _poll_authorizations
raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.
2025-02-07 06:59:44,455:ERROR:certbot._internal.log:Some challenges have failed.

The domain NS is pinned to Hostinger hosting panel. Now I created a new website using django on my VDS. Changed DNS in hosting panel (A records for deff.com.tr and www.deff.com.tr)

Server IP: 116.203.214.226

Maybe it's an old AAAA record that causes it?

I am completely lost. Have been using certbot for a while, never faced this problem before.

Could be, but I don't see one right now.

Or maybe the AAAA record was right but that server block was only listening on IPv4?

I removed it. Cannot check if it's fixed due to too many failed authorizations for my domain
And yes, my server is listening on IPv4 only

Turns out the old AAAA record that was pointing to my old server WAS the problem.

Yes, that's a common issue.

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