DNS Record Builder

Construct DNS records and export BIND zone file format. Supports A, AAAA, CNAME, MX, TXT, SRV, NS with SPF helpers.

BIND Zone File Output
; Add records above to generate BIND zone file output.
Add DNS records above to generate BIND zone format.

DNS Record Types Explained

DNS (Domain Name System) records are stored in zone files on authoritative nameservers. Each record maps a domain name to some data — an IP address, another hostname, or configuration information. Understanding the different record types is essential for setting up email, configuring servers, and managing domain infrastructure.

A and AAAA Records

A records map a hostname to an IPv4 address. They are the most fundamental DNS record — when a user visits your website, their browser queries your domain's A record to find the server IP. AAAA records (pronounced "quad-A") serve the same purpose for IPv6 addresses. Modern best practice is to have both A and AAAA records for every hostname to support both IPv4 and IPv6 clients. The @ symbol is used to represent the root/apex domain (e.g., example.com itself).

CNAME Records

CNAME (Canonical Name) records create aliases. When a resolver follows a CNAME, it looks up the target hostname and returns that IP. CNAMEs are useful for the www subdomain (pointing to the apex), for CDN-hosted assets (pointing to CDN hostnames), and for third-party services. Important restrictions: you cannot create a CNAME at the zone apex, and a CNAME cannot coexist with other record types for the same name. Some DNS providers offer ALIAS or ANAME records as a CNAME-at-apex workaround.

MX Records

MX (Mail Exchange) records specify which servers handle email for a domain. Each MX record has a priority number — lower values have higher priority. If the primary mail server is unavailable, the secondary (higher priority number) is tried. Most organizations use their email provider's MX records (Google Workspace, Microsoft 365, etc.) rather than running their own mail server. Always point MX records to A/AAAA records, never to CNAMEs — some mail servers reject CNAME-pointed MX records.

TXT Records

TXT records store arbitrary text data and are used for domain verification and email security. The most common TXT records are: SPF (Sender Policy Framework) for specifying authorized mail senders, DKIM (DomainKeys Identified Mail) public keys for email signing, DMARC policies for email authentication enforcement, and site verification tokens for Google Search Console, various SaaS tools, and TLS certificate issuance. A domain can have multiple TXT records. For more information, see our HTTP Header Inspector for related email authentication headers.

SRV Records

SRV (Service) records specify the hostname and port number for specific services. They follow the naming convention _service._protocol.domain, for example _sip._tcp.example.com or _xmpp-server._tcp.example.com. SRV records include priority, weight, port, and target fields. They are used by protocols like SIP (VoIP), XMPP (chat), Microsoft Lync/Teams, and CalDAV/CardDAV for service discovery without hardcoded ports.

Frequently Asked Questions

An A record maps a hostname to an IPv4 address (32-bit, e.g., 93.184.216.34). An AAAA record maps to an IPv6 address (128-bit, e.g., 2606:2800:220:1:248:1893:25c8:1946). Most websites have both to support all clients. The quad-A name comes from IPv6 being 4x the size of IPv4.
A CNAME creates an alias that points to another hostname. Use it for the www subdomain (pointing to the apex domain) or for CDN hostnames. You cannot use a CNAME at the apex domain — use A/AAAA records there instead.
An SPF record is a TXT record that lists the mail servers authorized to send email for your domain. Example: v=spf1 include:_spf.google.com ~all. Use the SPF Helper in this tool to generate one for common providers like Google Workspace and Microsoft 365.
TTL (Time To Live) is the number of seconds a DNS record may be cached. Lower TTLs (300 = 5 min) allow faster propagation of changes. Higher TTLs (86400 = 24 hrs) reduce DNS query load. When migrating a site, lower the TTL 24-48 hours in advance.
BIND zone file format is the standard text format for DNS records, used by BIND and most DNS servers. Each record follows: name TTL IN type data. The @ symbol represents the zone apex. Most DNS providers can import/export BIND zone files for migration.