Jul 18, 2012

CNAME, DNAME and A-Record

A-Record: Address Record

Maps a hostname to an IP address

example.com        A  1.2.3.4

CNAME: Canonical Name

Specifies that a given domain name is an alias of another domain name, i.e. both resolve to the same IP address. The below entry means that foo.example.com is an alias for the Canonical Name bar.example.com

foo.example.com.        CNAME  bar.example.com.

DNAME: Delegation Name record

Creates an alias for one or more subdomains of a domain.

foo.example.com.        DNAME  bar.example.com.

The above DNS record would imply that requests to xyz.foo.example.com would resolve to the same IP as xyz.bar.example.com.

References:

1. https://en.wikipedia.org/wiki/CNAME_record
2. http://tools.ietf.org/html/rfc1035#section-3.2.2