What Is an MX Record?

An MX (Mail Exchange) record is a type of DNS record that specifies the mail server responsible for receiving email messages on behalf of a domain. It directs incoming emails to the correct server, ensuring that messages are delivered to the right place. MX records are essential for email communication, as they help route emails to their intended recipients.


How MX Records Work

When someone sends an email to your domain, their email server looks up your domain’s MX records to find out where to deliver the message. The MX records provide the hostname of your mail servers and their priority levels. If you have multiple mail servers, the priority values determine the order in which the servers should be used. The server with the lowest priority value is tried first, and if it's unavailable, the server with the next lowest priority is used.


Setting Up MX Records

To set up MX records for any email provider, follow these general steps:

  1. Sign in to Your Domain Host Account

    • Log in to the account where your domain is hosted. This is usually your domain registrar or DNS hosting provider.
  2. Navigate to DNS Management

    • Find the section where you can manage DNS settings. This might be labeled as DNS Management, DNS Settings, or similar.
  3. Locate Your MX Records

    • Find the MX records section. If you don't see it, look for an option to add a new record.
  4. Delete Existing MX Records

    • If there are any existing MX records for your domain, delete them to avoid conflicts.
  5. Add New MX Records

    • Enter the MX records provided by your email service provider. These records typically include:
      • Priority: Indicates the order in which the mail servers should be used. Lower values are higher priority.
      • Mail Server: The hostname of the email provider's mail server.
    • Here are the general steps, using placeholders for the specific values you will get from your email provider:

    PriorityMail Server
    [Priority1][MailServer1]
    [Priority2][MailServer2] (if applicable)
    ......
    • Replace [Priority1], [MailServer1], etc., with the actual values provided by your email provider.
  6. Save the Changes

    • Save the new MX records. It may take some time (up to 48 hours) for the changes to propagate across the internet.
  7. Verify the MX Records

    • Use an online DNS lookup tool or command-line tools like nslookup or digto verify the MX records are correctly set up. For example:
      • On Windows: Open Command Prompt and type nslookup -type=mx yourdomain.com
      • On Linux/Mac: Open Terminal and type dig mx yourdomain.com


Example

To set up MX records for yourdomain.com:

  1. Log in to your domain host account.

  2. Navigate to DNS Management.

  3. Delete existing MX records.

  4. Add the following MX records provided by your email provider:

    • Priority: [Priority1], Mail Server: [MailServer1]
    • Priority: [Priority2], Mail Server: [MailServer2] (if applicable)
    • ...
  5. Save the changes.

  6. Verify the new MX records.

By setting up the correct MX records for your domain, you ensure that your email is properly routed to your email provider's servers. This setup is crucial for ensuring reliable email delivery and functionality for your domain.