I have installed the discourse on Digital Ocean


#1

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.


#3

It will show error because no web server is available to handle the request for the www subdomain.

What domain do You want your forum to open on?

www.example.com
Or
example.com

Also, how did You install discourse? Their 1 click install application or the official 30 minutes install guide?


#4

I want to load this without www and when I put url with www it should redirect to non-www.

I have installed using 30 minutes guide.


#5

You should set up a redirect either via cloudflare or directly on Your server to forward all the requests to the non-www version.


#6

Can you guide me how to create redirect in server?


#7

Are You comfortable with SSH?

If so, You can set up a reverse proxy (e.g. nginx) and then set up the redirect from there.

Process will be:

  • Stop discourse.
  • Edit the YAML file (app.yml)
  • comment out the ssl template and expose lines and add the entry for the web.socketed template.
  • Rebuild discourse
  • Install nginx
  • Configure letsencrypt on your domain
  • Configure nginx to forward requests to discourse socket.

#8

not too much comfortable with SSH, but I can do this.


#9

Good.
All the best :wink:
Let me know how it goes.