Adding CNAME for the root domain issue

John Miller johnmill at brandeis.edu
Wed Apr 27 14:30:31 UTC 2016


If your domain is ourweddingaccount.com, and you're looking to have
the apex record

ourweddingaccount.com.    CNAME     some.other.domain.

but still host other records in the ourweddingaccount.com zone, you
can't.  That's not how CNAME records work.  A CNAME record is an alias
for a particular _label_ within a zone.  It's meant to do things like

myserver.ourweddingaccount.com.   CNAME   some.other.domain.

What you're saying here is that the name "myserver" will always point
to "some.other.domain" __regardless_of_record_type__.  If you're
trying to do this for the __apex_record__ of your zone (just your
domain name, no hostname), you're saying that you don't need SOA or NS
records for your zone--it's a contradiction in terms.  You _must_ use
an A or AAAA record.  Period.

If you're running a web site on a host whose IP address changes
frequently, may I suggest that you let someone else manage your DNS
for you?  Plenty of DNS companies do this:

https://support.cloudflare.com/hc/en-us/articles/200169056-CNAME-Flattening-RFC-compliant-support-for-CNAME-at-the-root
http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/setting-up-route53-zoneapex-elb.html
https://devcenter.heroku.com/articles/apex-domains
https://blog.dnsimple.com/2014/01/why-alias-record/

Otherwise, I suggest that you read

http://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-aka-root-of-a-domain

If you want to manage your own DNS, you need to understand how DNS
works and what its limitations are.

John

On Wed, Apr 27, 2016 at 10:05 AM, Daniel Dawalibi
<daniel.dawalibi at idm.net.lb> wrote:
> Hello John
>
> The below is not working on our BIND version BIND 9.10.0-P2 unless it is working on other version
>
> Domain.com.  CNAME  x.y.com.
> www     CNAME x.y.com.
>
> Errors returned when adding these records:
>
> general: dns_master_load: ourweddingaccount.com.db.inter:13: ourweddingaccount.com: CNAME and other data
>
>
> If we proceed with the below work around by replacing the CNAME with A record, It will resolve but our setup requires a CNAME record.
>
> Domain.com.  A  IPaddress
> www     CNAME x.y.com.
>


More information about the bind-users mailing list