Setup discourse for the main site (www.example.com) not on a subdomain

AI-generated summary

kforr wants to set up Discourse on the main site (example.com) instead of a subdomain. JammyDodger confirms it’s possible but not recommended, as it may cause conflicts if additional content is added on subdomains later. JammyDodger mentions potential issues with sticky cookies and advises against it if other content will be hosted on the domain. However, IAmGav suggests setting the A Record for both www.example.com and example.com to point to Discourse can make it work. JammyDodger also shares a useful tip on setting up Let’s Encrypt certificates for multiple domains. kforr plans to try the setup.

Hi,
I have discourse set up on Azure.
However I don’t want it to be on a subdomain.
I want it on the main site which is www.example.com or just example.com
Try to find it in this forum but without luck, just want to check if this is not possible?

www.example.com is a subdomain. :+1:

But you can also install it on a root domain too (example.com), it’s just not recommended.

I’m just curious — but why not?

I’m trying to dig out the topic I read it in, but it’s proving elusive…

From memory, I think it’s okay if you’ve decided there’s definitely never going to be anything other than your forum on that domain. If you add more content on subdomains later then it can cause some conflicts (something about sticky cookies?).

There may be other reasons too. :slightly_smiling_face:

Thank you! I’ll give it a try tomorrow! :slight_smile:

I also found this tip really useful to get a letsencrypt certificate working for both www.example.com as well as the example.com address. :+1:

if you set your DNS records so that the A Record for both points to discourse, then its possible.