Discussion Locked

DNS "C" record vs. "A" records

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When does one use a 'c' record as opposed to using multiple 'a' records?

7 replies

by timwalsh

My suggestion would be to always use CNAME (or alias) records if you need to assign multiple names to one computer, vs. multiple A (Host) records for the same computer.

This is mainly for simplicity's sake and minimizing the number of records that must be replicated in a zone transfer.

For DNS to work properly, every Host record must also have a PTR (pointer) record created for it in the Reverse Lookup Zone. Alias records do not have associated PTR records. Also the amount of info required to create an Alias record is less than is necessary for a Host Record.

From the standpoint of DNS maintenance, if you change the IP address (for whatever reason) of a given host, you need only change the single Host (and the associated (PTR) record in DNS. All Alias records for a gvien Host need not be changed. If you instead used multiple Host records, all would need to be changed.

Hope this makes sense.

by dc1

a CName allows you to create an Alias to another domain name. These are typically used when you already have a A record for a host for example called my.server.com and you want www.server.com to resolve to my.server.com. Other than that the differences are few.

by curlergirl

The only time you need multiple A records would be if the host has multiple IP addresses. You need an A record to point to each valid IP address, and you need a corresponding PTR record for reverse lookup. The CNAME record (alias) is used to pointmultiple host name aliases to the same IP address. For example, if I have ServerA that has IP Address 192.168.1.1, it will have one A record with host name ServerA and IP address 192.168.1.1, and a FQDN of ServerA.domain.com. If I also want that server to be accessible by lookup using the name Starhunter.domain.com, then I would add a CNAME record indicating that the name Starhunter in domain.com should be redirected to the FQDN ServerA.domain.com.

However, if ServerA has two IP addresses,one at 192.168.1.1 and one at 192.168.1.2, then I would have two A records, both for the host name ServerA, for each IP address, and two PTR records for reverse lookup. Then, I could also have multiple CNAME records for one or both of those IP addresses.

Hope this helps!

This discussion is closed to new replies.