Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Incubator Q&A

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

+2
−0

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 to otherdomain.example
  • www CNAME to otherdomain.example
  • @ MX to mail.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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+0
−0

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »