What is Difference Between DNS CNAME & A Record

CNAME stands for Canonical Name for a domain. CNAME is an alias records that create association between a sub-domain and antother domain or subdomain.

And, A Record simply creates an association between a domain/sub-domain name and an IP Address.

Example CNAME
gallery.bala-krishna.com -> gallery.another-domain.com -> 64.1.236.65

you can see above CNAME require two DNS lookup to translate domain/subdomain to an IP Address. If client request for gallery.bala-krishna.com then DNS record will return gallery.another-domain.com then gallery.another-domain.com has to query DNS to translate gallery.another-domain.com into IP Address.

CNAME Record Syntax:
www  14400  IN  CNAME  bala-krishna.com

Example A Record

gallery.another-domain.com -> 64.1.236.65

In case of gallery.another-domain.com, A record directly point to an IP Address so the DNS lookup directly returns IP Address to the client rather then domain/subdomain. hence only one DNS lookup required.

A Record Syntex:
ftp    14400  IN   A   67.159.45.3



Rate this Post:

Read Related Post

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

One Response to “What is Difference Between DNS CNAME & A Record”

  1. gallery.bala-krishna.com will point to 64.1.236.65. In other words, are we hiding real ip? & when do we need to practise this feature

Leave a Reply

You must be logged in to post a comment.



|