Can't set "example.com" as a CNAME record?

19

9

I'm currently running a server at home, but I have a dynamic IP. So I subscribed to a dynamic dns service(dlinkddns.com). I made all the correct settings in my own network, and the ip updates perfectly.

The problem is that I have a domainname(let's say: "example.com"), and I want to set the root domainname without any prefixes ("example.com") to CNAME to my dlinkddns domain. But my domain name DNS host says I can't do that(it's "not allowed"). I can do it for "www.example.com" etc. and that works perfectly, but just not for the root domain name. Anyone knows a solution to this?

teuneboon

Posted 2011-03-31T13:57:00.693

Reputation: 473

Which DNS host are you using ? It sounds like their software wants an A Record to have a prefix to the Domain like www.domain.com for a reason. – Jonathan Ross – 2011-03-31T14:00:11.277

I use a Dutch one: www.webreus.nl . So if it might just be their software screwing me over? :P – None – 2011-03-31T14:02:39.407

I'd ask them for help or check documentation. – Jonathan Ross – 2011-03-31T14:28:18.737

Answers

27

You cannot set a CNAME record for a root domain (e.g., example.com) because that would break RFC 1034 section 3.6.2, which states,

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

You can’t do this for example.com because example.com will also have NS records to make it work which breaks the rule that no other data should be present.

You can have a CNAME record for www.example.com because this is not the root domain, and therefore it is easy to have no other data present for it.

The only ways to get around this are to either

  • use the www prefix, or
  • to get your domain parked where you want the CNAME record to point, and get the relevant IP address to set up an A record for example.com.

I just read that you’re using dynamic DNS. Some dynamic DNS providers can work with your domain if you host it on their nameservers: this way their dynamic DNS updaters can update example.com’s IP address, and you avoid any CNAME issues altogether. Off the top of my head I only know of dyndns offering this as a paid service.

anthonysomerset

Posted 2011-03-31T13:57:00.693

Reputation: 459

I also wanted to set up a CNAME on the FQDN I got for free from no-ip and host my DNS server myself. Seems like it's quite hard. – Aki – 2013-11-04T17:51:31.107

For what it's worth, Hover.com does allow you to use a CNAME on a naked domain (aka apex of the domain). No warning is given when doing this through their interface. I've no idea of the practical effects, but it's working for me so far. – Mason G. Zhwiti – 2014-02-13T08:30:58.660

MasonG.Zhwiti Just because you can, doesn't mean you should... it still breaks RFC's and likely will cause significant problems for you if you did – anthonysomerset – 2014-02-14T11:07:41.943

1Assuming the NS and SOA data is the same for the alias domain as it is for the canonical domain, is it possible to not have any NS and SOA records, and just have the one CNAME present at the alias domain's root? If possible, seems this would still satisfy the quoted statement from the RFC. – Gary – 2014-03-10T15:53:39.703

4

You can not set naked domain name in CNAME records. You must have to do ONLY those settings for alias domains like www.example.com , about.example.com and more at CNAME records and the primary or ROOT domain settings must be done at A Records and you have to provide IP address of host. First delete the settings from CNAME about the naked domain and set it at "A Records" and then do settings at C Name for alias like www, about or anything like that.

This may help you: A Records, CNAME, MX Records : Basics to Setup Your Blog

pravin

Posted 2011-03-31T13:57:00.693

Reputation: 41

1

I found that CNAME of a naked domain via @ Record like mentioned here doesn't work for some domain providers. To get out from this you can consider to point your NAME SERVERS to a DNS provider who support the ALIAS or ANAME.

Follow to this there are some DNS hosts provide a way to get CNAME-like functionality at the zone apex (the root domain level, for the naked domain name) using a custom record type.

Such records include, for example:

  • ALIAS at DNSimple
  • ANAME at DNS Made Easy
  • ANAME at easyDNS
  • CNAME at CloudFlare
  • ALIAS at CloudDNS

For each provider, the setup is similar: point the ALIAS or ANAME entry for your apex domain to example.yourdomain.com, just as you would with a CNAME record.

ALIAS or ANAME or @ example.whateverdomain.com.

Chetabahana

Posted 2011-03-31T13:57:00.693

Reputation: 121