Skip to content

Menu

DNS Record Generator

Generate DNS record configurations for A, AAAA, CNAME, MX, TXT, NS, SRV.

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is DNS Record Generator?

DNS Record Generator writes one zone-file line for a record you're about to add. It covers seven types: A, AAAA, CNAME, MX, TXT, NS and SRV. You pick a type, fill in the fields, and the line updates as you type. Nothing leaves your browser. The line follows the master-file format from RFC 1035 section 5.1, which BIND and most zone importers read: name, TTL, class, type, then the record data. The class is always IN. MX lines put the priority before the mail server. SRV lines use the order from RFC 2782, which is priority, weight, port, then target. That differs from the order of the form fields, and getting it wrong is a classic copy-paste mistake. Host names inside the record data get a trailing dot. That applies to CNAME and NS targets, MX mail servers and SRV targets. Without the dot, a zone file treats the name as relative and appends the zone's origin, so mail.example.com would quietly turn into mail.example.com.example.com. TXT values are wrapped in double quotes, with quotes and backslashes escaped. A TXT value longer than 255 bytes, which most 2048-bit DKIM keys are, is split into several quoted strings. RFC 1035 limits each string to 255 bytes, and resolvers join the parts back together. The split never cuts a UTF-8 character in half. Empty fields fall back to the grey example values. So if you type 192.0.2.10 as an A record's address and touch nothing else, you get @ 3600 IN A 192.0.2.10. Under the line, the tool lists warnings as you type. It checks that the TTL is a whole number of seconds, and that IPv4 and IPv6 addresses are well formed. Priority, weight and port must fall between 0 and 65535. You get a warning if you put a CNAME at the apex, which RFC 1034 rules out because the apex must also hold SOA and NS records. An IPv4 address used as an MX or CNAME target is flagged as well. Warnings don't block the output. The line is still shown, so read them before you paste. There are limits. The tool doesn't generate CAA, PTR or SOA records. It doesn't check whether an SPF, DKIM or DMARC value is correct, only that it's quoted properly. And it doesn't know your zone, so it can't spot a CNAME that clashes with an existing record.

Developers and sysadmins who edit BIND-style zone files or DNS panels and want the field order, quoting and trailing dots right the first time. The tool runs entirely in your browser, so your data never leaves your device.

02How to use DNS Record Generator

  1. Click the record type you need: A, AAAA, CNAME, MX, TXT, NS or SRV
  2. Fill in Name and the type's own fields, such as Mail Server and Priority for MX. Empty fields use the grey example values
  3. Set the TTL in seconds
  4. Read the generated line and any warnings listed below it
  5. Click the copy icon and paste the line into your zone file, or copy its parts into your DNS provider's form

03Worked examples

Input: A - Name @, IPv4 Address 192.0.2.10, TTL 3600
Result: @ 3600 IN A 192.0.2.10
Plain A record at the zone apex.
Input: MX - Name @, Mail Server mail.example.com, Priority 10, TTL 3600
Result: @ 3600 IN MX 10 mail.example.com.
The priority comes first and the host name gets a trailing dot, so the zone's origin isn't appended.
Input: SRV - Name _sip._tcp, Target sipserver.example.com, Port 5060, Priority 10, Weight 60, TTL 3600
Result: _sip._tcp 3600 IN SRV 10 60 5060 sipserver.example.com.
RFC 2782 order: priority, weight, port, target. That differs from the order of the form fields.
Input: TXT - Name sel._domainkey, Value v=DKIM1; k=rsa; p= followed by 300 letters A, TTL 3600
Result: sel._domainkey 3600 IN TXT "v=DKIM1; k=rsa; p=AAAA...A" "AAAA...A"
Trimmed. The 318-byte value is split into a 255-byte string and a 63-byte string.
Input: CNAME - Name @, Target example.com, TTL 3600
Result: @ 3600 IN CNAME example.com. Warning: A CNAME can't sit at the zone apex (@), because the apex must also hold SOA and NS records (RFC 1034 section 3.6.2).
The line is still generated, but the warning tells you not to use it.
Input: SRV - Name _xmpp._tcp, Target xmpp.example.com, Port 70000, Priority 5, Weight 0, TTL 3600
Result: _xmpp._tcp 3600 IN SRV 5 0 70000 xmpp.example.com. Warning: Port must be a whole number from 0 to 65535.
Out-of-range numbers are flagged but not corrected.

04Common use cases

  • Writing the MX line for a new mail provider with the right priority and a trailing dot on the host
  • Turning a DKIM public key from your mail provider into a TXT line that is split into valid 255-byte strings
  • Adding a _dmarc TXT record with a DMARC policy you have already decided on
  • Building an SRV record for SIP or XMPP without mixing up the priority, weight and port order
  • Pointing a www or app subdomain at a hosting or CDN target with a CNAME
  • Checking an IPv6 address before adding an AAAA record, so a typo doesn't go live

05Tips

  • Many DNS web panels add the trailing dot for you, and some reject it. Paste the target without the dot if your provider's form complains.
  • Only one SPF record is allowed per name (RFC 7208 section 3.2). Add new senders as include: terms in the existing TXT value instead of adding a second record.
  • In the Name field, @ means the zone apex. For a subdomain record, type only the label, such as www or _dmarc.
  • An SRV weight of 0 means no load sharing between targets with the same priority. Use higher weights only when you have several targets at one priority.

06Related concepts

BIND zone file, SPF record, DKIM, DMARC policy.

Frequently Asked Questions

What is DNS Record Generator?

DNS Record Generator is a free, browser-based developer tool on AIDToolStack. Generate DNS record configurations for A, AAAA, CNAME, MX, TXT, NS, SRV. It requires no installation or sign-up and works entirely in your browser.

Is DNS Record Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does DNS Record Generator store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe