Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts

Saturday, February 13, 2010

CNAME

CNAME is short for canonical name which is a type of resource record (resource records include A record, MX, DNAME, AAAA for IPv6 etc.) found in a DNS database. A CNAME specifies that the domain name is an alias of another canonical domain name and is used to point to an already existing A record. A few of CNAME uses is too mask a domain, , point to another subdomain, point several services such as ftp and www to a single IP address, point to an outside domain or service.

The uses of CNAME are summarized below:

1. CNAME is used to point or alias to another domain. Here is an example:

[root@dns1 forward]# more example.com.db
;
$TTL 43200
@ IN SOA dns1.example.com.ph. postmaster.example.com.ph. (
2010021002 ; Serial
1800 ; Refresh - 30 minutes
300 ; Retry - 5 minutes
604800 ; Expire - 1 week
2880 ) ; Minimum - 8 hours

IN NS dns1.example.com.ph.
IN NS dns2.example.com.ph.
only IN A 10.1.1.1
carlo IN CNAME only

The above example is a real file zone taken from a unix base DNS server obviously masked for confidentiality. In this example, the subdomain is carlo.example.com which is pointed to another domain which is only.example.com which already has an existing A record.

Another example below: