What is an MX record? Email routing explained

An MX (Mail Exchange) record is the DNS entry that says where email for your domain should be delivered. When someone writes to [email protected], their mail server looks up the MX records of example.com and connects to the server named there. If you have not read it yet, what DNS is gives the background.
MX records only concern incoming mail. They have no effect on the mail you send, which is why a wrong MX record shows up as "I stopped receiving anything" while outgoing mail keeps working.
What one looks like
example.com. 3600 IN MX 10 mx1.mailprovider.com.
example.com. 3600 IN MX 20 mx2.mailprovider.com.Reading left to right: the domain, the TTL, the type, the priority, and the hostname of the server.
What the priority number means
The lowest number is tried first. Here the sender tries mx1 (10), and only uses mx2 (20) if mx1 does not answer. Two records with the same number share the traffic roughly evenly.
The numbers themselves mean nothing beyond their order: 10 and 20 behave exactly like 1 and 2.
Mistakes that stop your mail
- Pointing MX at an IP address. The value must be a hostname, and that hostname needs its own A or AAAA record.
- Pointing MX at a CNAME. The mail standards forbid it. Some senders tolerate it, others do not, so mail goes missing only from some people.
- Mixing two providers. Keeping old records beside the new ones means some mail lands in the old mailbox. Remove what you no longer use once the move is finished.
- Forgetting the trailing dot. In some DNS editors,
mail.example.comwithout a final dot gets your domain appended and becomesmail.example.com.example.com. Look at the result with a lookup, not at the form. - Editing the wrong zone. If your NS records point to another provider, changes at your registrar do nothing.
What happens with no MX record
If a domain has no MX record, the standard tells senders to try its A record as a fallback. In practice the web server rarely accepts mail, so the message bounces. A domain that never receives mail can say so explicitly with a null MX, 0 ., and senders then give up straight away.
Frequently asked questions
How do I check my MX records?
Run dig example.com MX, or use the MX record check, which also names the provider behind them. No account is needed.
Do I lose mail while changing MX records?
Normally not, as long as the old server keeps accepting mail. Lower the TTL a day ahead, make the change, and leave the old mailbox open for a few days, since some senders keep the old answer until their cache expires.
Can a subdomain have its own MX records?
Yes. support.example.com can receive mail at a different provider from example.com. This is a common way to try a new tool without touching your main mail.
Why do I have several MX records?
For redundancy. Large providers publish several servers so that one being down does not stop your mail. Senders also retry for hours or days if nothing answers, so a short outage rarely loses anything.
Smailor gives you the exact MX values when you add your domain and tells you when they are live. If you want the address first and the domain later, you can also start on smailor.com.