Certificate only for site with www. (not without www. infront)

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: sthlmcity.eu

I ran this command: https://sthlmcity.eu

It produced this output: "Connection not secure"

My web server is (include version): Apache/2.4.38 (Debian)

The operating system my web server runs on is (include version): Debian GNU/Linux 10 (buster)

My hosting provider, if applicable, is:

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 0.31.0

So I get SSL on www.sthlmcity.eu but not on sthlmcity.eu. I think it worked before though. Why does it not work?


When requesting or renewing a certificate ( for example, using certbot ), each individual fully-qualified domain name for the certificate should be included in the request.

e.g.: --domain sthlmcity.eu --domain www.sthlmcity.eu

Alternatively, you might switch to a dns-01 challenge and issue a wildcard certificate.


Okay. I didnt know that. So is there some command I can use in terminal to have both domain names certified?
Maybe there is a Letsencrypt guide I can follow and do it for 2 domains at once, or do it 2 times for both domains?

Edit: I followed this guide: https://certbot.eff.org/lets-encrypt/debianbuster-apache and now im stuck at:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
With this result:
sudo ln -s /snap/bin/certbot /usr/bin/certbot ln: failed to create symbolic link '/usr/bin/certbot': File exists
Can you help me?

Edit 2: Okay so I moved on in the guide and now it works. Thanks for the reply Ezekiel.


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