21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

MX Records: Mail Routing Explained

Quick answer

An MX record is the DNS entry that tells other mail servers where to deliver email for your domain. Each record names a mail-server hostname and a priority from 0 to 65535, and the lowest number is tried first. It must point to a hostname, never an IP address or a CNAME.

For site owners setting up or moving business email who need mail to arrive at the right server.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
3 min
Sections
6
Updated
14 Nov 2026
Written by
WebJi® team

What an MX record does

An MX (Mail Exchanger) record is the DNS entry that tells sending mail servers which host accepts email for your domain; each record names a mail-server hostname and a priority, and the lowest number is tried first. Changing email provider means changing these records; that switch is the cutover point of every email migration.

  • Hostname, not IP: the target is a name such as mail.yourbrand.in, which must have its own A or AAAA record.
  • Priority: a number from 0 to 65535; lower is preferred, equal numbers share the load.
  • Receiving only: MX controls where mail arrives. Sending is authorised separately by SPF, DKIM and DMARC.
  • No MX at all: under RFC 5321, senders fall back to the domain's own A/AAAA record, which usually points at a web server that does not accept mail.

All record types are compared in DNS records explained.

MX priority and backup mail servers

A sending server tries the MX record with the lowest priority number first, and moves to the next only if that server cannot be reached. Values are usually spaced in tens so a server can be added in between later.

yourbrand.in.   3600   IN   MX   10 mx1.mailhost.example.
yourbrand.in.   3600   IN   MX   20 mx2.mailhost.example.

Here senders use mx1 and fall back to mx2 if it does not answer. Two records with the same number share traffic. A backup MX run by a different provider must apply the same spam filtering and recipient checks as the primary, or spammers deliver through it; most hosted mail services already run redundant servers behind one record, so a separate backup is rarely needed.

MX records for cPanel, Google Workspace, Microsoft 365 and Zoho

Copy the exact MX values your email provider shows in its setup screen; the table below shows the usual patterns, but hostnames are provider-specific and one typo stops delivery.

Typical MX records by email provider
ProviderPriorityMail serverNotes
cPanel hosting mail0mail.yourbrand.in (or yourbrand.in)The hostname must resolve to your hosting server
Google Workspace1smtp.google.comCurrent single-record setup; older five-record aspmx.l.google.com sets also work, but do not mix the two
Microsoft 3650Value from the Microsoft 365 admin centreCommonly yourbrand-in.mail.protection.outlook.com; newer tenants may be given a value ending in mx.microsoft
Zoho Mail (India data centre)10 / 20 / 50mx.zoho.in, mx2.zoho.in, mx3.zoho.inAccounts on Zoho's global data centre use zoho.com hosts instead

Mailboxes on WebJi® business email hosting use the cPanel-style record; Google Workspace and Microsoft 365 through WebJi® use their own values. Provider choice is compared in Zoho vs Google Workspace.

How to check a domain's MX records

Run dig MX yourbrand.in +short on Linux or macOS, or nslookup -type=mx yourbrand.in on Windows; each line shows a priority and a mail-server hostname.

dig MX yourbrand.in +short
10 mx1.mailhost.example.
20 mx2.mailhost.example.

# Ask a public resolver, bypassing your local cache
dig @1.1.1.1 MX yourbrand.in +short

# Windows
nslookup -type=mx yourbrand.in

Then confirm each mail host resolves: dig A mx1.mailhost.example +short must return an IP address. Without a terminal, the WebJi® DNS lookup tool shows the same records, and the propagation checker shows whether a change has reached resolvers worldwide. Re-check after every change rather than trusting the panel.

MX mistakes that break email

Most MX failures come from pointing MX at a CNAME or an IP address, leaving the old provider's records in place, changing records with a long TTL, or skipping SPF and DKIM for the new provider.

Common MX errors and fixes
MistakeEffectFix
MX points at a CNAMEForbidden by RFC 2181; some senders reject itPoint MX at a hostname with an A/AAAA record
MX value is an IP addressInvalid; mail may not be deliveredCreate an A record for a host name and use that name
Old provider's records left inMail is split between old and new systemsRemove every old MX record at cutover
Long TTL at cutoverOld records keep circulating for hoursLower TTL to 300 seconds a day before switching
No SPF/DKIM for the new providerMail arrives but replies land in spamPublish the provider's SPF and DKIM records the same day

Authentication records are covered in SPF and DMARC setup and what DKIM is; check yours with the email authentication checker.

What a null MX record is, and when to use one

A null MX record, MX 0 ., defined in RFC 7505, tells senders that a domain accepts no email at all, so they reject messages immediately instead of retrying for days. Use it on domains that never receive mail, such as parked domains or a separate domain used only for a website.

parked-brand.in.   3600   IN   MX   0 .

A null MX must be the only MX record for that name. Pair it with an SPF record of v=spf1 -all so nobody can send mail claiming to be from the domain either. How DNS lookups work generally is in how to check DNS records.

FAQ

Frequently asked questions

How long does an MX change take to work?

Resolvers pick up a new MX record as soon as the old record's TTL expires, often within minutes to a few hours. With a 300-second TTL set a day in advance, most senders switch within minutes. Keep the old mailboxes open for a day to catch stragglers.

Can my website and email be with different companies?

Yes. The A record points visitors to your web host, while MX records point mail to your email provider. This is common, for example a site on shared hosting with email on Google Workspace.

Do I need MX records for a subdomain?

Only if you want to receive mail at addresses like name@shop.yourbrand.in. MX records are set per name, so a subdomain needs its own MX records if it should receive mail.

Does the MX record affect sending email?

No, MX only decides where incoming mail is delivered. Whether receivers trust mail you send depends on SPF, DKIM and DMARC, and on your sending server's reputation, so set those up whenever you change provider.

Checked 15 November 2026 against RFC 5321, RFC 2181 and RFC 7505 · Reviewed by the WebJi® team, Jaipur.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.