Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.
Why won't setting a CNAME DNS record for the domain apex work? Question
I am setting up a domain that uses a CNAME
record so that is hosted on the same server as another site. I seem to be able to set up the www
subdomain just fine with a CNAME
but I'm having trouble with bare domain name (where there is no subdomain at the domain apex).
Desired records for mydomain.example
-
@
CNAME
tootherdomain.example
-
www
CNAME
tootherdomain.example
-
@
MX
tomail.myemailhost.example
I've now tried to set this up with several DNS hosts. Most won't even allow me to use a CNAME
for the domain apex. I did find one that allows it, and it seems to kinda work, but now email for my domain doesn't get delivered properly.
Is it even possible to use a CNAME
for the domain apex? It doesn't seem to work for me.
1 answer
DNS specifications say that CNAME
records can't co-exist with other records at the same level. That precludes using a CNAME
at the apex because there are other record types that have to be attached to the apex.
Most DNS providers won't let you put a CNAME
at the apex because their DNS software isn't compatible with it. Some providers may let you do it, but other things (like email delivery) may subtly break.
An A
record that points your domain apex to an IP address works at the domain apex. You should prefer to use an A
record if you can point to an IP address.
Some DNS hosts (like Namecheap and Route 53) have a workaround to point the domain apex to some other domain. You can specify an ALIAS
or ANAME
record type and put a name into it just like a CNAME
. These providers periodically look up the IP address from that name and serve it as an A
record. You can think of it as a proxied A
record. Unfortunately not all DNS providers have support for this.
0 comment threads