StarDomain

Setting Up MX Records for Email

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:

  1. Access to your domain's DNS management panel (your domain registrar or DNS hosting provider)
  2. Your {{COMPANY_NAME}} email hosting account activated
  3. 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:

FieldValue
TypeMX
Host/Name@ (or leave blank — represents your root domain)
Value/Points toYour primary mail server (e.g., mail.yourdomain.com)
Priority10
TTL3600 (1 hour)

Step 4: Add a Secondary MX Record (If Provided)

If {{COMPANY_NAME}} provided a backup mail server, add a second MX record:

FieldValue
TypeMX
Host/Name@
Value/Points toYour secondary mail server
Priority20
TTL3600

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:

FieldValue
TypeA
Host/Namemail
ValueYour server IP address
TTL3600

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

  1. Visit MXToolbox or a similar DNS lookup tool
  2. Enter your domain name
  3. Confirm the MX records match what you configured

Using Command Line

On Linux/macOS, run:

bash
dig MX yourdomain.com +short

On Windows, run:

cmd
nslookup -type=MX yourdomain.com

You 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

ProblemSolution
Email bounces with "no MX record"Verify MX records are published and propagated
Email goes to wrong serverCheck priority values; remove old MX records
Delivery delayedLower TTL values and wait for propagation
"Host not found" errorsEnsure the A record for your mail hostname exists

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.