Error code: SSL_ERROR_BAD_CERT_DOMAIN

Hi how do i fix the following error in the image , i generated a wildcard cert, so it can server main domain and all subdomains , please help. Thanks

My domain is: rentme.dev

error is :
Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for rentme.dev. The certificate is only valid for *.rentme.dev.

Error code: SSL_ERROR_BAD_CERT_DOMAIN

My web server is (include version): Debian 9, Nginx

I can login to a root shell on my machine (yes)

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. certbot --version
certbot 0.28.0):

1 Like

Hi @ac0dev

your certificate has only the *.rentme.dev domain name. That doesn't work with rentme.dev.

Create one certificate with both domain names and use that.

2 Likes

Thanks again Juergen for the quick reply, if i do create a new cert for only the main web, do i have to keep creating a new one for each sub ? that’s why i wanted the wildcard.

if you have a way i can append both new cert and wildcard into same nginx config, please explain

i think i had misread your solution earlier, i understand now, you meant i should Expand the current to intake also the main domain , thanks for your solution

2 Likes

Yes, that's the standard handling using a wildcard. Always with *.example.com + example.com, so the main domain is included.

1 Like

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