Question

letsencrypt invalid SSL Cert

I have just setup my website(nodejs) with nginx and using lets encrypt for the cert but having problems with “Invalid SSL Cerificate”

if I do a search examplesite.com it redirects to https://examplesite.com everything is fine but when If I search for www.examplesite.com it redirects to https://www.examplesite.com but gives me invalid ssl cerificate.

Anyone know whats going on?

Many thanks Phil

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@Phils

When you setup the certificate, did you specify both? If you do not pass both as options when creating the certificate, one will be valid and the other won’t.

When creating the certificate, you need to pass:

-d www.domain.com -d domain.com

as arguments.

You can delete the existing and simply recreate a new certificate by passing both instances of your domain and then restarting Apache/NGINX.