SSL - Error

Hi
I install CentOS 7 on vmware. I install virtualmin and webmin.
I create virtual server robot.pl

I added position in /etc/hosts
robot.com 192.168.1.234
www.robot.com 192.168.234

Its working.
Next i try to use ssl - let’s encrypt
I go to Manage SSL Certificate
and i have:

SSL certificate file /home/robot/ssl.cert
SSL private key file /home/robot/ssl.key
Web server hostname *.robot.pl Issuer name *.robot.pl
Expiry date Oct 4 14:02:29 2023 GMT Certificate type Self-signed
Other domain names robot.pl

When i click in navigation to Let’s Encrypt i see

Domains associated with this server
robot.pl
www.robot.pl

When i type in browser https://robot.pl
i see

robot.pl uses an invalid security certificate. The certificate is not trusted because it is self-signed.

but when i type in browser https://www.robot.pl/

www.robot.pl uses an invalid security certificate. The certificate is not trusted because it is self-signed. The certificate is only valid for robot.pl

My qestion is, why “The certificate is only valid for robot.pl”?

in options “Domains associated with this server” i see two positions: robot.pl and www.robot.pl

Sorry, i had to rewrite my answer as i misunderstood your question, is this all on a local machine…you mentioned vmware?

If so,

The short answer, I would just redirect subdomain…

https://superuser.com/questions/601574/how-do-i-redirect-a-domain-to-another-domain-locally

If a production server, then I use virtualmin to do this automatically in virtualin>server configuration>manage ssl certificate, and I never encounter your problem.

yes, i use vmware. yes i know i can redirect but i wonder why “The certificate is only valid for robot.pl”? why not for both? // (robot.pl and www.robot.pl)

ok i solved the problem

Generate self-signed certificate and key-> domain name www.robot.pl and Other domian robot.pl

sorry for banal qestion