Impossible tri-bar

Digital Phenomena - Your first stop for internet consultancy 
Ins and Outs of DNS

Page 3 — DNS Records

Now, DNS data is represented as DNS records in a zone data file, and these files are handled by the name server. There are a number of different kinds of DNS records, each suited to a specific kind of data.

Let's take a look at the structure of the most important files. The records below are in the standard format used by BIND, the most common name server software. Djbdns, an alternative package, uses a somewhat different format.

SOA (Start Of Authority) records indicate the extent of the zone for which the name server is authoritative. They also contain information about how frequently they should be checked for updated information. An SOA record might look like this: IN SOA (
4d )

The first line indicates first the zone, then the type of record — Internet SOA — then the primary name server for the zone, and then a contact address for the zone. Note that the email address uses a period (dot) in place of the @, and that all of these domain names must end with a dot. On the next line is the serial number, which can be anything as long as it increased each time the record is updated. If you don't update the serial number when you make a change to the record, the change won't go through. The serial number I use above consists of the year, the month, the day, and the number of changes (01) made so far today. Next comes the frequency with which the data should be checked by a secondary name server, how often a failed attempt to connect should be retried, how soon the data should expire if it hasn't been refreshed, and the default time-to-live of the data. In the record above, these are set to 24 hours, 2 hours, 4 weeks, and 4 days respectively.

NS (name Server) records provide a list of name servers authoritative for the zone: IN NS IN NS

The real data, the reason we have name servers in the first place, is largely contained in A (Address) records. This is where the name-to-number mappings are kept: IN A IN A IN A IN A IN A IN A

CNAME (Canonical name) records allow aliases. A machine has one true, or canonical name, as well as an unlimited number of aliases: IN CNAME IN CNAME IN CNAME IN CNAME

Note that, thanks to the above aliases, whether a browser tries to go to,,, or, it will wind up at the same place.

The cardinal rule of CNAMEs is to use only a machine's canonical name, never its alias, in any other record. So in our hypothetical network, "" should never appear in, say, an A record, because it's just an alias for the machine whose canonical name is cheesebox.

next page»

|Home|About Us|Services|Search|
W3C validatedW3C validated CSSCompatible with all browsers