A Record vs CNAME

Simon Waters Simon at wretched.demon.co.uk
Tue Oct 29 13:40:36 UTC 2002

Pedro Marques wrote:
> I've been reading a lot about A Records and CNAME's, and there's obviously a
> large number of different opinions, some say to not use CNAME's and use
> always A Records, is this correct?

Yes there are a lot of opinions, and yes some people say don't
use CNAME's

> If so, what's the difference between this two records:
> machine     IN    A
> mail        IN    A
> or
> machine     IN    A
> mail        IN    CNAME   machine.domain.com.

Well assuming this is for "domain.com" not a lot, although if
you were to point an MX record at mail.domain.com. some (a few
old) MTA's might fail.
> As far as I know, the only advantage of CNAME is that if I change the
> machine IP address, I don't have to change any other record pointing to that
> name, is that correct?


The disadvantage is they can increase the work in resolving a
query, and they shouldn't be used as the target of other RR
records (in general), this may prevent them being used reliably
as a "redirect" from an old name to a new name which is probably
what most people use them for.

The less controversial uses of CNAME in DNS are to do with
reverse lookup (rfc2317), although different design might have
come up with alternative solutions, it is a bit late to be wise
about IPv4 addressing.

More information about the bind-users mailing list