What is an MX Record? Email Server Configuration

MX record, also known as Mail eXchanger, is a type of DNS (Domain Name System) record that specifies which mail server is responsible for receiving email messages on behalf of a domain. This record simplifies email delivery by guiding incoming emails to the right destination.

Imagine your domain as a post office. When someone sends an email to your domain (name@yourdomain.com), MX records tell the Internet where that post office is located. 

Each MX record has the following parameter:

  • Priority: A numerical value that indicates the order in which mail servers should be used for email delivery. Lower values signify higher priority.

The MX record has the following look in your ClouDNS Control Panel:

Host: Type: Points to: TTL
hostname.com MX 0 theaddress.of.the.mailserver 1 Hour

Why do you need an MX record?

The answer to that question is quite obvious. If there aren't any MX records for your domain, or if your MX records are pointed to the wrong location, you won't be able to receive emails. From this point of view, in order to have a faultless receiving mail service, the proper MX configuration is a must.

MX records are crucial for the following reasons:

  • Reliable Email Delivery: These DNS records ensure that email messages reach their intended recipients by directing them to the correct mail server. Without them, emails would not know where to go, resulting in a breakdown of the email delivery process.
  • Security: MX records play a role in email security by helping to identify legitimate email servers for a domain. This information is essential for preventing spam and phishing attempts.

How to create a DNS MX record?

Go to your DNS zone management page and click on Add new record. Type, as follows:
Type: MX
TTL: 1 Hour
Host:
Priority: from 0 to 65535 (The priority of the target host, lower value means more preferred.).
Points to: theaddress.of.the.mailserver

How to add an MX Record - Step by Step video:

How to start managing MX records for your domain name?

  1. Open a Free account from here - it is free forever
  2. Verify your e-mail address
  3. Log into your control panel
  4. Create a new DNS zone from the CREATE ZONE button - read more here
  5. Add the MX records you need as it is described in this article

MX records check

Here are several different ways to check MX records:

If you are a Linux or macOS user, you can check your MX records via DIG as follows:

$ dig cloudns.net MX

If you are a Windows user, you could check your MX records via nslookup. Here is an example:

$ nslookup -type=MX cloudns.net

Alternatively, you could use our Free DNS tool and check your DNS records just with several clicks.

Support of MX records

ClouDNS provides full support for MX records for all our DNS services, including the listed below. Just write to our technical support, if you need any assistance with your MX records configuration. Our Technical Support team is online for you 24/7 via live chat and tickets.

Best Practices for MX Records

Following the best practices below when managing MX records can help ensure the optimal performance and reliability of your email system.

  • Priority Values: Use appropriate priority values. Common practice is to use increments of 10 (e.g., 10, 20, 30) to leave room for future adjustments.
  • TTL Settings: Set appropriate Time-To-Live (TTL) values for your MX records. While shorter TTLs allow quicker propagation of changes, longer TTLs reduce the DNS query load. A balance is typically recommended.
  • SPF, DKIM, and DMARC: Implement SPF, DKIM, and DMARC records to enhance email security and reduce the risk of email spoofing.
  • Monitoring and Maintenance: Regularly monitor the health and performance of your mail servers. Update your MX records if you change mail servers or significantly modify your email infrastructure.

FAQ

Question: Do I need an "A" record for my mail server alongside my domain's MX records?

Answer: If the mail server is part of the same domain namespace (which lies in the zone), then an "A" record is required.

Question: What is the purpose of using multiple MX records with various priorities?

Answer: This approach provides a backup MX record that can be used if the main MX (the one with the lowest priority) is not available. This is not a good practice leading to email delivery issues.

Question: Can I add multiple MX records with the same priority for load balancing?

Answer: Yes, you can. Setting the priority levels equal to each other will make your MX records act in Round-Robin mode. This is not a good practice leading to email delivery issues and emails can be lost through the servers trying to reach a few.

Question: Are MX records related to SPF and DKIM records?

Answer: While MX records are responsible for routing email, SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) records are used for email authentication and validation. All three records work together to improve email security and reliability.

Question: Are there any security concerns with MX records?

Answer: Yes, ensuring the security of your MX records is essential. Misconfigured MX records can lead to email spoofing and phishing attacks.

Question: How often should MX records be updated?

Answer: MX records should be updated whenever there are changes in your email infrastructure, such as adding or removing mail servers. Additionally, periodic reviews and updates can ensure optimal email delivery and security.

Question: How long does it take MX records to propagate?

Answer: Changes to MX records can take up to 48 hours to propagate globally, but usually, the changes are noticeable within a few hours. The propagation time depends on various factors, including TTL (Time to Live) settings.


Last modified: 2025-03-26
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more