DNAME aliases all hosts except domain's root record

I'm using BIND9, and I've got two domains, one of which I would like to completely alias to the other. For the sake of agrument, we'll call them domain.com, and domain.be. I've got multiple "A" records in the domain.com zone, and only one record in the domain.be zone, a DNAME pointing to domain.com.

blah1 IN A
blah2 IN A
blah3 IN A

IN DNAME domain.com.


This all works fine, I get responses when looking up blah1/2/3.domain.com, and blah1/2/3.domain.be. HOWEVER, I do NOT get a response when looking up domain.be (i.e., without a hostname, just the domain). Should this DNAME not alias the root record (RR) to domain.com as well? If not, why? And if it IS supposed to, any clue why it's not?

Also, if this is a normal occurrence, is there any way to alternatively point domain.be to domain.com, while keeping the DNAME in order to keep the dynamic aliasing?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris DentPowerShell DeveloperCommented:

I believe this is behaviour by design. DNAME exists to map a subtree to a different zone.

Your need for it to map a record at the same level as the DNAME is not discussed at all.


References: http://www.ietf.org/rfc/rfc2672.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DNAME is a macro option (used by BIND) to synthesize CNAME RRs (RESOURCE records, no such thing as ROOT record)
CNAME records in turn do not work for SMTP (both MX and A fallback)
And for NS server names.
For DNS testing it would be useful if you tell your domain name and NS IPs so that we can test.

PS you cannot avoid setting at least 2xNS records for each domain name (one of them for 2nd time in SOA)
PPS for web you need named virtual host and redirect.
SirParadoxAuthor Commented:
I am aware that CNAME and DNAME can do sub domain elements, but is there a method to map an entire zone including the base domain (A, MX, NS) to another zone? Maybe in the BIND config somehwhere?
Jan SpringerCommented:
Yes.  In your named.conf zone section for domain.be, use the master file domain.com.

@        IN             A          <IP of domain.com>
host1    IN            A          <IP of host1>
host2     IN           CNAME   host2
host3    etc.
You can use same zone file for other domains.
i.e DNS on old names/addresses, considerations for other services already mentioned.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.