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.


Setting Up MX Records for Microsoft/Office 365 Email

To use Microsoft 365 (formerly Office 365) to handle your domain's email, you need to set up MX records to direct email to Microsoft's mail servers. Follow these 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 following MX records provided by Microsoft:

      PriorityMail Server
      0<domain>.mail.protection.outlook.com
    • Priority: Indicates the order in which the mail servers should be used. Lower values are higher priority. For Microsoft 365, priority is usually set to 0.

    • Mail Server: The hostname of the Microsoft mail server. Replace <domain> with your actual domain name.

  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 to use Microsoft 365:

  1. Log in to your domain host account.

  2. Navigate to DNS Management.

  3. Delete existing MX records.

  4. Add the following MX record:

    • Priority: 0
    • Mail Server: yourdomain.mail.protection.outlook.com 
      (Example: If your domain is mailoptimal.com, the value would be mailoptimal-com.mail.protection.outlook.com)
  5. Save the changes.

  6. Verify the new MX records.

Setting up MX records for Microsoft 365 ensures that your domain’s emails are routed to Microsoft’s mail servers, allowing you to use Microsoft 365 for your domain’s email. This setup enhances email reliability and leverages Microsoft’s powerful email infrastructure.