+254725682556 +254725052660 info@ziprof.co.ke
Client Area

DNS - Nameserver

What Is an MX Record and How Does It Control Your Email Delivery?

An MX record, short for Mail Exchange record, is a DNS setting that tells other mail servers where to deliver email for your domain. When someone sends a message to you@yourdomain.com, their mail server looks up your domain's MX record first to find out which server should actually receive that mail.

Without a correct MX record, email addressed to your domain has nowhere to go. It either bounces back to the sender or disappears, depending on how their mail server is configured.

What an MX record actually points to

An MX record doesn't point to your website. It points to a mail server, identified by a hostname (for example mail.yourdomain.com), not an IP address directly. That hostname then needs its own A record pointing to the actual mail server's IP address. This is why changing your MX record alone, without touching your website's A record, doesn't affect how your site loads.

Understanding MX priority

A domain can have more than one MX record, each with a priority number (sometimes called a 'preference' value). The rule is simple: the lower the number, the higher the priority.

  • Mail servers always try the MX record with the lowest number first.
  • If that server doesn't respond, they fall back to the next-lowest number.
  • This is how backup mail servers work: a second MX record with a higher number acts as a fallback if your primary one is briefly unreachable.

If you only have one mailbox provider, you'll typically only need the MX record(s) that provider gives you, each with the priority value they specify.

When you'd need to check or change your MX record

You'll usually touch your MX record when you:

  • Set up email hosting for the first time on a new domain.
  • Move your email to a different provider while keeping your website on the same host.
  • Troubleshoot email that isn't arriving, to confirm it's pointing where you expect.
Changing your MX record interrupts email delivery while the change propagates, typically a few minutes up to a few hours. Make changes like this outside busy hours, and avoid editing MX records unless you actually intend to change where your mail is delivered.

How to view or add an MX record

In cPanel

  1. Log in to cPanel.
  2. Under the Email section, click MX Entry (or open Zone Editor under the Domains section).
  3. Select the domain you want to check from the dropdown.
  4. You'll see the current MX record(s) listed with their priority values. To add one, enter the mail server hostname and priority, then click Add New Record or Add an MX Record.

In DirectAdmin

  1. Log in to DirectAdmin.
  2. Go to DNS Management under the Account Manager section.
  3. Select the domain, then look for the existing MX entries in the zone file list.
  4. To add one, enter the mail server hostname and priority value, then click Save.

If you're setting up email with Google Workspace or Microsoft 365 specifically, see How to Set Up MX Records for Google Workspace or Microsoft 365 for the exact values to enter.