DNS and Reverse DNS (A and PTR)
The Address (A) record associates a domain name with an IP address, which is the primary purpose of the DNS system. The Pointer (PTR) record provides data for reverse DNS, which is used for logging the domain name and verification purposes. Also called "inverse DNS," the PTR record is an option.
Aliasing Names (CNAME)
The Canonical Name (CNAME) record is used to create aliases that point to other names. It is commonly used to map WWW, FTP and MAIL subdomains to a domain name; for example, a CNAME record can associate the subdomain FTP.COMPUTERLANGUAGE.COM with COMPUTERLANGUAGE.COM.
DNS Name Servers (NS)
The Name Server (NS) record identifies the authoritative DNS servers for a domain. A second name server is required for redundancy, and two NS records must be in the zone file (one for the primary; one for the secondary). The secondary server queries the primary server for changes.
Mail Servers (MX)
The Mail Exchange (MX) record identifies the server to which e-mail is directed. It also contains a priority field so that mail can be directed to multiple servers in a prescribed order.
Text Record (TXT)
A TXT record can be used for any kind of documentation. It is also used to provide information to the SPF e-mail authentication system.
First Record in File (SOA)
Start of Authority (SOA) is the first record in the zone file. It contains the name of the primary DNS server, which must correspond to an NS record in the file, the administrator's e-mail address and the length of time records can be cached before going back to the authoritative DNS server.
The SOA also includes data for the secondary DNS server such as the date of last update (the "Serial Number") and time intervals for checking the domain.
COMMON ZONE FILE RECORDS
SOA Start of Authority. Defines the zone name, an e-mail contact and various time and refresh values applicable to the zone.
A IPv4 Address subdomain 32-bit IP
A6 IPv6 Address subdomain 128-bit IP
AAAA** IPv6 Address subdomain 128-bit IP
PTR Pointer IP address subdomain
CNAME Canonical alias name actual name
NS Name Server domain DNS server
MX Mail Exchange mail mail server
TXT Text (up to 255 characters of text)
** = First IPv6 A record, switched to A6
SPF Its primary function is to prevent identity theft by spammers.
N.B. You create an SPF policy, which can be stored in an SPF record and/or in a TXT record.