NAMED-COMPILEZONE(1)

πŸ’… NAMED-COMPILEZONE(1) β€” like, the zone file glow-up tool

okay so this is named-compilezone, and it's part of the whole BIND 9 situation ✨ she checks your zone file, tells you if it's a mess, and then dumps the whole thing into a file in whatever format you asked for. bestie behavior fr fr 🫢


✨ NAME ✨

named-compilezone β€” the zone file validity-checking and converting tool πŸŽ€


🌸 SYNOPSIS 🌸

named-compilezone [-d] [-h] [-j] [-q] [-v] [-c class] [-C mode] [-f
format] [-F format] [-J filename] [-i mode] [-k mode] [-m mode] [-M
mode] [-n mode] [-l ttl] [-L serial] [-r mode] [-s style] [-S mode] [-t
directory] [-T mode] [-w directory] [-D] [-W mode] {-o filename}
{zonename} {filename}

like yes, that's a lot of brackets, she's extra πŸ’… but every single one of them is real, i promise.


πŸ¦‹ DESCRIPTION πŸ¦‹

named-compilezone checks the syntax and integrity of a zone file, and then dumps the zone contents to a file you specify, in a format you specify. iconic.

but here's the tea β˜• β€” unlike named-checkzone, the zone contents are not strictly checked by default. so if the output is gonna be used as an actual zone file that named loads, you gotta manually set the check levels to be at least as strict as whatever's in your named configuration file. no cap, don't skip this step.

πŸ’‘ also: running named-checkzone on the input before compiling will make sure the zone compiles with the default requirements of named. so like, do that first. you're welcome 😌

πŸŽ€ OPTIONS πŸŽ€

okay bestie, buckle up, here come all of them 🌈

  • -d β€” turns on debugging. she's telling you everything now.
  • -h β€” prints the usage summary and dips out. classic.
  • -q β€” quiet mode ✨ which literally only sets an exit code to say whether it worked or flopped. no chatter, just vibes.
  • -v β€” prints the version of the named-checkzone program and exits. hi bestie, what's your sign (version).
  • -j β€” when loading a zone file, tells named to read the journal if it exists. the journal file name is assumed to be the zone file name with the string .jnl tacked on the end. cute.
  • -J filename β€” when loading the zone file, tells named to read the journal from the given filename, if it exists. this one implies -j 🌈 so you don't gotta say both.
  • -c class β€” specifies the class of the zone. if you don't say anything, IN is assumed. default queen πŸ‘‘
  • -C mode β€” controls check mode on zone files when loading. possible modes are check-svcb:fail and check-svcb:ignore.
    • check-svcb:fail turns on additional checks on _dns SVCB records πŸ”
    • check-svcb:ignore disables these checks.
    • the default is check-svcb:ignore.
  • -i mode β€” performs post-load zone integrity checks πŸ’… possible modes are full, full-sibling, local, local-sibling, and none (the default).
    • mode full checks that MX records refer to A or AAAA records (both in-zone and out-of-zone hostnames). mode local only checks MX records which refer to in-zone hostnames.
    • mode full checks that SRV records refer to A or AAAA records (both in-zone and out-of-zone hostnames). mode local only checks SRV records which refer to in-zone hostnames.
    • mode full checks that delegation NS records refer to A or AAAA records (both in-zone and out-of-zone hostnames). it also checks that glue address records in the zone match those advertised by the child. mode local only checks NS records which refer to in-zone hostnames or verifies that some required glue exists, i.e., when the name server is in a child zone.
    • modes full-sibling and local-sibling disable sibling glue checks, but are otherwise the same as full and local, respectively.
    • mode none disables the checks. not me choosing this and then wondering why everything's broken 😭
  • -f format β€” specifies the format of the zone file. possible formats are text (the default) and raw.
  • -F format β€” specifies the format of the output file. for named-checkzone, this does not have any effect unless it dumps the zone contents.
    • possible formats are text (the default), which is the standard textual representation of the zone, and raw and raw=N, which store the zone in a binary format for rapid loading by named. raw=N specifies the format version of the raw zone file: if N is 0, the raw file can be read by any version of named; if N is 1, the file can only be read by release 9.9.0 or higher. the default is 1.
  • -k mode β€” performs check-names checks with the specified failure mode. possible modes are fail, warn, and ignore (the default).
  • -l ttl β€” sets a maximum permissible TTL for the input file. any record with a TTL higher than this value causes the zone to be rejected 😀 this is similar to using the max-zone-ttl option in named.conf.
  • -L serial β€” when compiling a zone to raw format, this sets the "source serial" value in the header to the specified serial number. it's expected to be used primarily for testing purposes πŸ§ͺ
  • -m mode β€” specifies whether MX records should be checked to see if they are addresses. possible modes are fail, warn, and ignore (the default).
  • -M mode β€” checks whether a MX record refers to a CNAME. possible modes are fail, warn, and ignore (the default).
  • -n mode β€” specifies whether NS records should be checked to see if they are addresses. possible modes are fail, warn, and ignore (the default).
  • -o filename β€” writes the zone output to filename. if filename is -, then the zone output is written to standard output. this one is mandatory for named-compilezone β€” no -o, no output, no nothing πŸ’€
  • -r mode β€” checks for records that are treated as different by DNSSEC but are semantically equal in plain DNS. possible modes are fail, warn, and ignore (the default).
  • -s style β€” specifies the style of the dumped zone file. possible styles are full (the default) and relative. the full format is most suitable for processing automatically by a separate script πŸ€– the relative format is more human-readable and is thus suitable for editing by hand ✍️
  • -S mode β€” checks whether an SRV record refers to a CNAME. possible modes are fail, warn, and ignore (the default).
  • -t directory β€” tells named to chroot to directory, so that include directives in the configuration file are processed as if run by a similarly chrooted named. 🏠
  • -T mode β€” checks whether Sender Policy Framework (SPF) records exist and issues a warning if an SPF-formatted TXT record is not also present. possible modes are warn and ignore (the default). (yes, only two modes for this one, she's different like that πŸ’…)
  • -w directory β€” instructs named to chdir to directory, so that relative filenames in master file $INCLUDE directives work. this is similar to the directory clause in named.conf. πŸ“‚
  • -D β€” dumps the zone file in canonical format. this is always enabled for named-compilezone, so like, it's already on, but go off i guess.
  • -W mode β€” specifies whether to check for non-terminal wildcards. non-terminal wildcards are almost always the result of a failure to understand the wildcard matching algorithm (RFC 4592) πŸ™ˆ possible modes are warn and ignore (the default).

πŸ’œ the positional besties πŸ’œ

  • zonename β€” this indicates the domain name of the zone being checked. 🏷️
  • filename β€” this is the name of the zone file.

⭐ RETURN VALUES ⭐

named-compilezone returns an exit status of 1 if errors were detected, and 0 otherwise. slay or flop, those are the options 🫢


πŸ”₯ SEE ALSO πŸ”₯

named(8), named-checkconf(8), named-checkzone(8), RFC 1035, BIND 9 Administrator Reference Manual.

go read them, i know you want to πŸ“šβœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Internet Systems Consortium


2026, Internet Systems Consortium


okay that's the whole thing bestie, go compile some zones πŸ’– this was named-compilezone from the BIND 9 manual, version 9.20.29, dated 2026-09-11. mwah πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from