Domain could not be validated with ssl let's encrypt

I have this problem whenever I try to install let's encrypt: Domain could not be validated, error message: error type: urn:ietf:params:acme:error:unauthorized, error detail: 2a02:4780:27:1068:0:322e:6f2f:3: Invalid response from 404

My VPS features:

My server is running: nginx
My domain is:
PHP version: 7.4
OS: Ubuntu 22.04

This is nslookup of the domain:

# nslookup

Non-authoritative answer:
Address: 2a02:4780:27:1068:0:322e:6f2f:3

And this is my vhost:

server {
  listen 80;
  listen [::]:80;
  root /home/docteur-aoun/htdocs/;
  #skip challenge requests and
  location ^/(?!\.well-known) {
    #send all other requests to HTTPS
    return 301 https://$host$request_uri;
  auth_basic off;
  allow all;

Open a shell on your vps and check if that IP address is the right one:

curl -6

I ran the command and this is the results:


You should replace the contents of your AAAA record with that. (And check if that works. IPv6 can work in different ways.)


If that fails, speak with your IPv6 provider.
Maybe they can explain how they "make it work".


I mean, as an intermediate option, iproute2 should know.

1 Like

Itried that, now I get this: Domain could not be validated, error message: error type: urn:ietf:params:acme:error:unauthorized, error detail: 2a02:4780:28:e1f::1: Invalid response from 404

What command are you using to request the cert?

1 Like

Let's check/test the expected challenge location:

  • create the path:
    mkdir -p /home/docteur-aoun/htdocs/

  • place a sample test file in the expected challenge location:
    echo "testing" > /home/docteur-aoun/htdocs/

  • verify access to the test file:
    curl -4
    curl -6

1 Like

I did not mention this before, but I am using cloudpanel to install let's encrypt ssl


Are there any other names that could conflict with this one?
Are there any using a wildcard?


I don't think the nginx server block above is the one being used. It should redirect non-ACME requests to HTTPS but instead I get a 403

curl -I4
HTTP/1.1 403 Forbidden
Server: nginx

What other devices are between your nginx server and the internet? A router? A firewall device?


I do have a subdomains

I am using a VPS server

Try running the same curl command, use 4 instead of 6 and tell us what happens.

I have those 2 records in my dns zone editor in hostinger:

Those are fine.

What could be the cause for failed validations, because I have another domain before this one and has been validated smoothly without any issues what so ever.

I would check if your IPv4 is the right one:

curl -4

I get this IP:

which is the correct ip for my VPS