How to Set Up Mail Exchanger Entries in cPanel Zone Editor
Setting up a Mail Exchanger (MX) record directs incoming emails for your domain to the correct mail server. When configuring your email infrastructure, a proper cpanel mx entry setup ensures that messages sent to you land reliably in your inbox rather than bouncing back to the sender. This guide walks you through navigating the cPanel interface, understanding email routing options, and verifying your configuration.
Before you begin making changes to your live DNS settings, it is always a best practice to verify your current mail server configuration using the MX Lookup tool on XiaTools to see which servers currently handle your incoming email traffic.
Understanding cPanel MX Entries and Email Routing
An MX record points your domain name to the mail servers responsible for handling email on behalf of your domain. Each MX record consists of a priority number and a target server hostname. Lower numbers indicate higher priority, meaning sending mail servers will attempt to deliver messages to the lowest priority number first.
When managing your DNS inside cPanel, you must also define how the system handles mail routing. cPanel offers four distinct routing settings:
- Automatic: The system automatically detects the best routing configuration based on your local mail server status.
- Local Mail Exchanger: The server is the primary mail exchanger and will accept mail locally for this domain.
- Backup Mail Exchanger: The server acts as a backup. If the primary mail server is offline, this server accepts and holds mail until the primary recovers.
- Remote Mail Exchanger: The domain does not use the local server for email. Mail is routed entirely to a third-party provider like Google Workspace or Microsoft 365.
Step-by-Step cPanel MX Entry Setup
Follow these steps to update or add your MX records inside cPanel. Note that depending on your hosting provider, menu labels and exact visual layouts may differ slightly, but the core functionality remains identical.
Step 1: Access the Zone Editor or MX Entry Tool
- Log into your hosting account and open your cPanel dashboard.
- Scroll down to the Domains or Email section.
- Click on either Zone Editor (for advanced global DNS management) or MX Entry (for a simplified, email-specific interface).
Step 2: Select Your Domain
If you host multiple add-on domains or subdomains, locate the specific domain you want to configure from the list and click Manage or Edit next to it.
Step 3: Choose Your Email Routing Destination
Before editing the records themselves, set your routing destination correctly to prevent delivery loops:
- Locate the Email Routing section on the page.
- Select Remote Mail Exchanger if you are using an external service like Microsoft 365 or Google Workspace.
- Select Local Mail Exchanger if your web hosting server also hosts your email accounts.
- Click Change to save this routing setting.
Step 4: Add or Modify the MX Record
If you are using the simplified MX Entry tool, scroll down to the Add a New Record or MX Records table.
- Priority: Enter the priority value specified by your mail provider (commonly
0,5,10, or20). - Destination: Enter the hostname provided by your email host (for example,
mail.example.comorsmtp.google.com). Do not use an IP address like192.0.2.10for an MX record; it must always be a fully qualified domain name.
If you are using the Zone Editor, click + Add Record, select MX as the record type, input your domain name in the name field, set the TTL (Time to Live) to 14400, set the priority, and provide the destination target.
| Routing Type | When to Use | Example Destination | Priority Value |
|---|---|---|---|
| Local | Email hosted on cPanel server | mail.example.com |
0 |
| Remote | Email hosted on Google / Microsoft | aspmx.l.google.com |
1 |
| Backup | Secondary mail handling server | backup.example.com |
20 |
Verifying Your DNS Configuration
Once you have saved your new MX records, you need to verify that global DNS servers can see the changes. DNS propagation can take anywhere from a few minutes up to 24 hours depending on your previous TTL settings.
You can query your domain directly from your local terminal or command prompt using standard networking tools.
Using dig on Linux and macOS
Run the following command in your terminal to check the MX records for example.com:
dig example.com MX +short
Sample output:
10 mail.example.com.
20 backup.example.com.
Using PowerShell on Windows
Open PowerShell and query the mail exchange records using Resolve-DnsName:
Resolve-DnsName -Name example.com -Type MX
Sample output:
Name Type TTL Section NameExchange Preference
---- ---- --- ------- ------------ ----------
example.com MX 14400 Answer mail.example.com 10
Common Mistakes and How to Fix Them
Even experienced administrators occasionally run into issues during a cpanel mx entry setup. Review these common pitfalls to keep your mail flowing smoothly:
- Using an IP Address Instead of a Hostname: MX records require a valid domain name target. Pointing an MX record directly to an IP address like
192.0.2.55violates DNS RFC standards and causes mail servers to reject your configuration. - Forgetting to Update Email Routing: If you switch your email to a remote provider like Google Workspace but forget to change the cPanel email routing from Local to Remote, your cPanel server will attempt to look up local mailboxes instead of forwarding messages outward, resulting in "User Unknown" bouncebacks.
- Ignoring SPF and DKIM Records: Changing your MX records means you should also update your SPF (
TXT), DKIM, and DMARC records to authorize your new email provider to send mail on behalf of your domain. Failing to do this causes your outbound messages to land in recipient spam folders.
Pre-Launch Checklist
Review this quick checklist before finalizing your email server migration:
- Obtained correct MX priorities and target hostnames from your email provider.
- Updated the email routing setting inside cPanel (Local vs Remote).
- Added the necessary MX records with correct priorities.
- Verified record propagation using command-line tools or online lookup utilities.
- Configured matching SPF and DKIM records for authentication.
By carefully following these steps, your cpanel mx entry setup will be accurate, secure, and ready to handle incoming messages without disruption.