Blog

MX Records: How to Configure Email Delivery for Your Domain

← Back to blog
2026-04-17·5 min readMX RecordsEmail

What are MX records?

MX (Mail Exchange) records tell the internet which servers handle email for your domain. When someone sends an email to user@yourdomain.com, their mail server looks up your MX records to find where to deliver the message.

Without MX records, email sent to your domain bounces.

How MX records work

An MX record has two parts:

  • Priority (preference value) - a number that determines the order servers are tried. Lower numbers are tried first.
  • Mail server (exchange) - the hostname of the server that accepts email.
  • yourdomain.com.  MX  10  mx1.mailprovider.com.
    yourdomain.com.  MX  20  mx2.mailprovider.com.

    In this example, mail is delivered to mx1 first. If mx1 is unavailable, the sender tries mx2.

    Setting up MX records

    Step 1: Get your mail server addresses

    Your email provider gives you the MX records to use. Common examples:

    ProviderMX Records
    Google Workspaceaspmx.l.google.com (priority 1)
    Microsoft 365yourdomain-com.mail.protection.outlook.com (priority 0)
    Zoho Mailmx.zoho.com (priority 10)

    Step 2: Add records at your DNS provider

    Log into your DNS dashboard and add each MX record with its priority value. Remove any old MX records that point to previous providers.

    Step 3: Verify delivery

    Send a test email from an external account and confirm it arrives. Use an MX lookup tool to verify the records are published correctly.

    Common mistakes

  • Missing MX records - email bounces with "no mail exchanger" errors
  • Wrong priority values - backup servers get all the traffic
  • CNAME at apex - a CNAME record at your bare domain conflicts with MX records
  • Stale records - old MX records pointing to a previous provider cause delivery failures or email being sent to the wrong server
  • No backup server - if your primary goes down, email bounces instead of queuing
  • MX records and security

    MX records interact with email authentication in important ways:

  • SPF must include your MX servers as authorized senders
  • Null MX (priority 0, dot as exchange) explicitly declares that a domain does not accept email, preventing spoofing of domains that should never send mail
  • Attackers check MX records during reconnaissance to identify your email infrastructure
  • If your domain does not send or receive email, publish a null MX record:

    yourdomain.com.  MX  0  .

    This tells other mail servers to reject email destined for your domain immediately.

    Key takeaways

  • MX records are required for email delivery
  • Use at least two MX records with different priorities for redundancy
  • Remove old MX records when switching email providers
  • Publish a null MX record for domains that do not use email
  • Check your MX records now

    Ready to check your domain?

    A graded scan across six surfaces in about 2 minutes. Free, no signup required.

    Free MX Lookup