MX records
MX records identify the mail servers that receive email for a domain. Use them to direct incoming mail to the servers provided by your email service.
What an MX record is
An MX (Mail Exchange) record associates a DNS name with one or more mail server hostnames. Each mail server has a priority that determines the order in which sending servers attempt delivery.
For example, an MX record for example.com could direct email addressed to user@example.com to mail1.example.com.
You can configure MX records for the zone apex, such as example.com, or a subdomain, such as team.example.com. The record name identifies the domain used after the @ in an email address.
Creating an MX record does not create mailboxes. Your email provider must also be configured to accept mail for that domain.
For secondary zones, make record changes at the primary DNS provider. See Secondary DNS zones.
Explore MX records on the Records page
To view MX records, go to DNS > Zones, select Primary zones, open the zone, and select the Records tab.
In Grouped view, expand MX (Mail Exchange).
The table displays the following information:
Column | Description |
|---|---|
Record name | The complete DNS name, including the zone name |
Mail server | The hostname of each destination mail server, or |
Priority | The preference assigned to each mail server; lower values take precedence |
TTL | How long the record can be cached, in seconds |
When a name has multiple mail servers, DigiCert® DNS displays their hostnames and corresponding priorities together in one row.
Use Search to locate a record or switch to Table view to review records in a table. The reorder control lets you adjust which record type groups are displayed and their order.
Each row provides an actions menu for editing or deleting the record. Select row checkboxes to perform bulk deletion.
Create an MX record
To create an MX record, open the zone’s Records tab:
Select Add record, either at the top of the page or beside MX (Mail Exchange).
Set Record type to MX (Mail Exchange).
Enter the Name, or use
@for the zone apex.Enter the TTL in seconds.
Leave Set as null MX cleared to configure mail delivery.
Under Mail servers, enter the destination hostname in Mail server.
Enter its Priority, from 0 to 65535.
To include more mail servers, select Add another and enter each hostname and priority. Use the remove icon beside an entry to remove it.
Select Save and close, or Save and add another to continue creating records.
If a duplicate is found when you save, a banner directs you to edit the existing record. Update that entry instead of creating another.
The form contains these fields:
Field | Description |
|---|---|
Record type | The DNS record type; select MX (Mail Exchange) |
Name | The name within the zone, or |
TTL | The cache duration, in seconds |
Set as null MX | Indicates that the specified name does not accept email |
Mail server | The hostname of a server that receives email for the record name |
Priority | The mail server’s preference, from 0 to 65535; lower values take precedence |
The zone name appears beneath Name. For a zone named example.com, these entries identify the following email domains:
Name | Resulting record name | Example recipient |
|---|---|---|
|
|
|
|
|
|
You can also add records through Import records. See Import DNS records for supported formats and validation behavior.
Update an MX record
Locate the record on the Records tab.
Open its actions menu and select Edit.
The Record type and Name fields are read-only in the edit form.
Update the TTL, Mail server, or Priority values, or change Set as null MX as appropriate.
Select Update.
To remove one mail server while retaining the others, edit the record and remove the relevant entry.
Delete an MX record
To delete an entire MX record entry, open its actions menu, select Delete, and confirm the deletion.
To delete multiple entries from the Records page:
Select the checkboxes beside the records.
Select Delete in the selection toolbar.
Review the names listed in the confirmation dialog.
Select Delete.
Deletion cannot be undone. Deleting an entry removes its configured mail server destinations, although previously cached answers may remain available until their TTL expires.
Choosing mail server hostnames
Enter the mail server hostname supplied by your email provider, such as mail1.example.com. The destination must be a hostname, rather than an IP address, email address, or URL.
A mail server hostname must resolve directly to an address through A or AAAA records. It must not be a CNAME alias. See A records, AAAA records, and CNAME records.
The mail server can belong to your zone or an external email provider. For an external provider, use the hostname they specify.
Keep the Name and Mail server fields distinct. For email addressed to user@example.com, enter @ as the record name in the example.com zone. Enter the receiving server’s hostname separately under Mail server.
Multiple mail servers and priorities
You can associate multiple mail servers with the same MX record name. Each server has its own priority.
Lower numbers indicate a higher preference. For example:
Mail server | Priority | Delivery preference |
|---|---|---|
| 10 | Preferred server |
| 20 | Alternative if delivery to the preferred server cannot be completed |
Sending mail servers use these priorities when choosing a destination. Servers with equal priorities have equal preference; their order can vary, so equal priorities do not guarantee an exact distribution of messages.
Configure every listed server to accept mail for the domain. Adding a backup hostname to DNS does not configure that server’s mailboxes, routing, or storage.
MX priorities guide the sending mail server’s delivery attempts. They do not enable DigiCert® DNS health monitoring or the Simple failover policy. See Simple failover for information.
To change the servers associated with an existing name, edit its MX record and update the Mail servers entries.
Null MX records
A null MX record explicitly indicates that a name does not accept email. Use it for a domain or subdomain that should not receive messages.
A null MX record has a mail server value of . and a priority of 0. It must be the only MX destination for that name.
To create a null MX record:
Select Add record and set Record type to MX (Mail Exchange).
Enter the Name, or use
@for the zone apex.Enter the TTL in seconds.
Select Set as null MX.
Select Save and close.
Selecting Set as null MX disables the Mail server and Priority inputs. On the Records page, the saved record displays . as the mail server and 0 as its priority.
Deleting all MX records does not have the same effect. Without an MX record, sending servers can attempt delivery using the domain’s A or AAAA records. A null MX explicitly declares that no receiving mail service exists. Avoid using it for domains used in sender addresses, because this can cause outgoing messages to be rejected.
TTL and record changes
The TTL, or time to live, specifies how long a DNS record can be cached before it expires. Enter this value in seconds.
For example, a TTL of 300 represents five minutes.
After you change a mail server hostname or priority, sending servers may continue using previously cached MX information until its TTL expires. Changing the TTL does not shorten the lifetime of copies already cached using the previous value.
When moving to a different email provider, consider lowering the TTL in advance and allowing the previous TTL to expire before updating the MX destinations. Configure the new service to accept mail before making the change.
Mail server A and AAAA records have their own TTLs. Changing an MX record’s TTL does not change how long those address records are cached.