What are MX Records and how to use them: 2026 Guide

What are MX Records? Let's review their functions, benefits like load balancing and enhanced security, and provide a detailed guide for setting up MX records, including login, DNS navigation, and configuring hostnames, TTL, and mail servers.
When someone sends an email to your domain, their mail server needs to know where to deliver it. That is the job of an MX record.
MX records are a small but essential part of the Domain Name System (DNS). A correct configuration sends incoming mail to the right service; a mistake can delay messages or stop delivery altogether. This guide explains how MX records work, how priority values are used, and how to update your records safely in 2026.
What is an MX record?
An MX (Mail Exchange) record is a DNS record that identifies the mail server responsible for accepting email for a domain. When a sending server has a message for name@example.com, it looks up the MX records for example.com and connects to the server listed there using the Simple Mail Transfer Protocol (SMTP).
MX records control the destination for incoming mail. They do not choose the outgoing server used by your email app, and they do not authenticate your messages. Outgoing mail reputation and authentication depend on other settings, including SPF, DKIM and DMARC.
How do MX records work?
- A sender addresses a message to someone at your domain.
- The sender's mail server asks DNS for that domain's MX records.
- DNS returns one or more mail-server hostnames and their priority values.
- The sending server normally tries the available server with the lowest priority number first. If delivery fails temporarily, it can try another listed server or queue the message and retry later.
Under the SMTP standard, an MX target must be a hostname rather than an IP address. That hostname must resolve to an A or AAAA record and must not be an alias defined only by a CNAME record.
What does an MX record look like?
The following records are illustrative only. Do not copy them into a live DNS zone; use the exact values supplied by your email provider.
Name | Type | TTL | Priority | Target |
|---|---|---|---|---|
| MX | 3600 | 10 |
|
| MX | 3600 | 20 |
|
- Name or host: The domain or subdomain that receives mail. Many DNS control panels use
@for the root domain, while others expect the full domain or a blank field. - Type: MX.
- TTL: Time to live, in seconds. This tells DNS resolvers how long they may cache the answer.
- Priority or preference: A number that determines which target is tried first. Lower numbers have higher preference.
- Target or value: The fully qualified hostname of the receiving mail server. Some interfaces add the final dot automatically.
How MX priority works
If your provider gives you several MX records, enter every one with the assigned priority. A server with priority 10 is normally tried before one with priority 20. If two records have the same priority, they are equally preferred; sending systems can choose between them. Equal values are therefore valid and may be part of a provider's design.
Multiple MX records do not automatically create useful redundancy. Every listed destination must be configured to accept mail for your domain and must handle queued messages correctly. Do not invent a secondary server or change the priorities supplied by your email provider.
How to set up or change MX records safely
1. Get the exact settings from your email provider
Find the current MX hostnames and priority values in your provider's setup guide or admin console. Do not guess a target such as mail.yourdomain.com or reuse values from another organisation. If you use EuroDNS Email, follow the values shown for your service.
2. Identify your authoritative DNS provider
DNS may be managed by your registrar, web host, email provider or a dedicated DNS service. It is the active nameservers—not necessarily the company where you bought the domain—that determine where records must be edited. Check your domain's nameserver settings if you are unsure.
3. Record the current configuration
Export the DNS zone if your provider supports it, or save a copy of the existing MX records and their TTLs. This gives you a rollback reference and helps your support team diagnose any problem.
4. Plan the change
For an active domain, coordinate the DNS change with the new email service. If appropriate, lower the MX TTL 24 to 48 hours before the migration so older cached answers expire sooner. Lowering it immediately before the change will not affect records that are already cached.
Important: Do not delete working MX records early just to “clear the way”. That can interrupt incoming email. Add, replace or remove records only at the point specified in your migration plan.
5. Add the provider's MX records
In your DNS control panel, choose Add record and select MX. Enter the name, target, priority and TTL exactly as provided. Repeat the process for every required MX record. Be careful with automatically appended domain names and trailing dots, as DNS interfaces handle them differently.
6. Remove obsolete records at the planned time
Old and new MX records should not remain mixed unless your migration instructions explicitly require it. A sender may deliver to any server with the most preferred available value, so an obsolete record can route mail to the wrong system. Remove old records only when the new provider is ready to receive mail.
7. Verify and test
After saving the change, confirm what public DNS returns. On macOS or Linux, you can use:
dig MX example.comOn Windows, you can use:
nslookup -type=MX example.comCheck that every target and priority matches the provider's instructions. Then use the provider's domain-verification tool, if available, and test incoming and outgoing mail with several external services. Remember that cached DNS answers may remain visible until their previous TTL expires.
8. Monitor and document the result
Watch for rejected or delayed messages, review the provider's service status and keep a record of the final configuration. Once the migration is stable, return the TTL to the normal value recommended by your DNS or email provider.
MX records versus SPF, DKIM and DMARC
These DNS-based email settings have different jobs and are designed to work together.
Record | Main purpose |
|---|---|
MX | Directs incoming email to the servers that accept mail for the domain. |
SPF | Lists the systems authorised to send mail for a domain. |
DKIM | Adds a cryptographic signature that recipients can verify. |
DMARC | Defines how receivers should handle messages that fail authentication and can provide reports. |
A correct MX record helps other servers find your inbound mail service, but it does not by itself prevent spoofing, filter spam or improve the reputation of mail you send. Configure SPF, DKIM and DMARC according to your email provider's current guidance as part of a complete email setup.
Common MX record mistakes
- Editing DNS in the wrong account: Changes made outside the authoritative DNS service have no effect.
- Deleting the old records too soon: This can interrupt mail during a provider migration.
- Using a guessed or outdated target: MX values are provider-specific and can change.
- Entering an IP address: An MX target must be a hostname.
- Pointing to a CNAME alias: The MX target should resolve directly through A or AAAA records.
- Reversing priority values: Lower numbers are preferred, not higher numbers.
- Changing values supplied by the provider: Equal priorities and unusual-looking numbers can be intentional.
- Expecting instant propagation: Resolvers may continue using cached data until the earlier TTL expires.
- Assuming MX controls outgoing mail: Your sending service, authentication and reputation are configured separately.
MX record FAQ
What MX records should I have?
Use only the MX records supplied by the email service that accepts mail for your domain. Some providers use one record; others use several. Neither arrangement is automatically better—the provider's architecture determines the correct setup.
Can an MX record point to an IP address?
No. Its target must be a hostname, and that hostname must resolve to an IPv4 or IPv6 address through A or AAAA records.
Can two MX records have the same priority?
Yes. Records with the same priority are equally preferred. Use equal priorities only when your provider instructs you to do so.
What happens if a domain has no MX record?
SMTP systems may fall back to the domain's A or AAAA address when no MX record exists, but relying on that behaviour is poor practice. A domain that accepts email should publish explicit MX records. A domain that intentionally accepts no email can publish a Null MX, with priority 0 and a target of a single dot, to state that clearly.
How long do MX record changes take?
The authoritative update may appear quickly, but DNS resolvers can keep the old answer for the record's previous TTL. There is no single universal “propagation time”; allow for caching and follow your providers' migration guidance.
How do I know whether an MX record is valid?
Look up the public records, compare the targets and priorities with your provider's current instructions, confirm that the target hostnames resolve, and complete real delivery tests. A syntactically valid record can still be operationally wrong if the destination is not configured for your domain.
Final thoughts
MX records are straightforward once each field has a clear purpose: the name identifies the domain, the target identifies the receiving server, the priority controls preference and the TTL controls caching. The safest approach is to copy the provider's values exactly, plan active-domain changes carefully and verify the result from public DNS.
EuroDNS provides DNS management services alongside domain and email solutions. If you are moving an active mailbox service or managing a complex configuration, contact support before changing live records.
Author bio
Julian Lankstead is the founder of JulianLankstead.com. He helps businesses increase revenue by improving the efficiency of their processes.
Price change for 21 domain extensions as of 1st March 2024
Related articles:
