Announcement

Collapse
No announcement yet.

DNS question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DNS question

    Sorry for the basic DNS question. I know this isn’t specifically a discourse thing, just trying to figure out the best way to handle this with discourse in the mix.

    I want to setup a discourse server on a subdomain (eg. community.example.com)

    However, I’d like to have the root domain (e.g. example.com) forward the user to the subdomain (e.g. community.example.com).

    I’d like to do this to effectively reserve the root for the future use of another service (say a webserver), but not require users to type in the subdomain to get to the discourse server for now.

    Is the best way to setup two A records (one for the root and one for the subdomain) that both point to the discourse server?

    I was initially thinking that I should setup a CNAME that points from the root to the subdomain, but digital ocean doesn’t seem to let me do that.

    Thanks in advance, and again, sorry for the basic question.

  • #2
    For your purposes, the CNAME records are just a pointer in the DNS lookup. The browser doesn’t follow CNAME redirections.

    Comment


    • #3
      You can point community.example.com to your server with an A record, then set the root domain to a simple 301 redirect toward that subdomain so it stays free for future plans. I usually double-check my DNS setup with tools like the dns server list, since it helps me spot weird delays before they bite. This setup keeps things clean and future‑proof without extra fuss.

      Comment

      Working...
      X