Failed to verificate on site which has already https enabled


I am trying to install Letsencrypt. On my site I have already a working SSL solution (RapidSSL), but I want to replace it by Letsenrypt.

./letsencrypt-auto certonly --agree-tos --webroot --webroot-path /home/html/ -d -d

(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
http-01 challenge for
Using the webroot path /home/html/ for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching Timeout, (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching Timeout

 - The following errors were reported by the server:

   Type:   connection
   Detail: Fetching

   Type:   connection
   Detail: Fetching

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.

The $ ls /home/html/ is created and accessible:

@-MBP:~$ curl ""
<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="">here</a>.</p>
<address>Apache/2.2.22 (Debian) Server at Port 80</address>
@-MBP:~$ curl "" -L
<title>403 Forbidden</title>
<p>You don't have permission to access /.well-known/
on this server.</p>
<address>Apache/2.2.22 (Debian) Server at Port 443</address>


- - [16/Nov/2017:12:35:47 +0100] "GET /.well-known/acme-challenge/- HTTP/1.1" 301 296 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +" 2541 262 698 and are accessible.
all fail with error 404.

The webroot "/home/html/"
places the /.well-known/acme-challenge/ folder at:
Does that directory also exist?
Place a test.txt file there and it should be accessible via:
then retry the renewal.

Thanks for the reply:

/home/html/ - it is exists
/home/html/ - acme-challenge directory and keys in it are only existing while the letsencrypt-auto script is running.

I created test.txt:

and it is accessible from web.

My htaccess:

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^(www\.)? [NC]
RewriteRule (.*)$1 [L,R=301,QSA]

Prior to this change IPv4 would be preferred for all dual-homed hosts. You may notice new validation failures for domains that publish an AAAA record but are only configured to respond to challenges for IPv4.

I think this is the problem. My server/domain has AAAA records set, but it is not available from ipv6. Is there any way to set/prefer ipv4 in letsenrypt-auto?

I’m not able to access the TEST.TXT file (404 error).

And I don’t see an AAAA record:



Is your domain not actually It kind of wastes a lot of time when people don’t share their real domains for this reason, because IPv6 is one of the first things that many of us would look for and test in this situation!

The server checks IPv6 before IPv4 and this behavior is mandatory. If you can’t support IPv6, you shouldn’t advertise AAAA records. If you somehow can’t remove your invalid AAAA records, you should use the DNS-01 challenge method instead of one of the challenge methods that requires connecting to your server.

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