Skip to content
Domains and DNS2 min read

What is an MX record?

Short answer

An MX (mail exchanger) record is a DNS record that names the server responsible for receiving email for your domain. When someone sends a message to [email protected], their mail server looks up the domain's MX record and delivers the message to the server listed there.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Format and priority
  2. Practical example: checking it
  3. Common mistakes
  4. On ArabyHost

An MX record is about receiving only. Sending from your domain and proving your messages are genuine depend on other records such as SPF and DKIM. That’s why sending can work while receiving is broken, or vice versa.

Format and priority

example.com.  3600  IN  MX  10  mail.example.com.
example.com.  3600  IN  MX  20  backup-mx.example.net.

The number before the server name is the priority: the lower number is tried first. If the priority-10 server doesn’t answer, the sender tries the priority-20 one. Equal priorities share the load.

Field Example Note
Name @ The domain receiving mail
Priority 10 Lower is preferred
Value mail.example.com A hostname, not an IP address

Mail services such as Google Workspace and Microsoft 365 give you ready-made MX values: copy them exactly, priorities included, and remove any other MX record that doesn’t belong to that service.

Practical example: checking it

dig MX example.com +short

Or use the MX lookup tool in your browser, and make sure the hostname shown has a valid A record.

Common mistakes

  • MX pointing to an IP or a CNAME: the value must be a hostname with an A record, not a number and not a CNAME.
  • Mixed MX records: leaving the old host’s MX next to a new service’s MX sends some mail to the wrong place.
  • Forgetting MX when changing nameservers: if your mail is with Google or Microsoft, add their records on the new nameservers, or you’ll stop receiving email.
  • A domain that never receives mail: you can publish a “null MX” with the value 0 . to tell senders so straight away.

On ArabyHost

When the domain points to ns1.arabicode.com and ns2.arabicode.com, an MX record is created automatically so business email is received on your hosting, with SPF and DKIM set up too. If your mail is hosted elsewhere, edit the MX records in the DNS editor to match that provider. To move mail without losing messages, see the email migration guide, and take a look at our business email plans.

FAQ

Do I need an MX record if I only send email?

Yes, to receive replies. Some mail servers also treat a domain that can't receive mail as suspicious, which can hurt the delivery of your messages.

Can a domain have more than one MX record?

Yes, and it's common for a backup server. But they should all belong to the same mail service or a backup configured to work with it, not two different services.

How long does an MX change take?

It depends on the TTL, usually minutes to a few hours. Some messages may still reach the old server meanwhile, so don't delete the old mailboxes right away.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.