none
DNS CNAME resolution & Record response RRS feed

  • Question

  • Hi, I have two question that are probably very basic but through my searching and reading, I can't find the answer.  

    1. I understand how a A record is requested and responded to if it's not in cache. (Request to DNS - it queries Root, root refers to TLD, TLD refers to COM server and ultimately ip of host is returned to client)  My question is what happens differently when a CNAME is requested.   From what I read, it sounds like the DNS servers does a recursive response and provided all the records it has including the A record of the original hostname being CNAME'd. 
    2. How does a DNS server know what type of record(A, MX, CNAME) I am querying for?  From what I gathered, it's defined in the the query under a parameter 'type'?  If so, what happens if i don't define a 'type'?
    Friday, September 22, 2017 6:47 PM

All replies

  • Hi NewBie07 

    A CNAME entery is used to redirect DNS from one address to another like web sites or ftp sites.  So if you have a site named site1 you can create a CNAME with site2 as the destination. So if any requst come for site1 they will then be redirected to site2.

    DNS server takes in all request and then does a look up for records on its own zones. The record it self defines what record is going to be used. If it cant find the record on its own zones it will forward out to a external DNS root hint server. 


    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.


    Friday, September 22, 2017 7:44 PM
  • For the CNAME, looking at the normal DNS lookup flow (http://www.tcpipguide.com/free/diagrams/dnsresolution.png), does CNAME request take the same steps and if so, whats returned to the client when requesting a CNAME?
    Saturday, September 23, 2017 11:11 AM
  • CNAME are handaled the same way as any other DNS request.  When a DNS Server receives a request and  a CNAME record exist while looking for a regular resource record, it will restart the query using the canonical name instead of the original name. See a screen shot of a CNAME record. 


    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.

    Saturday, September 23, 2017 5:27 PM
  • Hi NewBie07,

    The client does not need to know about whether it's a CNAME or A: it just sends a type A query. If it happens to be a CNAME, it needs to issue a type A query again based on the CNAME response it got.

    If the recursive flag is set, these requires will be done by the ISP DNS resolver and the client will get all the responses in one shot.

    Please check if the following link is helpful:

    How does CNAME resolution work? 

    http://blog.sacaluta.com/2012/08/how-does-cname-resolution-work.html

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,

    Candy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, September 25, 2017 5:59 AM
  • Hi NewBie07,

    Just checking in to see if the information provided was helpful.

    Please let us know if you would like further assistance.

    Best Regards,

    Candy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, September 26, 2017 6:02 AM