The hostname (h2gallery.com) does NOT match the Common Name in the certificate (example.com). This certificate is currently invalid for this host

The hostname (h2gallery.com) does NOT match the Common Name in the certificate (example.com). This certificate is currently invalid for this host.
What to do?
I tried deleting all the related files and no matter what I do I think the old cert for the domain is being served and where I might have entered "example.com" as my domain by mistake at some point.

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. crt.sh | 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: h2gallery.com

I ran this command:

It produced this output:

My web server is (include version): Apache/2.4.48 (Unix)

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

My hosting provider, if applicable, is: AWS (Lighsail)

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): N/A

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

Your site is indeed sporting a self-signed "example.com" certificate. How did you get your Let's Encrypt certificate(s)? I.e., which command did you use?

Also note that you've issued 4 IDENTICAL certificates already: crt.sh | h2gallery.com Usually, when there is an issue with the installation of the certificates, it's no use at all to keep issuing brand new, but unnecessary certificates.

1 Like

I've used following process to get the certificate. I've followed the instruction and did added certificate in 10-12 other websites.

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress#integrate-certificates-with-wordpress-using-really-simple-ssl-plugin

Ah, Bitnami.. I ain't touching that. Maybe someone else can help you :slight_smile:

1 Like

Should I contact bitnami then?

Probably not (yet). It's probably a misconfiguration in your webserver stack, but in my opinion Bitnami is such a #)($#()_#())#@( piece of )#($)#($*() and I have absolutely zero knowledge of Bitnami (just looking at guides such as the one you've posted just makes my eyes hurt and makes me want to cry), so I believe I'm not the correct person to lead you through the process. But there are a lot of other people on this Community of which perhaps someone can help you instead of me. Just be patient :slight_smile:

1 Like
sudo certbot -d $DOMAIN -d $WILDCARD --manual --preferred-challenges dns certonly

was the command I used to generate the certificate.

The problem is clearly not with issuing certificates.
[Please stop redoing that step]

The problem is with using the cert.
That said, Bitnami is also an unknown beast to me; So I can't really point you towards a how to for that.

Can you suggest me, where can I get help? Should I contact AWS or bitnami? Or this is the right place?

I would search through this site for "bitnami letsencrypt".
If that doesn't provide enough for you to fix the problem, I would search the Internet.

None of those worked for me. But posting in bitnami community helped.
Here is the link to that thread

1 Like

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