Hi Osiris,
Thank you for your kind reply.
I will be more specific. The domain (“domain 1”) on which I needed to install the SSL certificate was used to install a third-party service. This was done automatically by a script that was provided by the service itself. I asked their support staff to help me with the installation of the LetsEncrypt SSL certificate too, and they agreed to do it for me, even if this was outside the scope of their support.
However, both now and in the future I will need to modify the existing SSL certificate, which I’m going to have to do on my own. Notably, I need to add other subdomains to the main SSL certificate. These subdomains are CNAMEs of a second domain (“domain 2”), and they point to the URL of “domain 1”.
I have consulted this guide https://certbot.eff.org/docs/using.html and gave it a try, but it didn’t work.
I found the installed certificate by typing
certbot certificates
and then I ran this command:
certbot certonly --cert-name [name of the existing SSL certificate] -d www.domain1.com,domain1.com,example.domain2.com,www.example.domain2.com
The certificate had been already installed only on “www.domain1.com” and “domain1.com”
I believe I didn’t do any damage, but I was unable to add the CNAMEs under the existing certificate.
This is the error I got:
Failed authorization procedure. example.domain2.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.domain2.com/.well-known/acme-challenge/etctetc: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>", www.example.domain2.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.example.domain2.com
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: example.domain2.com
Type: unauthorized
Detail: Invalid response from
http://example.domain2.com/.well-known/acme-challenge/etcetc:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
- The following errors were reported by the server:
Domain: www.example.domain2.com
Type: connection
Detail: DNS problem: NXDOMAIN looking up A for
www.example.domain2.com
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A 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.
I’d be grateful to you if you could help understand if the initial command itself was incorrect, or if I might have made a mistake subsequently - for example, when I was asked to select the webroot.