50

Is it possible to set a CNAME record at the top of a domain? (i.e. @ CNAME www, @ CNAME foobar.com., etc.)

My ISP says that it's only possible to use CNAME's for subdomains but I've read somewhere else that is should be possible even if not recommended.

Andrew B
  • 33,868
Martin
  • 795

3 Answers3

36

Not possible - this would conflict with the SOA- and NS-records at the domain root.

From RFC1912 section 2.4: "A CNAME record is not allowed to coexist with any other data."

Jesper
  • 964
5

You can setup your domain to be a CNAME to another domain, but then everything will go to that other domain -- including mail and the SOA "start-of-authority" record itself. However, you can still have separate subdomains, like "private.domain.com" use another mail and web server.

Otheus
  • 327
0

I use cloudflare to setup CNAME for root domain and it works fine.. without breaking the mail records

Anandu
  • 37