Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
61 lines (31 sloc) 1.8 KB

Zonefile example

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

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

Creating a zone

A zone needs a SOA (Source Of Authority) record. For the exact structure we refer you to the wiki page. Note that all records must Fully Qualified Domain Names (FQDNs) which adds a . to the domain name. In this example the FQDN is: This is in contrast to relative domain names, where the origin gets appended (so in the example below, www gets expanded to

Also note that @ symbol in the zone file refers to the $ORIGIN parameter. To have multi-line resource records opening and closing brackets can be used to ignore linebreaks. Finally, if a name at the start of a record is missed, the name from the previous entry gets used (This is why all three A records are equivalent).

$ORIGIN ; 'default' domain as FQDN for this zone
$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 nameserver that are authoritative for this zone.

; these A records below are equivalent    A
@                               A

@                               AAAA 2001:db8::3

; A CNAME redirect from to
www                             CNAME

mail                    MX      10". PTR