Do I need to install on a subdomain?

AI-generated summary

In a discussion titled “Do I need to install on a subdomain?” under the Installation category, TDJS95 asks whether Discourse must be installed on a subdomain like discourse.domain.com. Richie clarifies that it’s not required — you can install directly on example.com — but warns that future needs (like hosting a website on the root domain) may make using a subdomain like community.example.com preferable in hindsight. pfaffman adds that current best practice leans toward using a subdomain (e.g., www.domain.com) rather than the bare domain, noting that browsers like Chrome often obscure the difference between domain.com and www.domain.com. They suggest redirecting the bare domain to www using services like https://forcewww.com/. In a later post pfaffman, they reiterate that for standard or hosted installs, using www is advisable; while self-hosted setups can use the bare domain, hosted plans may make it harder. Overall, while not mandatory, using a subdomain (especially www) is recommended for flexibility and alignment with modern practices.

Sorry if this question sounds stupid but I am new to this forum.

Do I have to install it as a subdomain (discourse.domain.com)

No, you can install directly on example.com if you wish.

Subdomains are not a requirement.

However, with hindsight a year or two down the line, you may wish you had used something like community.example.com

We are facing this issue now, as we have a desire to run a web site on our root domain and switching everything over to community.example.com after six years of only using the root, is not ideal :see_no_evil:

Most people today think that you should use a subdomain, so if you think you want domain.com you should use www.domain.com. In Chrome, at least, it’s difficult to tell the differences between domain.com and www.domain.com. You can redirect the bare domain to your www, using https://forcewww.com/ or a bunch of other ways.

Are you doing a standard install, or using discourse.org hosting? In either case, going with WWW rathe than the bare domain is probably what you should do. If you’re self-hosted, it’s not hard to use the bare domain, if you’re buying hosting, it’s harder, but possible sometimes.