Setting Up MX Records for Email
MX (Mail Exchange) records are DNS entries that tell the internet where to deliver email for your domain. Without correctly configured MX records, email sent to your domain will bounce back to the sender. This guide walks you through setting up MX records for your {{COMPANY_NAME}} email hosting.
What Are MX Records?
MX records map your domain name to the mail servers responsible for accepting email on its behalf. Each MX record has two components:
- Mail server hostname — the address of the server that handles your email (e.g.,
mail.yourdomain.com) - Priority value — a number that determines the order in which mail servers are tried (lower numbers = higher priority)
When someone sends an email to [email protected], their mail server looks up the MX records for yourdomain.com and delivers the message to the server with the lowest priority number first.
Before You Begin
Make sure you have:
- Access to your domain's DNS management panel (your domain registrar or DNS hosting provider)
- Your {{COMPANY_NAME}} email hosting account activated
- The mail server hostnames provided in your welcome email or control panel
Tip: If you registered your domain with {{COMPANY_NAME}}, you can manage DNS records directly from your {{COMPANY_NAME}} dashboard under Domains → Manage DNS.
Step-by-Step: Adding MX Records
Step 1: Log In to Your DNS Management Panel
Navigate to your domain registrar's website or DNS hosting provider and log in. Locate the DNS management section for your domain.
Step 2: Remove Existing MX Records
Before adding new MX records, remove any existing MX records to avoid conflicts. Look for records of type MX in your DNS zone and delete them.
Warning: Removing MX records will temporarily stop email delivery. Complete the next steps promptly.
Step 3: Add the Primary MX Record
Create a new DNS record with these settings:
| Field | Value |
|---|---|
| Type | MX |
| Host/Name | @ (or leave blank — represents your root domain) |
| Value/Points to | Your primary mail server (e.g., mail.yourdomain.com) |
| Priority | 10 |
| TTL | 3600 (1 hour) |
Step 4: Add a Secondary MX Record (If Provided)
If {{COMPANY_NAME}} provided a backup mail server, add a second MX record:
| Field | Value |
|---|---|
| Type | MX |
| Host/Name | @ |
| Value/Points to | Your secondary mail server |
| Priority | 20 |
| TTL | 3600 |
Step 5: Verify the A Record for Your Mail Server
If your MX record points to mail.yourdomain.com, ensure an A record exists that maps mail to your hosting server's IP address:
| Field | Value |
|---|---|
| Type | A |
| Host/Name | mail |
| Value | Your server IP address |
| TTL | 3600 |
Verifying Your MX Records
After saving, DNS changes can take up to 24–48 hours to propagate globally, though most changes take effect within 1–2 hours.
Using Online Tools
- Visit MXToolbox or a similar DNS lookup tool
- Enter your domain name
- Confirm the MX records match what you configured
Using Command Line
On Linux/macOS, run:
dig MX yourdomain.com +shortOn Windows, run:
nslookup -type=MX yourdomain.comYou should see your mail server hostnames and priorities listed.
Common Mistakes to Avoid
- Missing trailing dot — Some DNS providers require a trailing dot after the hostname (e.g.,
mail.yourdomain.com.). Check your provider's documentation. - Conflicting CNAME records — A CNAME record on the root domain (
@) conflicts with MX records. Remove any root CNAME before adding MX entries. - Wrong priority order — Lower numbers mean higher priority. Your primary server should have the lowest number (e.g., 10).
- Pointing MX to an IP address — MX records must point to a hostname, not an IP address directly.
Troubleshooting
| Problem | Solution |
|---|---|
| Email bounces with "no MX record" | Verify MX records are published and propagated |
| Email goes to wrong server | Check priority values; remove old MX records |
| Delivery delayed | Lower TTL values and wait for propagation |
| "Host not found" errors | Ensure the A record for your mail hostname exists |
Related Articles
- Understanding SPF, DKIM, and DMARC Records
- Troubleshooting Email Not Receiving
- Troubleshooting Email Not Sending
Need help? Contact our support team at {{SUPPORT_URL}} or email {{SUPPORT_EMAIL}}. We are happy to configure your MX records for you at no extra charge.