What are MX records?
What is an MX record?
An MX record is one of the settings in your domain's DNS: the internet's "address book" that links domain names to servers. Where other records point to your website, the MX record points specifically to your mail server.
Think of the post. Your domain is your home address. The MX record is the note at the sorting stage that says: "mail for this address goes to that post office." That way every sender in the world knows where the email for your domain comes in, without you having to do anything for it. You'll find the short definition in the concept MX record.
A domain can have multiple MX records, each with a priority number. That provides a backup route in case the first server is briefly unreachable.
Why the MX record matters
The MX record is literally the condition for receiving email on your own domain. For you that means the following:
- Without a correct MX record, no mail comes in. If it points to nothing or to the wrong server, messages don't reach your mailbox, often without a clear error message for the sender.
- It determines whose mailbox your mail arrives in. If you move your email to a new provider, adjusting the MX record is the step that sends your mail to the new mailbox.
- The priority gives you reliability. With a backup MX, mail can still be delivered if the main server is temporarily down.
In short: if you want email on your own domain, the MX record isn't optional but the core. More about what mailing on your own domain involves can be read in email on your own domain.
How does an MX record work?
An MX record consists of two parts: a priority (a number) and the name of the mail server the mail should go to. Here's what happens when someone mails you:
- The sending server looks up your domain. It asks the DNS: "where does the mail of
jouwzaak.become in?" - The DNS returns the MX records, with their priority numbers. A lower number means higher priority: that server is tried first.
- The server connects with the mail server with the highest priority and delivers the message. If that fails, it tries the next MX record.
- Your mailbox receives the message and it appears in your inbox.
Important to know: the MX record only handles receiving. Sending runs via SMTP, and the trustworthiness of your sender is handled with other records (SPF, DKIM, DMARC). MX thus works together with the rest of your email settings; a complete overview is in DNS for email explained.
What to watch out for
When setting up MX records, a few things often go wrong. Watch out for this:
- Use the exact server name of your provider. One typo and your mail doesn't arrive. Copy the values literally.
- Get the priority right. If you have multiple MX records, give the correct priority. Two records with the same importance are fine, but random numbers cause confusing delivery.
- Clean up old MX records. If you move from a provider, delete the MX records of your previous provider. If those stay put, mail can still go to the old mailbox.
- Give it time. Changes in DNS aren't applied everywhere immediately. Count on a few hours before the new MX records are known worldwide.
- One set of MX per domain for email. Don't let two different services claim mail for the same domain at once, unless that's deliberately set up.
Setting it up itself we explain step by step in setting up MX records.
And with Mailflux
With Mailflux you don't have to figure out the technology of MX records on your own. If you bring your own domain, we give you the exact values and help you connect it; if you let Mailflux register and manage a domain, we set it up correctly for you right away. Your email then runs on your own domain, hosted in Europe and GDPR-compliant, with antivirus, antispam, antimalware and backups in every plan.
That way your mail comes in reliably, without you having to delve into DNS, though you can see and understand exactly what has been set up. No unnecessary bells and whistles, just email that simply works.
FAQ
Frequently asked questions
What happens without an MX record?
Without a correct MX record, the rest of the internet can't find where the email for your domain should be delivered. Messages then don't arrive in your mailbox, often without the sender getting a clear error message. A correct MX record is therefore necessary to receive mail.
What is the priority number for in an MX record?
The priority number determines the order in which mail servers are tried. A lower number means higher priority. That way you can set up a backup server: if the main server is temporarily unreachable, the mail goes to the next in line and nothing gets lost.
Is an MX record the same as an SPF or DKIM record?
No. The MX record handles where your email comes in (receiving). SPF, DKIM and DMARC prove that you are a trustworthy sender (sending). They're all in your domain's DNS and work together, but each has a different task.
How long does it take before an MX change works?
A change to your MX records isn't visible everywhere immediately. Count on a few hours before the new values are known worldwide. In the meantime mail can come in on both the old and the new server, so only delete old records once the new ones are active everywhere.
Can I use multiple MX records at once?
Yes. Multiple MX records with different priority numbers give you a backup route: if the main server briefly drops out, the mail goes to the next in line. Just don't let two separate email services claim mail for the same domain at once, unless that's deliberately set up that way.