Mock DNS Record Generator
Generates example DNS records with matching types and values for testing
- @ 1800 IN MX 50 relay.example.org.
- @ 86400 IN TXT "v=spf1 ip4:198.51.100.0/24 include:_spf.mailer.example.net include:spf.example.net ?all"
- _dmarc 43200 IN TXT "v=DMARC1; p=reject; rua=mailto:postmaster@example.com; pct=100"
- static 600 IN CNAME lb.example.com.
- news 60 IN CNAME docs-host.example.org.
Generated 5 items
See 3 examples
- Example 1
@ 1800 IN MX 50 relay.example.org. @ 86400 IN TXT "v=spf1 ip4:198.51.100.0/24 include:_spf.mailer.example.net include:spf.example.net ?all" _dmarc 43200 IN TXT "v=DMARC1; p=reject; rua=mailto:postmaster@example.com; pct=100" static 600 IN CNAME lb.example.com. news 60 IN CNAME docs-host.example.org.
- Example 2
calendar 7200 IN CNAME lb.example.com. api-v2 14400 IN AAAA 2001:db8:bd32:db9c:abf9:40c3:b045:67a5 files 60 IN A 198.51.100.155 store 14400 IN A 203.0.113.97 @ 43200 IN MX 5 mx2.mailhost.example.org.
- Example 3
@ 7200 IN MX 10 mx1.mail.example.net. @ 120 IN MX 40 relay.example.org. monitor 900 IN AAAA 2001:db8:1a0b:de1d::3f selector1._domainkey 300 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ90oeOjIZiSDqsfYOehYf4jkZ" wiki 60 IN AAAA 2001:db8:9197:511f:59da:661d:ce33:586f
About this generator
Explaining DNS to a new team member or writing a zone-file guide is much clearer with concrete examples that pair the right value type with each record type. An A record pointing to a quoted string, or an MX record without a priority, is not just wrong — it obscures the lesson. This tool generates records where the value always matches the type. Choose how many records you want, from 1 to 10. The generator picks randomly from five record types: A (IPv4 address), AAAA (IPv6 address), CNAME (canonical name alias), MX (mail exchanger with a priority such as 10 or 20), and TXT (quoted strings for SPF, DMARC, DKIM, site verification, or plain notes). Names are drawn from about 80 common subdomains such as @, www, api, mail, cdn, status, and auth. TTL values range from 60 seconds to 86400 seconds (one day). Addresses come from the reserved documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32), and every host name sits under example.com, example.net, or example.org. A name that carries a CNAME never gets another record in the same batch, and each batch holds at most one SPF and one DMARC record, as real zones require. Copy the records into a tutorial, a zone-file documentation example, or a DNS-parsing test fixture. Because each record pairs a type-correct value, you can use the output to verify that your parsing code handles each record type without hardcoding test data by hand. Adapt the subdomains, addresses, and values to your own zone before applying anything to a live domain.
How to use
- Choose how many records you want.
- Click Generate to produce DNS records.
- Use them in docs or tests.
- Adapt the values to your own zone.
Use Cases
- •Documenting a DNS zone configuration
- •Testing DNS record parsing
- •Learning DNS record types
- •Seeding example zone-file data
- •Demoing a DNS setup
Tips
- →A records point to IPv4 addresses.
- →MX records carry a priority number.
- →TXT values are quoted strings.
- →Adapt examples before real use.
FAQ
what do the DNS record types mean
An A record maps a name to an IPv4 address and AAAA to IPv6; CNAME aliases one name to another; MX names a mail server with a priority; and TXT holds arbitrary text, often for verification or SPF. Each type has its own value format.
do the values match the record types
Yes. Each record pairs a value that genuinely fits its type — an IP for an A record, a quoted string for TXT, a prioritised host for MX — so the examples are realistic and correct rather than randomly mismatched.
can I use these records directly
They are examples pointing at example domains, not live configuration. Use them to learn, document, or test parsing, then adapt the names, addresses, and values to your own zone before applying anything to a real domain.
You might also like
Popular tools from other categories that share themes with this one.