Redirect non-www to


So, I have Ubuntu 18.04. I did not install any web server (as far as I know). All I want to do is to tell the web browser that when someone type my website like, the URL box should show

How can I do that in Discourse?


1 Like

Never mind. I just added the www to the domain in app.yml on DISCOURSE_HOSTNAME: and it worked. Now the site is directing to

Generally you redirect using your DNS controls, so have the apex domain redirect to

We don’t recommend putting Discourse at the root unless you’re absolutely certain you will never have any other content on your website.


Hi Jeff,

I tried DNS but I guess the change was going to populate the net. I did use the app.yml to make it happen and I am happy with it. I am not planing to have other contents in my server.

Thanks for the input.


1 Like