Can anyone explain to me why it is often said that Discourse can be installed on a regular domain without having to install it on a subdomain, but only some dns support this? I really don’t understand why only some dns support this thing, I can’t figure it out what the problem is. I’m just asking to understand technically what the point is. Thanks in advance!
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 normally expects the configured name to be a
CNAME record, which is a type of alias. The
C stands for “canonical”. For example, the record dor this site,
meta.discourse.org, is a CNAME (as I write this) pointing to
Because of the way DNS delegation is structured — where the top-level domain like
.com sends requests for second-level domains to a server configured by the registrant — 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.
by the way it happens to be designed and implemented by CDCK, not as an inherent limitation of hosting ↩︎
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. ↩︎
and, in fact, this can continue on —
things.stuff.example.orgright on down ↩︎
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.