I have installed the discourse on Digital Ocean

I have add my domain’s non-www verison as hostname… And SSL installed on the same.

My https;//domain.com working fine but when I am trying to open with www version it is showing error.

You check if the SSL certificate is valid using

https://www.sslshopper.com/ssl-checker.html#hostname=your-domain.tld
and then
https://www.sslshopper.com/ssl-checker.html#hostname=www.your-domain.tld

You can check the certificate on the command line using openssl

Example.

cd /path/to/your/certificate/folder
openssl x509 -in your-certificate-file-name -text -noout

I have changed the hostname in app.yml file and added www. with the domain.
After doing so, www. is opeing with SSL and non www is not opening.

It is showing No SSL certificates were found on www.theheartbeat.com. Make sure that the name resolves to the correct server and that the SSL port (default is 443) is open on your server’s firewall. for both

This might help you.

https://meta.discourse.org/t/is-it-possible-to-verify-both-www-and-non-www-version-of-my-site-using-letsencrypt-using-discourse-setup-file/79964

You need to issue a DNS redirection from www.example.com to example.com.

This is easier because you’re forwarding from www to root / apex, and not vice-versa.

Also this has nothing to do with Discourse, really, it is a generic DNS question.

6 Likes