Initial certificate is issued but certbot renew --dry-run fails for www domain

Hi there,

I have a ww and non www domain. I have gotten a certificate sucessfully.
certbot renew --dry-run Fails for the www domain only

When I create a file in www.mydomain.com/.well-known/acme-challenge/

It opens successfully. All www domains should be redirected to the non www ones I’m doing this via a general rule:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

Ensure your certificate covers both names.
Ensure both sites are served by the same vhost config (or by very similar configs).

That still did not work made them share the same config. Cleans up the configuration though.

<VirtualHost *>
ServerAdmin mail@mysite.com
ServerName mysite.com
ServerAlias mysite.com www.mysite.com
DocumentRoot /var/www/html/mysite.com
ErrorLog /var/log/apache_error.log
CustomLog /var/log/apache_access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.mysite.com.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.mysite.com.de/privkey.pem
</VirtualHost>

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:

I ran this command:

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

Domain: www.museumstreak.com
Domain: www.benediktdichgans.de
I ran this command: certbot renew --dry-run

Output:
The following certs could not be renewed:
/etc/letsencrypt/live/www.dichgans-besserer.de/fullchain.pem (failure)
/etc/letsencrypt/live/www.benediktdichgans.de/fullchain.pem (failure)

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.

  • The following errors were reported by the server:

Domain: www.museumstreak.com
Type: connection
Detail: Fetching
http://www.museumstreak.com/.well-known/acme-challenge/m048eD_Qic004SJCNjc_1Oinm-N3V_GAnbvx7DTMoHY:
Timeout

Domain: www.benediktdichgans.de
Type: connection
Detail: Fetching
http://www.benediktdichgans.de/.well-known/acme-challenge/n3aHrFgoAwvodOYUcdnYgGNtOuA2b0EOGMk83elFn0E:
Timeout

Server version: Apache/2.4.18 (Ubuntu)
Server built: 2017-09-18T15:09:02

The operating system my web server runs on is (include version):
|Description:|Ubuntu 16.04.3 LTS|
|Release:|16.04|
|Codename:|xenial|

My hosting provider, if applicable, is: Digital Ocean

I can login with root shell: yes
I’m using a control panel to manage my site no

Your site isn’t accessible in IPv6 even though it advertises an IPv6 AAAA record for 2a03:b0c0:3:d0::c88:4001.

Hi, thanks for helping me. Do you know what I might have to change to make it accessible via IPv6?

You might have to add a particular Listen directive in Apache to make sure it’s listening in IPv6 and not IPv4. It depends on your existing virtual host configuration.

A command like ss -plt can show whether Apache is in fact already listening on IPv6 or only IPv4. (There are other options that might output exactly what you need but I don’t know ss very well yet.)

You could also check whether there are any firewalls that have exceptions to allow incoming IPv4 but not IPv6 connections.

Thanks that fixed the problem!

This tutorial helped me: https://www.digitalocean.com/community/tutorials/how-to-enable-ipv6-for-digitalocean-droplets#testing-the-connection

1 Like

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