DNS Records
A (Address) Record
An address (or "A") record equates the name of a machine or host to a numeric TCP/IP address. This allows computers on the internet to convert an alphanumeric name to the actual IP address of the machine. The sample below shows a typical A record (this is a made-up example).
www.internet-tips.net. IN A 33.23.11.2
The A record begins with the host name. The next two columns specify this is an "A" type record, and the final column is the machines TCP/IP address.
The entire name is specified in the first column. Wildcards are allowed (i.e., the above hostname could have been stated as "*.internet-tips.net"). Note that www.internet-tips.net and internet-tips.net are NOT the same thing. If you want both you must either use a wildcard or specify both.
It is generally not recommended to include two entries for one IP address. In fact, to do so you need to include a special qualifier to the command, as shown below.
www.internet-tips.net. IN A 33.23.11.2 internet-tips.net. IN A 33.23.11.2 ; EXTREF
The "EXTREF" indicates that this is an "extra reference" to the same IP address. Some DNS servers require the "EXTREF" statement while others do not.
The "CNAME" directive is actually recommended over the "EXTREF" attribute.
You can include more than one TCP/IP address for the same hostname by including a second (or more) A record, with the host name the same for every line. This might be useful for computers which have two ethernet cards, for example.
CNAME (Canonical Name) Record
A CNAME record allows a machine or host to be referenced by more than one name. The CNAME must be prefeeded by an "A" type record for the machine.
wallpapers.internet-tips.net. IN CNAME www.internet-tips.net.
This simply states that whenever "wallpapers.internet-tips.net" is specified, the "A" entry for "www.internet-tips.net" should be used.
MX (Mail Exchanger) Record
An "MX" or mail exchange record specifies the machine which will be used to handle email. This is most useful for domains which include more than one machine. Take the following example:
internet-tips.net. IN A 33.23.11.2 tom.internet-tips.net. IN A 33.23.11.3 sandy.internet-tips.net. IN A 33.23.11.4 internet-tips.net. IN MX 10 tom.internet-tips.net.
The MX record simply says that all mail to any machine in the domain "internet-tips.net" will be routed to "tom.internet-tips.net".
The third column of the MX record (the number "10" in the above example) is used to determine priority. This is used if an email server is down. Mail will be sent to the lowest priority email server first, then the second and so on.
NS (Name Server) Record
Name server records (NS) are used to indicate the name of the name servers for a domain. Every DNS entry must include at least two NS records (the primary and the secondary).
Here is an example of an NS record.
internet-tips.net. IN NS ns1.internet-tips.net. internet-tips.net. IN NS ns2.internet-tips.net.
PTR (Pointer) Record
Pointer records are the opposite of A records. Their purpose is to allow a TCP/IP address to be translated to a host name (and an A record does exactly the opposite: host to TCP/IP). This allows reverse lookups to be performed, which is a good security measure.
2.11.23.33.in-addr.arpa. IN PTR internet-tips.net.
As you can see, the TCP/IP address is listed in reverse order.
SOA (Start Of Authority) Record
The start of authority record indicates that the DNS entry is the official source of information about the domain.
internet-tips.net. IN SOA ns1.internet-tips.net.
webmaster.internet-tips.net. (
1996111901 ; Serial
10800 ; Refresh
3600 ; Retry
3600000 ; Expire
86400 ) ; Minimum
This indicates the name of the domain is "internet-tips.net" and the host name of the primary name server is "ns1.internet-tips.net" (this does not need to be in the same domain). The next item is the email address (the @ is changed to a ".") of the person responsible for the domain.
"Serial" is a serial number used to tell other name servers when to update. They will perform updates only if this serial number has changed. Many people use the date and time as the serial number. If you do not update this field, then some name servers may not update your information.
The following fields are all measured in seconds. "Refresh" is how long the secondary name servers should wait before refreshing their data from the primary name server. "Retry" indicates how often the secondary name servers should wait before reconnecting to the primary name server if the connection was refused. "Expire" indicates how long the secondary name server should use the information if it cannot connect to the primary name sever. "Minimum" is how long the name servers should cache the data.