Press ESC to close

MailTester NinjaMailTester Ninja Increase your email deliverability

MX Record Lookup: 5 Simple Ways to Check MX Records

    If email is not arriving at a domain, or you are verifying whether an address can receive mail at all, the first thing to check is its MX records. An MX record lookup tells you which mail servers a domain uses, whether they are configured correctly, and whether the domain can accept email in the first place. It takes seconds, requires no special software, and is the foundation of both email delivery and email verification.

    Yet MX records are one of the most misunderstood parts of email infrastructure. People assume that if a domain has a website, it can receive email. That is not true: a domain can exist, resolve to a site, and still have no mail server configured at all, which means every email sent to it bounces. The only way to know is to look up the MX records.

    This guide shows you exactly how to perform an MX record lookup using free built-in tools on Windows, Mac, and Linux, how to read the results including priority values, what common MX problems look like, and how MX records fit into email deliverability and verification. By the end, you will be able to check any domain's mail configuration in seconds and understand what the results mean.

    MX
    DNS record that routes email
    2
    commands to look up any MX record
    0
    MX records means email cannot arrive
    <1s
    to run an MX lookup
    Search intents covered: "MX record lookup", "how to check MX records", "MX record check", "nslookup MX record", "dig MX record", "what is an MX record", "MX record priority", "check mail server for domain", "MX lookup tool", "domain has no MX record"

    What Is an MX Record?

    An MX record, short for Mail Exchange record, is a type of DNS record that specifies the mail server responsible for receiving email for a domain. When someone sends an email to an address at a domain, the sending server looks up that domain's MX records to know where to deliver the message. Without an MX record, there is nowhere to route the mail, and it cannot be delivered. As Cloudflare explains, MX records are what make email routing possible across the internet.

    In short: An MX (Mail Exchange) record is a DNS record that tells the internet which mail server handles email for a domain. An MX record lookup is the act of querying those records to see which servers a domain uses and whether it can receive email at all. You can run one in seconds using the nslookup command on Windows or the dig command on Mac and Linux.

    MX records point to a hostname, not an IP

    One important detail: MX records point to a hostname (a canonical name like mail.example.com), never directly to an IP address. That hostname then has its own A or AAAA record that resolves to the actual IP of the mail server. This two-step design, defined in the SMTP standard, lets domains change their mail server's IP without touching the MX record itself.

    MX Records Explained Simply

    If DNS and mail servers sound intimidating, here is the whole idea in one analogy. Think of the internet like a giant postal system, and a domain name like a company's street address. When you send a letter to a big company, it does not go straight to one person. It arrives at the company's mailroom, and the mailroom sorts it to the right desk.

    An MX record is the sign on the building that tells the mail carrier where the mailroom is. Without that sign, the carrier has the street address (the domain) but no idea where to drop the mail, so the letter comes back undelivered. An MX record lookup is simply you walking up and reading that sign to see where a domain's mailroom is, or whether it has one at all.

    THE MAILROOM ANALOGY: HOW MX RECORDS WORK The email Where? reads the MX sign MX: mailroom The domain Mailroom sorts to desk Mail server Inbox No MX sign means no mailroom, so the email has nowhere to go and bounces back.

    A domain is the street address; the MX record is the sign pointing to the mailroom (mail server). No sign, no delivery.

    What is DNS, in one sentence?

    DNS (the Domain Name System) is the internet's address book. It translates human-friendly names like example.com into the technical information computers need, including which mail server handles the domain's email. An MX record is just one entry in that address book, the entry specifically for email. When you run an MX record lookup, you are asking the address book a simple question: "where does this domain receive its mail?"

    Why MX Records Matter

    MX records sit at the center of email delivery. If they are missing or misconfigured, email simply does not arrive, and the problems they cause are often invisible until mail starts bouncing. Here is why they matter in practice.

    If MX records are...Then...Result
    Correctly configuredMail routes to the right serverEmail delivered
    Missing entirelyNo server to receive mailEvery email bounces
    Pointing to wrong serverMail goes to a dead or wrong hostDelivery failure
    Pointing to an IP, not a hostnameInvalid configurationRejected by some servers

    For anyone doing email outreach or marketing, MX records matter for a second reason: they are the first signal of whether an address is even reachable. An address on a domain with no MX records is guaranteed to bounce, which is why MX checking is a core step in verifying an email address before you send.

    How to Do an MX Record Lookup

    You do not need any special software to look up MX records. Every operating system ships with a built-in command-line tool that does it. Here are the methods for each platform, plus online options.

    On Windows (nslookup)

    Windows includes the nslookup tool. Open Command Prompt and run the command, replacing the domain with the one you want to check.

    nslookup -type=mx example.com
    
    # Example output
    example.com    MX preference = 10, mail exchanger = mail1.example.com
    example.com    MX preference = 20, mail exchanger = mail2.example.com

    On Mac and Linux (dig)

    macOS and Linux include the dig tool, which is the standard for DNS queries. Open Terminal and run:

    dig example.com MX
    
    # For a cleaner, answer-only view
    dig example.com MX +short
    
    # Example +short output
    10 mail1.example.com.
    20 mail2.example.com.

    Using an online MX lookup tool

    If you prefer not to use the command line, many free web-based MX lookup tools let you enter a domain and see its records in a browser. These are convenient for a quick check and often display the resolved IP addresses and additional DNS health information alongside the MX records.

    Quick tip: The +short flag on dig strips everything except the answer, giving you just the priority numbers and mail server hostnames. It is the fastest way to read MX records at a glance when you check domains often.
    HOW AN MX RECORD ROUTES EMAIL Sending server wants to email you@example.com 1. Looks up MX DNS returns MX record: mail.example.com 2. Connects Mail server receives the email for the domain Inbox No MX record at step 1 means the email has nowhere to go, and it bounces.

    Every email triggers an MX lookup. The sending server queries DNS, gets the mail server hostname, and delivers the message there.

    How to Read MX Record Results

    An MX record lookup returns two key pieces of information for each mail server: a priority number and a hostname. Reading them is straightforward once you know what each part means.

    ANATOMY OF AN MX RECORD RESULT 10 mail1.example.com Priority number Lower = tried first. This is the primary. Mail server hostname Always a hostname, never an IP address

    Every MX result has just two parts: the priority number (which server to try first) and the mail server hostname.

    Part of the resultWhat it means
    Priority number (e.g. 10, 20)The order servers are tried. Lower numbers are tried first.
    Mail server hostnameThe canonical name of the server that receives mail.
    Multiple recordsBackup servers for redundancy if the primary is down.
    No records returnedThe domain cannot receive email at all.

    So a result like 10 mail1.example.com and 20 mail2.example.com tells you that mail is delivered to mail1 first, and if that server is unreachable, the sender falls back to mail2. Both belong to the same domain's mail setup. If the lookup returns nothing, the domain has no mail server, and any address there is undeliverable.

    Understanding MX Priority Values

    The priority value (sometimes called preference) is the part that confuses people most. The key rule is counterintuitive: a lower number means higher priority. The server with the lowest priority number is tried first.

    1
    Lower number, higher priority
    A server with priority 10 is tried before a server with priority 20. The number is a preference order, not a ranking where higher is better. Think of it as "first choice, second choice," where the smallest number is the first choice.
    2
    Backup servers use higher numbers
    Domains often list a primary server at priority 10 and a backup at 20 or higher. Mail only goes to the backup if the primary is unreachable, providing redundancy so messages are not lost during an outage.
    3
    Equal numbers share the load
    When two servers have the same priority value, mail is distributed between them roughly evenly. This is how large providers balance incoming email across multiple servers for capacity and reliability.
    The mental shortcut: Priority works like a race where the lowest number wins. Priority 0 or 10 is the primary, and the numbers climb for each fallback. If you see all servers at the same number, the domain is load-balancing rather than using backups.

    Common MX Record Problems

    Most email delivery issues that trace back to DNS come from a handful of recurring MX record problems. Here is what to look for when a lookup reveals something wrong. The good news is that an MX record lookup makes every one of them visible in seconds, so diagnosis is fast even when the underlying fix takes longer.

    1
    No MX records at all
    The most serious problem: the domain has no mail server configured, so it cannot receive email. The domain may host a website fine, but every email bounces. This is common with domains used only for websites, or freshly registered domains where mail was never set up.
    2
    MX pointing to an IP address
    MX records must point to a hostname, not an IP address. A record pointing directly to an IP is invalid and will be rejected by many sending servers, causing intermittent or total delivery failure. The fix is to point the MX at a hostname that has its own A record.
    3
    MX pointing to an unreachable server
    The record exists and is formatted correctly, but the hostname it points to is down, retired, or misconfigured. Mail is routed there and then fails. This often happens after a provider migration where old records were never updated.
    4
    Dangling MX after a provider change
    When a domain switches email providers, the old MX records sometimes linger alongside the new ones, or replace them incompletely. Mail can route to the wrong provider. A lookup quickly reveals whether the records match the intended provider.
    How an MX lookup helps: Running a lookup is the fastest way to diagnose all of these. If you see no records, an IP instead of a hostname, or a server name that does not match your provider, you have found the problem in seconds. For deliverability issues that go beyond MX, our guide on why emails go to spam covers the other factors.

    A simple way to diagnose any domain

    When you run a lookup, this quick decision flow tells you what the result means and what to do about it. Follow the path that matches what your lookup returned.

    MX LOOKUP DECISION FLOW Run the MX lookup Any records returned? No No mail server Domain cannot get email. Every address bounces. Yes Points to a hostname (not an IP)? No / IP Invalid config Fix: point MX to a hostname. Domain can receive mail Verify the mailbox next (SMTP).

    Three questions tell you everything: are there records, do they point to a hostname, and is the mailbox real?

    MX Records and Email Verification

    MX records are not just for diagnosing your own domain. They are a fundamental step in verifying whether someone else's email address can receive mail, which is why every serious email verification tool checks them.

    The No MX verification result

    When you verify an email address, the MX check is the second step, right after confirming the syntax is valid. The verifier looks up the domain's MX records to confirm a mail server exists before it even attempts to connect. If there are no MX records, the address is invalid immediately, with no need to go further. This is exactly the result MailTester.Ninja returns as No MX, meaning the domain has no mail server and the address cannot receive email. You can see how this fits alongside every other result in our guide to email verification statuses.

    MX checking is built into every verification MailTester.Ninja runs an MX lookup on every address automatically, then goes further with a real-time SMTP check to confirm the mailbox actually exists. Reliable catch-all detection and spam trap flagging included, at a fraction of incumbent prices.
    Verify an email

    This is also why a domain can pass an MX check but still need deeper verification. The MX record confirms the domain can receive mail, but it does not confirm that a specific mailbox exists. A catch-all domain, for instance, has valid MX records and accepts all mail, yet individual mailboxes there cannot be confirmed by the MX check alone.

    MX Records and Deliverability

    Beyond verification, your own domain's MX records play a role in whether your outbound email reaches the inbox. They are one piece of the broader DNS configuration that mailbox providers inspect.

    Correctly configured MX records are part of a healthy sending setup, working alongside your authentication records. While MX records govern incoming mail, they sit in the same DNS zone as the SPF, DKIM, and DMARC records that authenticate your outgoing mail, and a clean, consistent DNS configuration signals a legitimate sender. We cover the authentication side in depth in our SPF, DKIM, and DMARC guide.

    Maintaining correct MX records is also part of protecting your sender reputation and keeping your bounce rate low. If you are verifying recipient addresses before sending, the MX check filters out domains that cannot receive mail at all, and combining that with full verification before each send is one of the most effective parts of a strong email deliverability strategy.

    The bottom line: An MX record lookup is a fast, free diagnostic that answers a critical question: can this domain receive email? Whether you are troubleshooting your own mail flow or verifying that a recipient address is reachable before a campaign, checking MX records is the first step, and it takes only seconds.

    MX Lookup Glossary for Beginners

    New to email infrastructure? Here are the key terms in plain language, so the rest of this guide (and any MX lookup result) makes sense.

    TermWhat it means in plain English
    DNSThe internet's address book. It turns names like example.com into the technical details computers need.
    MX recordThe address-book entry that says which mail server handles a domain's email.
    Mail serverThe computer that receives and stores email for a domain, like a digital mailroom.
    HostnameA readable server name like mail.example.com, as opposed to a numeric IP address.
    IP addressThe numeric location of a server, like 192.0.2.1. MX records point to a hostname, which then resolves to an IP.
    A recordThe address-book entry that maps a hostname to its IP address.
    PriorityA number on each MX record setting the order servers are tried. Lower is tried first.
    nslookupA built-in Windows command for looking up DNS records, including MX.
    digA built-in Mac and Linux command for looking up DNS records, including MX.
    SMTPThe protocol email servers use to send and receive mail. An SMTP check confirms a specific mailbox exists.
    Catch-allA domain set to accept mail for every address, even ones that do not exist.
    BounceAn email that could not be delivered and is returned to the sender.

    Frequently Asked Questions

    What is an MX record lookup?
    An MX record lookup is the process of querying a domain's DNS to find its Mail Exchange (MX) records, which specify the mail servers responsible for receiving email for that domain. The lookup returns each server's priority number and hostname. It tells you whether a domain can receive email and which servers handle it. You can run one using the nslookup command on Windows or the dig command on Mac and Linux.
    How do I check the MX records for a domain?
    On Windows, open Command Prompt and run nslookup -type=mx followed by the domain name. On Mac or Linux, open Terminal and run dig followed by the domain name and MX, optionally adding +short for a cleaner result. Both return the domain's mail servers with their priority values. You can also use a free online MX lookup tool that displays the records in a browser without using the command line.
    What does the MX record priority number mean?
    The priority number sets the order in which mail servers are tried, and a lower number means higher priority. A server with priority 10 is tried before one with priority 20. Domains use this for redundancy: the primary server gets the lowest number, and backup servers get higher numbers that are only used if the primary is unreachable. When two servers share the same priority, mail is balanced between them.
    Can an MX record point to an IP address?
    No. MX records must point to a hostname (a canonical domain name like mail.example.com), not directly to an IP address. The hostname then has its own A or AAAA record that resolves to the mail server's IP. An MX record pointing straight to an IP is invalid and will be rejected by many sending servers, causing delivery failures. This two-step design lets a domain change its server's IP without editing the MX record.
    What happens if a domain has no MX record?
    If a domain has no MX records, it cannot receive email, and every message sent to any address at that domain will bounce. The domain may still host a website normally, since web and email use different DNS records, but without an MX record there is no mail server to route messages to. In email verification, a domain with no MX records produces an immediate invalid or No MX result.
    Why do MX records matter for email verification?
    MX records are the second checkpoint in email verification, right after syntax. Checking them confirms a domain has a mail server before the verifier attempts to connect. If there are no MX records, the address is invalid immediately, saving a pointless connection attempt. A valid MX record means the domain can receive mail, though confirming a specific mailbox still requires an SMTP check, which is why MX checking is necessary but not sufficient on its own.
    What is the difference between an MX record and an A record?
    An MX record specifies which mail server receives email for a domain, while an A record maps a hostname to an IP address. They work together: the MX record points to a hostname, and that hostname's A record resolves to the actual IP of the mail server. A domain uses A records for its website and MX records for its email, which is why a domain can have a working website but no email capability if its MX records are missing.
    How many MX records should a domain have?
    There is no fixed number, but most domains have at least one and often two or more. A single MX record works, but having a backup server at a higher priority number provides redundancy if the primary goes down. Large email providers may list several servers, sometimes at the same priority to balance load. What matters is that at least one valid MX record points to a reachable mail server with a proper hostname.
    Danila Kozlov, COO at MailTester.Ninja
    About the author
    Danila Kozlov
    COO at MailTester.Ninja

    Danila has spent the last few years deep in email deliverability, helping SaaS companies and growth teams fix the infrastructure problems that silently kill their outbound results. As COO of MailTester.Ninja, he oversees product and operations with a single obsession: making email verification fast, accurate, and genuinely useful for the people who need it most.

    Check more than just MX records

    An MX lookup tells you a domain can receive mail. MailTester.Ninja goes further, confirming the exact mailbox exists with a real-time SMTP check, plus catch-all detection and spam trap flagging. Fast, accurate, and a fraction of incumbent prices.

    Verify an email for free

    Real-time SMTP verification · MX and DNS checks · Catch-all detection · Zero data storage