12.3.2 About Resource Records in Zone Files

A resource record in a zone file contains the following fields, some of which are optional depending on the record type:


Domain name or IP address.

TTL (time to live)

The maximum time that a name server caches a record before it checks whether a newer one is available.


Always IN for Internet.


Type of record, for example:

A (address)

IPv4 address corresponding to a host.

AAAA (address)

IPv6 address corresponding to a host.

CNAME (canonical name)

Alias name corresponding to a host name.

MX (mail exchange)

Destination for email addressed to the domain.

NS (name server)

Fully qualified domain name of an authoritative name server for a domain.

PTR (pointer)

Host name corresponding to an IP address for address to name lookups (reverse-name resolution).

SOA (start of authority)

Authoritative information about a zone, such as the master name server, the email address of the domain's administrator, and the domain's serial number. All records following a SOA record relate to the zone that it defines up to the next SOA record.


The information that the record stores, such as an IP address in an A record, or a host name in a CNAME or PTR record.

The following example shows the contents of a typical zone file such as /var/named/master-data:

$TTL 86400        ; 1 day
@ IN SOA dns.us.mydom.com. root.us.mydom.com. (
            57 ; serial
            28800 ; refresh (8 hours)
            7200 ; retry (2 hours)
            2419200 ; expire (4 weeks)
            86400 ; minimum (1 day)
              IN  NS      dns.us.mydom.com.

dns           IN  A
us.mydom.com  IN  A
svr01         IN  A
www           IN  CNAME   svr01
host01        IN  A
host02        IN  A
host03        IN  A

A comment on a line is preceded by a semicolon (;).

The $TTL directive defines the default time-to-live value for all resource records in the zone. Each resource record can define its own time-to-live value, which overrides the global setting.

The SOA record is mandatory and included the following information:


The name of the domain.


The fully qualified domain name of the name server, including a trailing period (.) for the root domain.


The email address of the domain administrator.


A counter that, if incremented, tells named to reload the zone file.


The time after which a master name server notifies slave name servers that they should refresh their database.


If a refresh fails, the time that a slave name server should wait before attempting another refresh.


The maximum elapsed time that a slave name server has to complete a refresh before its zone records are no longer considered authoritative and it will stop answering queries.


The minimum time for which other servers should cache information obtained from this zone.

An NS record declares an authoritative name server for the domain.

Each A record specifies the IP address that corresponds to a host name in the domain.

The CNAME record creates the alias www for svr01.

For more information, see the BIND documentation in /usr/share/doc/bind-version/arm.