BIND Zone A/AAAA Generator

Generate BIND zone A and AAAA records from CSV

Host List

Format

Each line: hostname, ip

Supports IPv4 (A records) and IPv6 (AAAA records)

BIND Zone Records

Enter hostnames and IPs to generate BIND zone records

The BIND Zone A/AAAA Generator creates properly formatted DNS zone file entries for A records (IPv4) and AAAA records (IPv6) from CSV or tabular input. Provide rows like www,203.0.113.10 and www,2001:db8::10, and the tool produces correctly formatted BIND zone file output with proper spacing, automatic record type detection, and optional TTL values.

Understanding DNS A and AAAA Records

A records and AAAA records are the foundation of DNS. They are the record types that answer the fundamental question DNS was built to solve: "what is the IP address for this hostname?" An A record maps a hostname to an IPv4 address, and an AAAA record maps a hostname to an IPv6 address. Every website you visit, every API you call, and every email you send ultimately depends on one of these two record types to translate a human-readable name into a machine-routable address.

In a BIND zone file, these records follow a specific syntax that is straightforward but easy to get wrong in subtle ways. The hostname can be relative to the zone origin (just www) or fully qualified with a trailing dot (www.example.com.). Forgetting the trailing dot on a fully qualified name is one of the most common zone file mistakes because BIND silently appends the zone origin, turning www.example.com into www.example.com.example.com. The TTL field is optional but controls how long resolvers cache the response. The class is always IN for internet records. Getting all of these pieces right for dozens or hundreds of records is where bulk generation tools save time and prevent errors.

This generator takes your host-to-IP mappings as CSV input and produces clean, correctly formatted BIND zone file output. It automatically detects whether each IP address is IPv4 or IPv6 and creates the appropriate A or AAAA record. It validates hostnames against RFC 1123, checks IP address formats, and flags any invalid entries with specific error messages rather than silently producing broken output.

How to Generate BIND A and AAAA Records

  1. Enter your data as CSV with columns for hostname and IP address (optionally include TTL)
  2. The tool auto-detects address family -- IPv4 addresses produce A records, IPv6 addresses produce AAAA records
  3. All hostnames are validated against RFC 1123 rules and IP addresses are checked for correct format
  4. Copy the generated zone file output and append it to your BIND zone file

CSV Input and Zone File Output Examples

Input CSV

www,203.0.113.10
www,2001:db8::10
mail,203.0.113.20
api,203.0.113.30,3600
db-primary,10.0.1.50

Generated Zone File Output

www         IN  A      203.0.113.10
www         IN  AAAA   2001:db8::10
mail        IN  A      203.0.113.20
api    3600 IN  A      203.0.113.30
db-primary  IN  A      10.0.1.50

Record Generation Examples

CSV InputGenerated RecordRecord Type
web,192.0.2.1web IN A 192.0.2.1A (IPv4)
web,2001:db8::1web IN AAAA 2001:db8::1AAAA (IPv6)
mx,198.51.100.25,7200mx 7200 IN A 198.51.100.25A with custom TTL
ns1.example.com.,203.0.113.2ns1.example.com. IN A 203.0.113.2A with FQDN (trailing dot)

When to Use This Tool

  • New domain setup -- Creating the initial zone file with A and AAAA records for dozens of hosts at once
  • DNS migration -- Converting host lists from one DNS provider's format into standard BIND zone syntax
  • Infrastructure as code -- Generating zone file fragments from CMDB or infrastructure database exports
  • Dual-stack deployments -- Creating paired A and AAAA records for hosts with both IPv4 and IPv6 addresses
  • Documentation to production -- Converting spreadsheet-based IP documentation into working zone file entries
  • Batch updates -- Preparing large record sets for zone file updates during data center moves or re-IP projects

How BIND Zone File A/AAAA Records Work

A and AAAA records are the fundamental DNS record types that map hostnames to IP addresses.

Record Format

The BIND zone file format for address records follows this structure:

name   [TTL]  IN  A      <IPv4 address>
name   [TTL]  IN  AAAA   <IPv6 address>
  • name: The hostname label, either relative to the zone origin (e.g., www) or fully qualified with a trailing dot (e.g., www.example.com.)
  • TTL: Optional time-to-live in seconds. If omitted, the zone's $TTL default applies
  • IN: The DNS class (Internet), always IN for standard records
  • A / AAAA: The record type -- A for IPv4, AAAA for IPv6

Relative vs. Fully Qualified Names

In a zone file for example.com, the name www is relative and expands to www.example.com. If you use a fully qualified name like www.example.com., it must end with a dot. Forgetting the trailing dot on an FQDN is a common mistake that causes the name to be interpreted as www.example.com.example.com.

Dual-Stack Records

Hosts with both IPv4 and IPv6 connectivity should have both an A and AAAA record with the same name:

web    IN  A     203.0.113.10
web    IN  AAAA  2001:db8::10

DNS clients that support IPv6 will receive both addresses and choose which to connect to based on their Happy Eyeballs algorithm preference.

Input Validation

The generator validates all input before producing output:

  • Hostnames must conform to RFC 1123 (alphanumeric, hyphens, 63-char label limit)
  • IPv4 addresses must be valid dotted-quad notation (0-255.0-255.0-255.0-255)
  • IPv6 addresses must be valid compressed or expanded notation
  • TTL values, if provided, must be positive integers
  • Invalid entries are rejected with specific error messages rather than silently ignored

Zone File Generation in Practice

When generating zone file records in bulk, the most common workflow is exporting a host inventory from a spreadsheet or CMDB, formatting it as CSV, and running it through this tool. The key is getting the CSV format right before generation. Each row should have the hostname as it should appear in the zone file (usually a relative name like www, not a full FQDN), followed by the IP address. If you need custom TTLs for specific records, add them as a third column.

For dual-stack deployments, include two rows for each host: one with the IPv4 address and one with the IPv6 address. The generator creates an A record for the IPv4 entry and an AAAA record for the IPv6 entry, keeping them adjacent in the output for readability. This is the standard approach for any server that needs to be reachable over both IPv4 and IPv6.

Remember that this tool generates only A and AAAA records. A complete zone file also needs a SOA record, at least two NS records, and typically MX, TXT, and CNAME records as well. Generate the address records with this tool and append them to your existing zone file that contains the other required records. After modifying any zone file, always increment the SOA serial number and validate the result with the Zone File Linter before deploying.

Frequently Asked Questions

Does the generator include SOA and NS records?

No. This tool generates only A and AAAA records. SOA and NS records are typically created once during initial zone setup and rarely change. You should append the generated A/AAAA records to an existing zone file that already contains the required SOA and NS records.

Can I mix IPv4 and IPv6 addresses for the same hostname?

Yes. Enter two rows with the same hostname -- one with the IPv4 address and one with the IPv6 address. The generator creates an A record for the IPv4 entry and an AAAA record for the IPv6 entry. Having both record types on the same name is standard practice for dual-stack deployments.

What TTL should I use for A and AAAA records?

Common TTL values are 300 (5 minutes) for records that change frequently, 3600 (1 hour) for typical production services, and 86400 (24 hours) for stable infrastructure. Lower TTLs allow faster propagation when records change but increase DNS query load. If you are planning a migration, lower the TTL a few days in advance so that the old cached values expire before you switch.

Do I need to increment the SOA serial after adding records?

Yes. Any time you modify a zone file, the SOA serial number must be incremented for secondary nameservers to detect the change and perform a zone transfer. The common convention is to use a date-based format like 2024010101 (YYYYMMDDNN), incrementing the last two digits for multiple changes on the same day.

What happens if a hostname fails RFC 1123 validation?

The generator rejects invalid hostnames with a specific error message explaining the violation (e.g., underscore not allowed, label too long, starts with a hyphen). Fix the hostname and resubmit. Invalid entries are never silently included in the output.

Related Tools

IPparse•Free Network & Subnet Calculator Tools

© 2026 IPparse. All tools run locally in your browser.

100% Privacy-First • No Data Collected