Problem in installing Let's Encrypt SSL for www and non-www

(Gulshan Kumar) #1

TLDR: Only one version is working with SSL, either www or non-www, as same as hostname provided while installation.

It’s related to Let’s Encrypt SSL installation as written at Docs.

So, after launching setup it was asked to enter

Hostname for your Discourse? []: 

So, I typed

Next, after installing Discourse, I am facing one problem that SSL is not working for the www version.
For non-www, it’s works fine.

Ideally, I would like to have SSL for www and non-www version also.

I repeated entire process this time with hostname, then SSL for non-www is not working.

What’s I am missing?

(Bhanu Sharma) #2

An easy solution without much messing with the core will be to run discourse behind an nginx reverse proxy and configuring ssl from there.

Other way (I’m not very sure of it) may be to add a letsencrypt command to the ‘after commands’ in app.yml.

(Gulshan Kumar) #3

My problem is similar to SSL working on root, but not on www
I am not getting whole point. In my case, DNS record is also fine. I followed the step by step instruction, I believe it should work, but it’s not working.

(Bhanu Sharma) #4

Your topic & the topic you mentioned seem unrelated as discourse generates a valid certificate for the hostname you specify during install, in the other topic, when they install on www, their cert reports as invalid. I don’t think discourse supports multiple domains for standalone install natively.