My domain is: themos.com www.themos.com fptp.themos.com
I ran this command: sudo certbot --nginx
It produced this output:
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: themos.com
Type: unauthorized
Detail: 2607:f1c0:100f:f000::25b: Invalid response from http://themos.com/.well-known/acme-challenge/hj0u5TY73iCof9F3tkr-pyzEGa6dH5tdSnS57nfO3z4: 204
Domain: www.themos.com
Type: unauthorized
Detail: 2607:f1c0:100f:f000::25b: Invalid response from http://www.themos.com/.well-known/acme-challenge/xg07i7ZmezSMPZcWxU-gylqLq2Bi8f48-oNAwIz8TEE: 204
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.
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
My hosting provider, if applicable, is: https://www.hostinger.com/
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.9.0
Before creating a new topic I've reviewed all possible materials both here and over other resources. The problem is a bit tricky. I've tried all suggested methods including creating a test file in the /.well-known/acme-challenges/ directory and trying to access it outside of my network (including from mobile phone). I've also tried to run certbot with --debug-challenges flag so it stopped after creating a test file and provided me URL of it. I could open it with status 200 and there was the correct expected value provided on the page. The trickiest part is that I can generate a valid certificate for my fptp.themos.com domain, but www.themos.com and themos.com domains fails with 204 status. Both domain addresses points to my VPS. I have the same nginx configuration for all domains. Any ideas what could be the root cause?