Zero Signup ToolsFree browser tools

Developer Tools

MX Record Generator

Build and parse DNS MX records in your browser. Set preference and mail server, use Google, Microsoft 365, Zoho presets, copy Cloudflare and BIND snippets.

MX record generator and parser

Provider presets

Presets fill the mail server hosts each provider publishes. Always confirm them against your provider's current setup page, since Microsoft 365 uses a tenant-specific host and providers update their MX hosts over time.

Owner name: example.com.

Mail servers

Lower preference is tried first. The left field is the preference (priority); the right field is the mail server host. Use a single . as the host for a null MX.

MX records

example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN MX 20 mail2.example.com.

What this does

Mail for example.com is delivered first to mail.example.com (preference 10). If the primary is unreachable, senders fall back to mail2.example.com (preference 20). Lower preference numbers are always tried before higher ones.

  • NoteRecord 1: in a BIND zone file the mail server should end with a trailing dot so it is not treated as relative. Most provider UIs add it for you.
  • NoteRecord 2: in a BIND zone file the mail server should end with a trailing dot so it is not treated as relative. Most provider UIs add it for you.

Publish at your DNS provider

example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN MX 20 mail2.example.com.

How MX preference works

  • An MX record is preference exchange, for example 10 mail.example.com.
  • preference is 0 to 65535. The lowest number is tried first; higher numbers are backups.
  • Records with the same preference are load balanced: a sender picks among them at random.
  • The number is relative, not a count. The gap between 10 and 20 has no meaning beyond ordering.

Common MX mistakes

  • The exchange must be a hostname, not an IP. Point it at a name that has an A or AAAA record.
  • The exchange should not be a CNAME (RFC 2181 / RFC 5321). Use the real host name.
  • In a BIND zone file, end the host with a . so it is not treated as relative to the zone.
  • A null MX is 0 . (RFC 7505) and must be the only MX record. It says the domain accepts no mail.

How to use

  1. Choose Build records to compose MX records, or Parse and explain to paste existing ones.
  2. Builder: enter the domain that receives mail and an optional TTL. The full owner name is shown below the field.
  3. Pick a provider preset (Google Workspace, Microsoft 365, Zoho, Fastmail, Proton, iCloud+, or null MX), or add rows by hand. Confirm preset hosts against your provider's setup page.
  4. For each mail server, set the preference (lower is tried first) and the host name. Use a real host with an A or AAAA record, never an IP or a CNAME. A single dot is a null MX that accepts no mail.
  5. Read the generated records, the plain-English delivery order, and any validation warnings. Copy all records at once.
  6. Pick a DNS provider snippet for BIND, Cloudflare, Route 53, Google Cloud DNS, or Azure DNS to publish every record.
  7. Parser: paste one record per line as full zone-file lines, bare preference and host pairs, or provider split fields. The tool validates each record and explains the delivery order, lowest preference first.

About this tool

MX Record Generator is a two-mode browser tool for the DNS MX (mail exchange) resource record, the record that decides which mail servers receive a domain's email. Every domain that accepts email needs at least one MX record, and the two things people get wrong, the preference order and the trailing dot, are exactly what this tool handles for you. An MX record is two values, a preference number and a mail server host name, so a complete zone-file line reads example.com. 3600 IN MX 10 mail.example.com. The preference is 0 to 65535, the lowest number is tried first, and records sharing the same preference are load balanced at random; the gap between numbers has no meaning beyond ordering, which is why 10 and 20 work as well as 1 and 2. The Build tab lets you add one row per mail server, set the preference and host for each, and pick the domain and TTL, then it shows every record, a plain-English summary of the exact delivery order (which server is primary, which are fallbacks, and where senders go when one is down), and validation that catches the classic mistakes: a mail server pointed at an IP address instead of a host name (which is invalid, since the exchange must resolve through an A or AAAA record and, per RFC 2181 and RFC 5321, should not be a CNAME), a host missing the trailing dot that a BIND zone file needs, an out-of-range or non-numeric preference, duplicate records, and a null MX accidentally mixed with real servers. Provider presets fill the published mail hosts for the services people configure most: Google Workspace (both the current single-host setup and the legacy five-host aspmx set), Microsoft 365, Zoho Mail, Fastmail, Proton Mail, and iCloud+ custom domains, plus a null MX preset (RFC 7505) for domains that should reject all mail. Because Microsoft 365 uses a tenant-specific host and providers update their MX hosts over time, the presets are a starting point you confirm against your provider's current setup page. Ready-to-paste DNS provider snippets cover a BIND zone file, the Cloudflare DNS UI fields, the AWS Route 53 change-batch CLI, the Google Cloud DNS gcloud CLI, and the Azure DNS CLI, with every record included so a multi-server setup pastes in one block. The Parse tab takes any MX records, a full zone-file line, a bare preference and host pair, or the split fields a provider UI shows, one per line, and prints a field-by-field breakdown, validates every value, flags conflicts across the set, and explains the effective delivery order so you can sanity-check records someone handed you or read back what a provider generated. A reference grid explains how preference works and lists the pitfalls, so the page doubles as a quick study sheet. Everything runs locally in your browser with plain string parsing. No DNS queries are sent, nothing is uploaded, and the domains and host names you enter never leave your device. This is a generator and parser, not a resolver: it shows you the records to publish and explains records you paste, it does not look up what is currently live for a domain. Useful for setting up email on a new domain, migrating between providers, adding a backup mail server, hardening a non-sending domain with a null MX, and debugging why mail is going to the wrong server.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools