CNAME vs. A - Who Wins?

Posted on 2011-10-28
Last Modified: 2012-05-12
In a fight between an A record and a CNAME record, who wins? In other words, if I have an A record for SERVER_X pointing to, and another one for SERVER_Y pointing to, and I create a CNAME record for SERVER_X pointing to SERVER_Y:

Would BIND allow me to do it?
Would the Windows server version allow me to do it?
If so, which record takes precedence?
Question by:d0ughb0y
    LVL 23

    Accepted Solution

    You can't create a CNAME if the A record already exists for the same name.

    So if you have an A record for SERVER_X you can't have a CNAME called SERVER_X as well.  I don't know if BIND will let you do it, but MS Windows DNS will not, you'll get an error.

    Expert Comment

    CName Recoord takes precedence
    LVL 23

    Expert Comment


    Where did you see this?  I don't think this is correct because you can't create a CNAME and A record with the same name.  Hence there is no such thing as precedence in this instance.
    LVL 21

    Assisted Solution

    TheCleaner is correct.

    And to add to his answer, no you cannot do it in BIND either -- you just can't do it period.
    28-Oct-2011 09:23:38.037 update: info: client updating zone '': attempt to add CNAME alongside non-CNAME ignored

    Open in new window

    LVL 8

    Author Closing Comment

    I didn't actually think it would work, but figured someone would know! And I was right! Thanks a lot, folks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
    I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
    This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now