What does an MX record look like?
Each MX record has two parts: a preference number and the name of a mail host [1]. Some DNS hosts show them in two boxes (Priority and Value), others in one line.
; name TTL class type preference mail host
example.com. 3600 IN MX 10 mail1.example.net.
example.com. 3600 IN MX 20 mail2.example.net.Which number does a sender try first, 10 or 20?
The lower one. RFC 5321 says the records are first ordered by preference, with the lowest-numbered records being most preferred [2]. In the example above, senders try mail1 first and fall back to mail2 only if mail1 cannot be reached. The numbers have no meaning beyond their order, so 10 and 20 work the same as 1 and 2.
What MX record do I add for Google Workspace or Microsoft 365?
Use exactly what your provider shows you. Google's help page gives the Google Workspace MX record value as smtp.google.com, and its example uses priority 1 [3]. Google also notes that accounts started before 2023 may have older values that start with "aspmx", and that these keep working [3]. Microsoft says that when you update your domain's MX record, all new email for anyone who uses your domain is sent to Microsoft 365 [6].
- Add the users first Create the mailboxes at the new provider before you change the record, so mail keeps arriving [6].
- Open your DNS host Find the DNS settings for your domain at your registrar or DNS host and choose type MX.
- Enter the provider's values Copy the host name and priority from the provider. Some hosts want a full stop at the end of the name [3].
- Wait and test Google says new MX records can take up to 72 hours to be recognised [3]. Send test emails from an outside address before you remove the old setup.
Why must an MX record point to a host name and not to an alias?
RFC 2181 says the name used in an MX record must not be an alias [4]. That means do not point an MX record at a name that is itself a CNAME record. Use the host name your provider gives you, exactly as written. The original standard says what the MX target is: a host willing to act as a mail exchange for the owner name [1].
Moving to Google Workspace
Say you move from your hosting company's mailboxes to Google Workspace. You delete the old MX records, add one new record with host smtp.google.com and priority 1, and wait for DNS to catch up. Until it does, some mail may still go to the old host, so keep the old mailboxes open for a few days.
Questions people ask
What does an MX record do?
It tells other mail servers which host to deliver your domain's email to. A sender looks up your MX records, picks the most preferred one and sends the message there [1][2].
Can I have more than one MX record?
Yes. Each has a preference number, and senders try the lowest-numbered one first and move on to the next if it cannot be reached [2]. Providers that give several records tell you which numbers to use.
Does an MX record stop email spoofing?
No. An MX record only controls where incoming mail goes. Checks against fake senders use other records, see SPF record, DKIM and DMARC.
Pages that link here
A record, CNAME record, DKIM, DMARC, DNS, DNS propagation, Domain name, Domain registrar, Email deliverability, Google Workspace, SMTP, SPF record
See also
- DNS DNS is the internet's address book: it turns a domain name like example.com into the number a computer needs to find your website or mail server.
- CNAME record A CNAME record is a DNS entry that makes one domain name an alias of another, so www.yoursite.com can follow wherever another name points.
- SPF record An SPF record is a line of text in your domain's DNS that lists which mail servers are allowed to send email using your domain name.
- DKIM DKIM is an email check where your mail server signs each message and publishes a public key in DNS, so the receiver can confirm the signature.
- DMARC DMARC is a DNS record that tells mail servers what to do with email that fails your SPF and DKIM checks, and asks them to send you reports.
- Email deliverability Email deliverability is whether the email you send actually reaches the recipient's inbox instead of being blocked or sent to spam.
References
- RFC 1035: Domain Names, Implementation and Specification, IETF. Read 27/11/2026.
EXCHANGE A <domain-name> which specifies a host willing to act as a mail exchange for the owner name.
- RFC 5321: Simple Mail Transfer Protocol, IETF. Read 27/11/2026.
The records are first ordered by preference, with the lowest-numbered records being most preferred.
- Set up MX records for Google Workspace, Google Workspace Admin Help. Read 27/11/2026.
It can take up to 72 hours for the new MX records to be recognized.
- RFC 2181: Clarifications to the DNS Specification, IETF. Read 27/11/2026.
The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias.
- DNS record types, Cloudflare Docs. Read 27/11/2026.
A mail exchange (MX) record is required to deliver email to a mail server.
- Connect your domain by adding DNS records, Microsoft Learn. Read 27/11/2026.
When you update your domain's MX record, all new email for anyone who uses your domain is sent to Microsoft 365.