It now seems to be working. The issue I think was that I had an A record for the subdomain www (as in www.example.com) instead of using a CNAME record. For anyone reading this in future, the right config seems to be:
An A record pointing to the IP address of your host (e.g. Digital Oceans droplet)
Hi @ufukayyildiz Iâm not sure how to answer your questionâlook through the thread at my previous post describing my setup, and then this post with the changes to that.
Where are you up to? What errors are you getting?
If you give some more information then I might be able to help you.
When i install discourse i only entered my domain without www. So www version has no certificate. Now i want to add certificate to www version too. But i am not sure how can do this exactly.
With my setup my issue was not with the letsencrypt certificate, but rather with the way that my DNS records were setup. Thatâs what makes troubleshooting hard, because your DNS, your letencrypt and your app.yml all need to be aligned to make this work.
My understanding is that to âmake www. workâ there are two options:
(1) is to make sure that your letsencrypt works for the subdomain so that people can access your site through https://www.yoursite.com - this is probably ideal, but I never got this working. See responses from @pfaffman and @dionbeukes and ignore mine if this is what you are after.
(2) is more simple which is to setup the DNS for your site so that anyone typing in the www.yousite.com simply gets taken to the https://yoursite.com automaticallyâthey wonât get any security warnings.
You do this through your DNS (e.g., in your host provider) by making sure that you have a CNAME record for yoursite.com but notwww.yoursite.com
I probably need the disclaimer that my posts are simply what worked for me with this issue, where my setup is digital oceans server and dreamhost domain management with their one click letâs encrypt cert.