SSL for HTTPS and www

Hi Everyone,
Can anyone explain in a simple way how to generate a ssl certyficate for all cases:
lifttechnik.pl
https://lifttechnik.pl
www.lifttechnik.pl
https://www.lifttechnik.pl

I use such a command:
certbot certonly -a manual -d lifttechnik.pl --preferred-challenges http

.htaccess file contain a code
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.
RewriteCond %{HTTPS}s ^on(s)|off
RewriteCond http%1://%{HTTP_HOST} ^(https?://)(www.)?(.+)$
RewriteRule ^ %1%3%{REQUEST_URI} [R=301,L]

I am a beginner, so please be understanding.

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: lifttechnik.pl

I ran this command: certbot certonly -a manual -d lifttechnik.pl --preferred-challenges http

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):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

2 Likes

The certificate you got on 2022-09-21 Common Name is lifttechnik.pl also the Matching Identities is the same. You want Matching Identities to contain both lifttechnik.pl and www.lifttechnik.pl
See crt.sh | lifttechnik.pl

Matching Identities is also know as Alternative names and Subject Alternative Name (SAN)

2 Likes

In the simplest of words, just add both names to the single request:

certbot certonly -a manual -d lifttechnik.pl -d www.lifttechnik.pl --preferred-challenges http
5 Likes

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