Installing Discourse on regular domain

I think you’re referring to Configure your hosted Discourse site to run at the root or apex domain (e.g. example.com) — which only applies to instances hosted by Discourse. I don’t think this applies to individual, single-instance hosting.

The issue is that this hosting setup[1] normally expects the configured name to be a CNAME record, which is a type of alias. The C stands for “canonical”.[2] For example, the record dor this site, meta.discourse.org, is a CNAME (as I write this) pointing to app-cname-target.cdck-prod-meta.discourse.cloud.

Because of the way DNS delegation is structured — where the top-level domain like .org or .com sends requests for second-level domains to a server configured by the registrant[3] — you can only configure CNAMEs for hostnames under the domain you get.

To work around this limitation, several DNS providers provide what they call an ANAME record, or “CNAME flattening”. This works just fine with any record, including one for your delegated “bare” or “apex” domain. This is not a real, standard part of DNS, but proprietary behind-the-scenes cleverness provided by the DNS company — and, simply, not every provider does that.

There is something else you can do, though:

  • Set up your “apex” domain to redirect, so that for example example.net redirects to forum.example.net. Here, people would still see and use the longer name, but they could get there from the short one.

And possibly another option:

  • Set up a transparent reverse proxy on your “apex” domain. This is complicated and I’m not sure will work easily with CDCK’s setup, but I’m mentioning it for completeness.

  1. by the way it happens to be designed and implemented by CDCK, not as an inherent limitation of hosting ↩︎

  2. Meant in the sense common in computing of “prefered official name” — one might have www.example.org as a CNAME to serverhost003.example.org, but if server number 3 goes down you just change the CNAME and keep going. Oddly, Merriam-Webster does not really have an entry for this sense. ↩︎

  3. and, in fact, this can continue on — example.org could delegate stuff.example.org, and stuff.example.org could delegate things.stuff.example.org right on down ↩︎

3 Likes