Skip to main content
Black Friday: 20% off every plan until Dec 1.See the deal

MX Record Validation: RFC Rules and Tested Code

Leo
LeoFounder, BillionVerify

MX record validation explained from RFC 5321 and RFC 7505: null MX, implicit MX, DNS errors and tested Node.js, Python, Go code. Checked November 2026.

Marketer at a high-rise office desk reviewing MX record validation results in a spreadsheet

MX record validation is a DNS lookup that asks whether the domain in an email address publishes mail exchanger records, and whether those records lead to a server that can accept email. It is the second test in most verification pipelines, after the format check and before any conversation with the receiving server. The answer sorts every domain into one of five outcomes: usable MX records, a null MX, no MX records at all, a domain that does not exist, or a DNS failure that proves nothing yet. Each outcome has its own rule in the SMTP standard, and a validator that blurs them will either block real customers or keep sending to dead domains.

This guide explains each rule as it is written in RFC 5321, RFC 1035 and RFC 7505, then turns the rules into code. Every sample ran on 21 November 2026 with Python 3.15 and dnspython 2.9.2, Node.js 26, Go 1.27 and PHP 8.5, and the output under each block is what the machine returned. We have no connection with Google, Microsoft, Amazon or any standards body cited here, and providers change their setup pages, so confirm a value on the official page before you copy it. BillionVerify is an email verification service, and the last section shows where its checks begin after the DNS layer ends. Weighing your options? Read the BillionVerify vs QuickEmailVerification comparison.

Key facts (checked November 2026):

  • RFC 5321, section 5.1, says a domain that lacks MX records is handled as if it had an implicit MX of preference 0 pointing at its own host, while a non-existent domain must be reported as an error.

  • RFC 7505 defines the null MX as one record with a preference of 0 and a dot as the exchange, and forbids a second MX record beside it.

  • RFC 1035, section 3.3.9, makes the preference a 16-bit integer with lower values preferred, and the Amazon Route 53 reference allows the numbers 0 through 65535.

  • Google's Workspace guide names smtp.google.com as the single MX value and warns that a change may need three days to spread.

  • BillionVerify's verification reasons reference lists null_mx and no_mx_records as invalid results and dns_timeout as an unknown, retryable one.

What MX Record Validation Checks and What It Cannot Prove

An email server that wants to deliver to jane@example.org does not know where to connect until it asks DNS. Section 5.1 of the SMTP standard makes that step mandatory: once the sender has identified the destination domain, an MX lookup must be performed, and it starts by looking for MX records. MX record validation repeats the same MX lookup, so it gets the answer a real sender would get. That one idea explains both the strength and the limit of the test.

The strength is that the test needs no cooperation from the receiving server. A resolver query is fast, cheap and polite, so a quick MX record check can run on every row of an import before you spend anything on slower tests. It finds the failures that hurt deliverability most: domains that never existed, domains that expired, and domains that announce they accept no email. The limit is that the test describes the domain, not the person. A domain with flawless records can still refuse the mailbox, accept every mailbox without storing it, or belong to a throwaway service.

In a typical pipeline the order is syntax, DNS and MX, SMTP, then confirmation. Our guide to email syntax validation covers the first layer, and the article on SMTP email verification covers the third. The PHP manual makes the same point about its own getmxrr() function, saying it should not be used for address verification because it returns only the mail exchangers found in DNS. Read a pass as "email can be routed to this domain", never as "this mailbox exists".

How a Sending Server Reads MX Records

Four documents decide what a sender does with the answer. RFC 1035 defines the record, RFC 5321 defines the sender's behavior, RFC 2181 limits what an exchange may be, and RFC 7505 adds the null MX. A validator that follows the same four rules reaches the same verdict as real email software, which is the goal.

MX record priority decides the order

Every MX record carries a preference and an exchange. The preference is a 16-bit integer where lower values are preferred, and the exchange is a host willing to act as a mail exchange for the domain. The SMTP standard tells the sender to sort by preference, try the lowest value first and move on when a host fails, and adds that a client should try at least two addresses. When several records share a preference, the sender must randomize them so the load spreads across servers.

Amazon's reference describes the practical effect of MX record priority. With values of 10 and 20, email always goes to the server with priority 10 unless it is unavailable, and with values of 10 and 10 it is split between the two servers approximately equally. Real records follow both patterns. Gmail publishes five hosts at preferences 5, 10, 20, 30 and 40, while IANA publishes four hosts that all share preference 10.

No MX record means an implicit MX

If the MX lookup returns an empty list, the standard says the address is handled as if an implicit MX record of preference 0 pointed at the domain's own host. In practice the sender looks for A or AAAA records on the name itself. This fallback applies only when no MX record exists. If even one MX record is present, the sender must not use the domain's address records unless an MX record points to them, and if none of the records is usable the standard calls for an error. The host www.example.com is a live case: it has address records and no MX record, so a sender that follows the standard would try those addresses.

RFC 5321 section 5.1 text on locating the target host, covering the MX lookup and implicit MX rules

Screenshot: the RFC Editor page for SMTP opened at the target host rules, showing the lookup order, the fallback rule and the address requirement, captured in November 2026.

The null MX says no mail

RFC 7505 gives a domain a way to state that it accepts no email. It publishes a single MX record with preference 0 and a zero-length exchange, written as a dot, and it must not publish any other MX record. Without that record, the document explains, senders fall back to the A or AAAA records and keep retrying for a long period, typically a week, before they give up. A null MX record turns that slow failure into an immediate one. A server that rejects a recipient for this reason should answer with reply code 556 and enhanced status code 5.1.10.

IANA maintains example domains such as example.com and example.org for use in documentation, and today example.com, example.org and example.net all publish the null MX. They make safe test inputs, because no real email setup is involved. The document also warns against publishing the record on a domain you send from, since mail systems often reject messages whose sender domain cannot receive replies.

RFC 7505 section 3 describing a null MX record with preference 0 and a dot as the exchange

Screenshot: section 3 of RFC 7505 with the record format and the rule against other MX records, viewed in Nov 2026.

The exchange must be a host with an address

The data in an MX record has to be a domain name, and that name must return at least one A or AAAA record when queried. A value that returns a CNAME instead lies outside the standard. RFC 2181, section 10.3, states the prohibition directly: the name used in an MX record must not be an alias. Amazon's guide repeats it by telling administrators to specify the name of an A or AAAA record. A host that is an alias, or that has no address at all, is therefore not a usable exchange.

Amazon Route 53 reference for MX records with the priority range of 0 to 65535 and the rule against CNAME values

Screenshot: Amazon's Route 53 developer guide entry for MX records, with the priority range and the alias rule, taken in Nov 2026.

What Each DNS Answer Means

An MX lookup ends in one of five ways, and RFC 2308 names two of them. NXDOMAIN means the name does not exist. NODATA means the name exists but holds no record of the requested type. The table sets each answer beside a domain tested for this guide, the rule that governs it and the verdict a validator should return.

DNS answerDomain testedGoverning ruleVerdict
MX records returnedgmail.comHosts are tried by preferenceCheck the hosts
Null MXexample.comThe null record means no serviceInvalid, accepts no email
NODATAwww.example.comAddress records act as the exchangeRisky, uses A or AAAA
NXDOMAINexample.invalidA missing name is an errorInvalid
SERVFAIL or timeoutresolver forced offlineA temporary error is queued and retriedUnknown, retry later

The .invalid name is a safe way to get an NXDOMAIN answer, because RFC 2606 reserves it for names that are sure to be invalid. The last row cannot be produced on demand with a real domain, so the code below points the resolver at a port where nothing listens. That forces the failure path and shows what your code returns when DNS itself breaks.

The last row is also the one that damages lists. A timeout or SERVFAIL says the resolver failed, not that the domain is bad. After a temporary error the standard requires the message to be queued and retried, and its sending strategy recommends a retry interval of at least 30 minutes. A validator that files such a domain as invalid deletes real customers during a resolver outage. Mark the result unknown and test again later.

Negative answers are cached as well. RFC 2308 says an authoritative server takes the TTL of a negative answer from the smaller of the SOA record's MINIMUM field and the SOA record's own TTL. A domain whose records were added an hour ago can therefore still look nonexistent to a resolver that cached the earlier failure. Google's guide warns that new records can take up to 72 hours to be recognized, so a failure on a recently changed domain deserves a second look before it becomes a deletion.

Looking Up MX Records in Code

The samples use the same domains as the table, so you can compare the outputs line by line. All four languages perform an MX record lookup in a few lines. They differ in what they report when the answer is empty, and those differences decide how much of the logic above you must write yourself.

Node.js

The built-in dns module runs an MX lookup through resolveMx(), which returns objects with a priority and an exchange property. It throws ENOTFOUND for a missing name and ENODATA for a name without records, so the two outcomes stay apart. A null MX record arrives as a single object with an empty exchange string, which the code tests for. The last line points the resolver at a closed port to prove the temporary-failure path.

import { promises as dns } from "node:dns";

const resolver = new dns.Resolver({ timeout: 2000, tries: 1 });

async function checkMx(domain) {
  let records;
  try {
    records = await resolver.resolveMx(domain);
  } catch (error) {
    if (error.code === "ENOTFOUND") return { verdict: "invalid", reason: "domain does not exist" };
    if (error.code === "ENODATA") return { verdict: "implicit", reason: "no MX records, try A/AAAA" };
    return { verdict: "unknown", reason: error.code }; // timeout, SERVFAIL, refused: retry later
  }
  if (records.length === 1 && records[0].exchange === "") {
    return { verdict: "invalid", reason: "null MX, the domain accepts no mail" };
  }
  records.sort((a, b) => a.priority - b.priority);
  return { verdict: "mx", hosts: records.map((r) => `${r.priority} ${r.exchange}`) };
}

for (const domain of ["gmail.com", "example.com", "www.example.com", "example.invalid"]) {
  console.log(domain.padEnd(16), JSON.stringify(await checkMx(domain)));
}

resolver.setServers(["127.0.0.1:5399"]); // nothing listens on this port
console.log("gmail.com".padEnd(16), JSON.stringify(await checkMx("gmail.com")));

// gmail.com        {"verdict":"mx","hosts":["5 gmail-smtp-in.l.google.com","10 alt1.gmail-smtp-in.l.google.com","20 alt2.gmail-smtp-in.l.google.com","30 alt3.gmail-smtp-in.l.google.com","40 alt4.gmail-smtp-in.l.google.com"]}
// example.com      {"verdict":"invalid","reason":"null MX, the domain accepts no mail"}
// www.example.com  {"verdict":"implicit","reason":"no MX records, try A/AAAA"}
// example.invalid  {"verdict":"invalid","reason":"domain does not exist"}
// gmail.com        {"verdict":"unknown","reason":"ECONNREFUSED"}

Node's error list also includes dns.TIMEOUT and dns.SERVFAIL, and the sample sends every code except the two name errors to the unknown verdict. Its sort keeps DNS order for equal preferences, so add a shuffle if you want to mimic a sender.

Python with dnspython

The dnspython package, installed with pip install dnspython, separates the outcomes by exception class. Its resolver documentation lists NXDOMAIN for a missing name, NoAnswer for an empty answer, NoNameservers when no working server remains, and a timeout when the lifetime runs out. Each MX record lookup in the module below ends in a named outcome, and the code also saves the TTL, so a cache can expire an entry when the zone says it should. The function shuffles equal preferences first and then sorts, because a stable sort keeps the shuffled order among ties. Save the module as mx_lookup.py.

import random

import dns.exception
import dns.resolver

resolver = dns.resolver.Resolver()
resolver.lifetime = 5.0  # total seconds for one lookup

def lookup_mx(domain):
    """Return (outcome, hosts, ttl). Outcomes follow RFC 5321 section 5.1."""
    try:
        answer = resolver.resolve(domain, "MX")
    except dns.resolver.NXDOMAIN:
        return "nxdomain", [], None
    except dns.resolver.NoAnswer:
        return "no_mx", [], None  # the name exists but has no MX record
    except (dns.resolver.NoNameservers, dns.exception.Timeout):
        return "temp_fail", [], None
    except dns.exception.DNSException:  # for example a label over 63 octets
        return "bad_name", [], None

    hosts = [(r.preference, str(r.exchange).rstrip(".")) for r in answer]
    if hosts == [(0, "")]:
        return "null_mx", [], answer.rrset.ttl
    random.shuffle(hosts)           # equal preferences must be randomized
    hosts.sort(key=lambda h: h[0])  # a stable sort keeps the shuffled ties
    return "mx", hosts, answer.rrset.ttl

if __name__ == "__main__":
    for name in ["gmail.com", "iana.org", "example.com", "www.example.com", "example.invalid", "a" * 64 + ".com"]:
        print(f"{name[:20]:20} {lookup_mx(name)}")

# gmail.com            ('mx', [(5, 'gmail-smtp-in.l.google.com'), (10, 'alt1.gmail-smtp-in.l.google.com'), (20, 'alt2.gmail-smtp-in.l.google.com'), (30, 'alt3.gmail-smtp-in.l.google.com'), (40, 'alt4.gmail-smtp-in.l.google.com')], 268)
# iana.org             ('mx', [(10, 'pechora7.icann.org'), (10, 'pechora8.icann.org'), (10, 'pechora6.icann.org'), (10, 'pechora1.icann.org')], 3600)
# example.com          ('null_mx', [], 300)
# www.example.com      ('no_mx', [], None)
# example.invalid      ('nxdomain', [], None)
# aaaaaaaaaaaaaaaaaaaa ('bad_name', [], None)

The four IANA hosts do not keep one sequence between runs, which is the randomization rule at work. The Gmail TTL is only a snapshot, because it counts down from the value the zone publishes. The last name has a 64-character label, which breaks the 63-octet label limit from RFC 1035, so the library refuses it before any packet leaves the machine. With the resolver pointed at a closed port, the same function returned temp_fail for gmail.com.

Go and PHP

Go's net.LookupMX returns records sorted by preference and, as the four IANA lines show, ties can arrive in a different order from run to run. In Go, a null MX record shows up as a host that is a single dot. The documentation for the net package says the IsNotFound flag on a DNSError is set both when the name has no data of that type and when the name itself was not found. NXDOMAIN and NODATA therefore look identical from this call, so a Go program that runs an MX record lookup and needs the implicit rule has to ask a second question.

package main

import (
	"errors"
	"fmt"
	"net"
)

func main() {
	for _, domain := range []string{"iana.org", "example.com", "www.example.com", "example.invalid"} {
		records, err := net.LookupMX(domain)
		var dnsErr *net.DNSError
		switch {
		case errors.As(err, &dnsErr) && dnsErr.IsNotFound:
			fmt.Printf("%-16s not found: %v\n", domain, dnsErr.Err)
		case err != nil:
			fmt.Printf("%-16s error: %v\n", domain, err)
		default:
			for _, mx := range records {
				fmt.Printf("%-16s %d %q\n", domain, mx.Pref, mx.Host)
			}
		}
	}
}

// iana.org         10 "pechora7.icann.org."
// iana.org         10 "pechora1.icann.org."
// iana.org         10 "pechora6.icann.org."
// iana.org         10 "pechora8.icann.org."
// example.com      0 "."
// www.example.com  not found: no such host
// example.invalid  not found: no such host

PHP's getmxrr() is the shortest of the four, and the least informative. It returns false both when no records exist and when an error occurs, so a timeout cannot be told from an empty answer. For the null MX it returns true with one empty host name and a weight of 0, so test for an empty string before you treat true as success.

<?php
foreach (["iana.org", "example.com", "www.example.com", "example.invalid"] as $domain) {
    $found = getmxrr($domain, $hosts, $weights);
    printf("%-16s %-5s %s\n", $domain, $found ? "true" : "false", json_encode(array_combine($hosts, $weights) ?: []));
}

// iana.org         true  {"pechora1.icann.org":10,"pechora6.icann.org":10,"pechora7.icann.org":10,"pechora8.icann.org":10}
// example.com      true  {"":0}
// www.example.com  false []
// example.invalid  false []

Checking the Email Servers Behind the Records

A record set can look fine and still lead nowhere. The standard requires the name in the MX data to resolve to an address record, and RFC 2181 forbids an alias. The function below tests both rules for one host, then asks Python's ipaddress module whether the address is globally reachable. The is_global property follows the IANA special-purpose registries, so loopback, private and documentation ranges all count as not public. Save this module as mx_hosts.py.

import ipaddress

import dns.exception
import dns.name
import dns.resolver

resolver = dns.resolver.Resolver()
resolver.lifetime = 5.0

def check_exchange(host):
    """Judge one MX target: RFC 5321 wants an address record, RFC 2181 forbids an alias."""
    addresses, alias = [], False
    for rrtype in ("A", "AAAA"):
        try:
            answer = resolver.resolve(host, rrtype)
        except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
            continue
        except dns.exception.DNSException:
            return "temp_fail"
        alias = alias or answer.canonical_name != dns.name.from_text(host)
        addresses += [r.address for r in answer]
    if not addresses:
        return "no_address"
    if alias:
        return "alias"
    if not any(ipaddress.ip_address(a).is_global for a in addresses):
        return "not_public"
    return "ok"

if __name__ == "__main__":
    for host in ["gmail-smtp-in.l.google.com", "www.iana.org", "mail.example.invalid", "a.root-servers.net"]:
        print(f"{host:28} {check_exchange(host)}")
    for text in ["127.0.0.1", "10.2.3.4", "192.0.2.10", "8.8.8.8", "::1", "2606:4700::6810:1"]:
        print(f"{text:20} global={ipaddress.ip_address(text).is_global}")

# gmail-smtp-in.l.google.com   ok
# www.iana.org                 alias
# mail.example.invalid         no_address
# a.root-servers.net           ok
# 127.0.0.1            global=False
# 10.2.3.4             global=False
# 192.0.2.10           global=False
# 8.8.8.8              global=True
# ::1                  global=False
# 2606:4700::6810:1    global=True

The www.iana.org name is used only to exercise the alias branch, because it points to another name; IANA's own email servers use ordinary hostnames. Judge each host on its own and each domain on all of its hosts. The sender is expected to work through the list, so one dead exchange among several does not make a domain undeliverable. The domain fails when none of its hosts is usable, which the standard calls an error. Stop the MX record check there. Opening a connection is the SMTP step, where mailbox answers, greylisting and rate limits begin.

Putting the Rules Together

The final script for MX record validation joins both modules and returns one of four verdicts. It groups the list by domain before it looks anything up, because every address at gmail.com shares a single answer. The sample holds seven addresses and needs five lookups, and on a real import the gap is much larger.

from collections import defaultdict

from mx_hosts import check_exchange
from mx_lookup import lookup_mx

def validate_domain(domain):
    """Return (verdict, reason): valid, risky, invalid or unknown."""
    outcome, hosts, _ttl = lookup_mx(domain)
    if outcome in ("nxdomain", "null_mx", "bad_name"):
        return "invalid", outcome
    if outcome == "temp_fail":
        return "unknown", "dns temporary failure, retry later"
    implicit = outcome == "no_mx"
    if implicit:
        hosts = [(0, domain)]  # RFC 5321 5.1: the host itself acts as the MX
    states = [check_exchange(host) for _, host in hosts]
    if "ok" in states:
        return ("risky", "implicit MX, no MX record published") if implicit else ("valid", "usable MX host")
    if "temp_fail" in states:
        return "unknown", "mail host lookup failed, retry later"
    return "invalid", "no usable mail server: " + ", ".join(sorted(set(states)))

emails = ["a@gmail.com", "b@gmail.com", "c@iana.org", "d@example.com",
          "e@www.example.com", "f@example.invalid", "g@gmail.com"]
by_domain = defaultdict(list)
for email in emails:
    by_domain[email.rpartition("@")[2].lower()].append(email)

print(f"{len(emails)} addresses, {len(by_domain)} domain lookups")
for domain, members in by_domain.items():
    verdict, reason = validate_domain(domain)
    print(f"{domain:18} {verdict:8} {reason:40} {len(members)} address(es)")

# 7 addresses, 5 domain lookups
# gmail.com          valid    usable MX host                           3 address(es)
# iana.org           valid    usable MX host                           1 address(es)
# example.com        invalid  null_mx                                  1 address(es)
# www.example.com    risky    implicit MX, no MX record published      1 address(es)
# example.invalid    invalid  nxdomain                                 1 address(es)

The risky verdict covers only the implicit case. The standard says to deliver to the host itself, but a host that serves a website and nothing else will have address records and nobody reading email, and DNS cannot tell you which situation you have. Whether to keep such addresses is a policy choice for your list. Leave them for the SMTP layer to settle, and never promote them to valid on DNS evidence alone.

Reading Provider Patterns in MX Records

The MX hosts also reveal who runs a domain's email, which helps when you segment a list or debug a bounce. Google's guide sets the MX record priority at 1 for smtp.google.com, the Workspace value, and says domains that began before 2023 may still use legacy values that start with aspmx, which remain supported. Personal Gmail addresses use their own group, the five hosts printed earlier. The guide also warns that keeping old or incorrect records can stop email from working correctly, so a Workspace domain should show no leftovers from a previous provider.

Google Workspace help page showing smtp.google.com as the MX record value and the note on legacy aspmx values

Screenshot: Google's help page for Workspace MX records, with the single MX value and the legacy values note, as of Nov 2026.

Microsoft's guide tells administrators to copy the MX value from the Microsoft 365 admin center, set the priority to the highest value available, typically 0, and use a one-hour TTL of 3600 seconds. It adds that Exchange Online only supports TTL values below 6 hours. When an older provider's records still exist, the administrator should remove them or give them a lower priority. When this guide was written, the MX of github.com was 0 github-com.mail.protection.outlook.com, a record that matches that pattern.

A host suffix is a hint, not proof. Some domains put a filtering service in front of their mailboxes: the MX hosts of cloudflare.com sat under cf-emailsecurity.net, and that name tells you nothing about where the mailboxes live. Use the suffix to group a list for reporting, and keep the verdict itself tied to the rules in this guide. A domain in the middle of a migration may also show two vendors at different preferences, which is legal and common.

Where MX Validation Ends and Verification Starts

MX record validation leaves three questions open. Does the mailbox exist? Does the domain accept every address and sort the email later? Is the address a throwaway? The first needs an SMTP exchange with the server that holds the mailbox, the second needs a catch-all test that our article on catch-all email detection explains, and the third needs a maintained list, because a temporary-mail service has to receive email and so passes every DNS test. A tool for disposable email detection covers that last part.

Even a perfect DNS answer may not satisfy a strict sender. RFC 8461 lets a domain publish an MTA-STS policy with a list of allowed MX patterns. In enforce mode a sending server must not deliver to hosts that fail the match, so a host that is valid in DNS can still be refused. For a one-off MX record check on a single name, the MX lookup page shows the records and their order without writing any code.

DNS checker listing A, AAAA, MX, TXT and NS record rows for a domain

For one address, a free tool to check whether an email address exists runs the format test, the DNS and MX lookup and a live SMTP test in one step, and reports disposable, role and catch-all results separately. For files and automation, BillionVerify applies the same layers in bulk or through a REST API, and its bulk email verification page covers uploads. Valid and invalid results cost one credit each, unknown results cost nothing, and a free account gets 20 credits on each day it is used, up to 600 a month, with no credit card. Sending to a list you did not collect yourself is where this matters most, because every bounce counts against the domain you send from.

The request below follows the quickstart and was run with a real key in November 2026. It sends the three domains whose DNS answers differ, and the reasons that come back match the lookups above.

async function verify(email) {
  const response = await fetch("https://api.billionverify.com/v1/verify/single", {
    method: "POST",
    headers: { "BV-API-KEY": process.env.BV_API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify({ email }),
  });
  const { data } = await response.json();
  return { status: data.status, reason: data.reason };
}

for (const email of ["jane@example.com", "jane@example.invalid", "jane@www.example.com"]) {
  console.log(email.padEnd(24), JSON.stringify(await verify(email)));
}

// jane@example.com         {"status":"invalid","reason":"null_mx"}
// jane@example.invalid     {"status":"invalid","reason":"no_mx_records"}
// jane@www.example.com     {"status":"invalid","reason":"no_mx_records"}

The reasons reference defines no_mx_records as a domain with no MX records, whether the cause is NXDOMAIN or an empty lookup result, and the last line shows the consequence: a domain that relies on the implicit MX is reported as invalid, which is stricter than the risky verdict in the script above. Failures of DNS itself, such as dns_timeout and dns_lookup_error, come back as unknown and retryable, and unknown results are never billed. If your list contains domains that depend on the implicit rule, compare both answers before you delete anything.

Two smaller checks round out a signup flow. When a domain passes DNS but still looks wrong, a reverse email lookup reads the domain, organization and mail routing behind an address. If the form also asks for a phone number, a phone number validator tests it against its country format and reports the line type.

FAQs

Does a valid MX record mean the email address exists?

No. A valid answer only shows that email for the domain can be routed to a server. The mailbox, the owner and any catch-all behavior are decided by the server itself or by a confirmation message, so treat the DNS result as a filter that removes dead domains early.

Is a domain without MX records always invalid?

No. The SMTP standard handles an empty list as an implicit MX, so a domain with an A or AAAA record can still receive email. A domain with neither, or one that publishes a null MX, cannot. How strict to be is a policy decision, and the verdict list above keeps the two cases apart.

What does a null MX record look like?

It is the pair 0 . in zone files, a preference of 0 and a single dot for the exchange. A null MX record appears differently in each language: Node gives an empty string, Go gives a dot and PHP gives an empty key. Check for those forms before you count the answer as usable.

What priority should an MX record use?

The MX record priority can be any integer from 0 to 65535, and the lowest value is tried first. Providers publish their own numbers: Google's guide says 1 and Microsoft's says the highest available, typically 0. Use equal values only when you want the load shared between servers.

Should a DNS timeout mark an email as invalid?

No. A timeout or SERVFAIL describes the lookup, not the domain, and senders are told to queue the message and retry. Mark the address unknown, repeat the MX record check after a delay and only then decide. Deleting these rows removes real contacts whenever a resolver has a bad hour.

How long do MX record changes take to apply?

It depends on the TTL that resolvers cached and on your registrar. Google's guide allows up to three days for new records, and Microsoft's page suggests a TTL of one hour. A negative answer is cached too, so a freshly added record may stay invisible until the cached failure expires.

Watch: DNS Checker and MX Lookup: How to Check MX Records

Watch: How to Create an Email Verification API Key

Leo
LeoFounder, BillionVerify
Email Verification Insights

Start Verifying Today

Start verifying emails with BillionVerify today. Get 20 free credits every day you log in, up to 600 a month - no credit card required. Join thousands of businesses improving their email marketing ROI with accurate email verification.

Live SMTP mailbox check · Real-time API & bulk verification · Unknown results are free

0
Credits for Unknown Results
Real-time
API Speed
$0.00014
Per Email
600/mo
Free Forever