MX lookup

Find the mail servers published for a domain and the order in which senders should try them. Enter a domain such as example.com, or an email address to check its domain's MX records.

How to read MX priority

Lower priority numbers are tried before higher ones. For example, a server with priority 10 is preferred to one with priority 20. Equal numbers share the same preference level.

Priority describes delivery order, not speed or uptime. The server names identify the incoming-mail destinations published in DNS.

No MX records and null MX are different

An empty list means no MX records were found. SMTP can fall back to a domain's address record, so an empty MX list alone does not establish that the domain rejects every message.

A null MX record has priority 0 and a single dot as its server name. It explicitly declares that the domain accepts no email.

Build an MX lookup tool

The MX API returns the published hosts and priorities. Sort a copy by priority and recognize the special null MX record.

  1. Extract the domain if the visitor pastes an email address.
  2. Fetch the domain's MX records and order lower priorities first.
  3. Show a null MX as a no-mail declaration, not a mail server.

Installation steps are included in each example. Set PARSEAPI_KEY on your server. Swift and Kotlin use an app key restricted to your app ID.

// npm install @parseapi/sdk@1.14.0
import { parseAPI } from '@parseapi/sdk';

// Set PARSEAPI_KEY on your server.
const parse = parseAPI();

const input = 'name@example.com';
const domain = input.trim().split('@').at(-1).toLowerCase();
const result = await parse.mx(domain);
if (!Array.isArray(result.mx)) throw new Error('MX records are unavailable.');
const records = [...result.mx].sort((a, b) => a.priority - b.priority);
const nullMx = records.length === 1 && records[0].priority === 0 && records[0].host === '.';
console.log({ domain: result.domain, acceptsNoMail: nullMx, records });
// An empty MX list and an explicit null MX are different DNS answers.

MX API documentation

What is an MX record?

An MX record tells sending mail systems which host receives email for a domain. Look up the part after @, or paste an email address and this tool extracts its domain.

Is a lower MX priority better?

A lower number is preferred for delivery order. It is not a speed or reliability score. Equal priority numbers share the same preference level.

What does a null MX record mean?

A single record with priority 0 and host . explicitly declares that the domain accepts no email. It is different from finding no MX records.

Can a domain receive email with no MX records?

SMTP can fall back to the domain’s address record when no MX records exist. An empty MX list alone is therefore not proof that every message will be rejected.

Does an MX lookup check an individual mailbox?

It checks routing for the domain, not whether a specific address exists. Email format and mailbox verification are separate checks.

Why are old records still showing after a change?

DNS answers can be cached until their TTL expires. Use the DNS API when you also need record TTLs.