Zonefile example

On this page we give an example of a basic zone file and it’s contents.

We recommend using the nsd-checkzone tool to verify that you have a working zone.

Creating a zone

A minimal zone needs exactly one SOA (Source Of Authority) and one or more NS (Name Server) records. Refer to appropriate documentation of you need to learn about DNS basics.

$TTL 86400 ; default time-to-live for this zone   IN  SOA (
        2020080302  ;Serial
        7200        ;Refresh
        3600        ;Retry
        1209600     ;Expire
        3600        ;Negative response caching TTL

; The nameservers that are authoritative for this zone.

; A and AAAA records are for IPv4 and IPv6 addresses respectively    A
                                AAAA 2001:db8::3

; A CNAME redirects from to
www                             CNAME

mail                    MX      10