Hostinger authentication fails with 404

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. https://crt.sh/?q=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: netline.az

I ran this command: sudo certbot --nginx

It produced this output:

root@srv554063:/opt/myproject# sudo certbot --nginx
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.


1: netline.az
2: www.netline.az


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

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: netline.az
Type: unauthorized
Detail: 2a02:4780:a:1578:0:80e:e395:2: Invalid response from http://netline.az/.well-known/acme-challenge/XaLIvn8QxE-Vhuwx3mwmsCTAowWb6e1UKD4UYVjGKtc: 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 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

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

My hosting provider, if applicable, is: Hostinger

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

Oh, this is a common problem with Hostinger. There are both IPv4 and IPv6 addresses in your DNS for that domain name. Hostinger seems to add the IPv6 for new setups but it points to a LiteSpeed server for them.

Let's Encrypt prefers IPv6 when present which is why you see that address in the error message. The "404" means that server told the LE server it could not find the info to reply properly. And, it wouldn't know how because Certbot is running on your nginx server.

Either change your AAAA record to be your server or remove it.

4 Likes

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