Setting up email on your domain always comes down to a handful of DNS records — and getting them right is the difference between mail that reliably reaches inboxes and mail that vanishes or lands in spam. These records tell the internet where to deliver your incoming email and how to prove your outgoing email is genuine. Once you understand what each one does, configuring email becomes a clear, methodical task.
This guide explains the email DNS records you need: what they are, the role of MX for receiving mail, and how SPF, DKIM, and DMARC work together to authenticate your outgoing mail. You will learn the order to set them up, where to add them, and the common mistakes to avoid. By the end, the DNS side of email will make complete sense.
Did you know?
Email needs two things from DNS: a way in and a way to be trusted. The MX record is the way in — where mail is delivered; SPF, DKIM, and DMARC are the way to be trusted — proving your mail is genuine so it reaches inboxes instead of spam.
What email DNS records are
Email DNS records are specific text entries stored in your domain’s DNS settings that tell the internet two things: where to deliver your incoming messages, and how to prove that your outgoing messages are legitimate. Without them, mail to your domain has nowhere to go, and mail from your domain may be treated as suspicious.
They fall into two functional groups. One record — the MX record — handles receiving, directing incoming mail to the correct server. The others — SPF, DKIM, and DMARC, all stored as TXT records — handle authentication, proving your sent mail genuinely comes from you and has not been forged or altered.
So the full email setup is really about getting these records right: the MX so you can receive, and the authentication trio so your outgoing mail is trusted. Your email provider supplies the exact values, and you add them in your domain’s DNS editor. Understanding each one’s job is what makes email configuration straightforward rather than mysterious.
MX: directing incoming mail
The MX (Mail Exchange) record is the one that makes receiving email possible. It directs incoming emails to the correct mail server responsible for your domain — so when someone sends a message to you@yourdomain.com, their server looks up your MX record to know where to deliver it.
MX records include a priority number, which lets you designate a primary mail server and backups: if the main server is unavailable, mail can flow to a server at the next priority, providing failover so messages are not lost during an outage. Lower priority numbers are tried first.
Without a correct MX record, incoming mail to your domain simply has nowhere to go and fails to arrive — which is why a missing or wrong MX record is a common reason email silently does not work. When you set up email with a provider, adding their specified MX record (or records) is the essential step that turns on receiving.
SPF, DKIM, DMARC: proving legitimacy
While MX handles receiving, the authentication records handle trust — and all three are stored as TXT records in your DNS. Together they prove your outgoing email is legitimate and stop scammers from forging your domain, which is increasingly essential for your mail to reach inboxes rather than spam.
- SPF (Sender Policy Framework): lists the servers allowed to send email for your domain, so receivers can reject mail from unauthorized sources pretending to be you.
- DKIM (DomainKeys Identified Mail): adds a hidden digital signature to your outgoing mail, with a public key in your DNS, so receivers can verify the message truly came from you and was not altered in transit.
- DMARC: combines SPF and DKIM with a policy telling receivers what to do with mail that fails the checks, plus reporting on authentication activity.
Together these three form a layered defense: SPF says who may send, DKIM proves authenticity and integrity, and DMARC sets the policy and provides visibility. Modern inbox providers increasingly expect all three, so setting them up is what keeps your legitimate mail trusted and delivered rather than filtered out.
The email records at a glance
Here is the full set of email DNS records in one view, so you can see what each contributes to a working, trusted email setup.
The MX record is mandatory for receiving; the three TXT-based standards are what keep your outgoing mail trusted and out of spam. A complete, healthy email setup uses all four together — receiving handled by MX, and deliverability and anti-spoofing handled by SPF, DKIM, and DMARC. Your provider gives you the exact values for each.
The order to set them up
When configuring email on your domain, there is a sensible order. Start with the MX record, since it enables receiving — the foundation of email working at all. Add the MX record (or records) your email provider specifies so mail can be delivered to your mailbox.
Next, add SPF as a TXT record to authorize your sending sources, then DKIM to sign your outgoing mail, and finally DMARC to set the policy that ties SPF and DKIM together. Your provider supplies the exact value for each; you add them in your DNS editor, and with an all-in-one host these are often configured automatically.
After adding the records, allow time for DNS propagation before expecting everything to work, and then verify — sending and receiving a test message, and ideally using an email-authentication checker to confirm SPF, DKIM, and DMARC pass. Setting them in this order, MX first then the authentication trio, gives you a working, trusted email configuration step by step.
Where to add them and common mistakes
You add all email DNS records in your domain’s DNS editor — the same zone editor where you manage other records — on whatever provider holds your domain’s active nameservers. Copy each value exactly as your email provider gives it, since these records are precise and unforgiving of errors.
A few common mistakes cause most email problems. Missing or incorrect MX records mean mail does not arrive at all. A missing DKIM record or DMARC policy weakens deliverability, so mail is more likely to hit spam. And a frequent SPF error is having more than one SPF record for a domain (you should have a single, combined SPF record) or not including all your sending services in it.
Editing the records in the wrong place — a DNS zone that is not active for your domain — is another classic reason changes seem to do nothing. So the rules are: add records where your domain’s nameservers actually point, copy values exactly, keep a single correct SPF record listing all senders, and include DKIM and DMARC. Get these right, and your email both arrives and is trusted.
Verifying your setup
Once your email DNS records are in place and propagated, verify that everything works before relying on it. Send a test email from your custom address and confirm it arrives at the recipient looking correct, and send one to your custom address to confirm receiving works — this checks the MX record and basic flow.
For the authentication side, use an email-authentication or deliverability checking tool that inspects your domain’s SPF, DKIM, and DMARC records and reports whether they are correctly configured and passing. This catches subtle issues — like an SPF record missing a sender, or a misconfigured DKIM — that might otherwise only show up as mail quietly landing in spam.
Verifying is worth the few minutes because email problems are often silent: mail simply does not arrive or is filtered without an obvious error. Confirming that receiving works and that SPF, DKIM, and DMARC all pass gives you confidence that your domain’s email is both functional and trusted. With an all-in-one host that configures these automatically, verification is mostly a reassuring final check.
FAQs
What DNS records does email need?
An MX record to direct incoming mail to your server (with a priority number for failover), and three TXT records for authentication: SPF (which servers may send for you), DKIM (a cryptographic signature proving mail is genuine), and DMARC (policy for failed checks plus reporting). MX enables receiving; SPF, DKIM, and DMARC keep outgoing mail trusted.
What does the MX record do?
The MX (Mail Exchange) record directs incoming email to the correct mail server for your domain, so messages to you@yourdomain.com are delivered to the right place. It uses priority numbers so you can set a primary server and backups for failover. Without a correct MX record, incoming mail has nowhere to go and fails to arrive.
What are SPF, DKIM, and DMARC?
Three TXT-based email authentication standards. SPF lists the servers allowed to send for your domain; DKIM adds a cryptographic signature so receivers verify mail truly came from you and wasn’t altered; DMARC sets the policy for handling mail that fails those checks and provides reporting. Together they prove your outgoing mail is legitimate and keep it out of spam.
In what order should I set up email DNS records?
Start with the MX record to enable receiving, then add SPF to authorize your senders, DKIM to sign outgoing mail, and DMARC to set the policy tying them together. Your provider supplies exact values; add them in your DNS editor. Allow for propagation, then verify. With an all-in-one host these are often configured automatically.
Why is my email going to spam or not arriving?
Common causes: a missing or wrong MX record (mail doesn’t arrive), a missing DKIM record or DMARC policy (weak deliverability, mail hits spam), more than one SPF record or an SPF that omits a sending service, or records edited in the wrong DNS zone. Copy values exactly, keep a single correct SPF, and include DKIM and DMARC.
How do I verify my email DNS records are correct?
Send test emails to and from your custom address to confirm receiving and sending work (checking MX and flow), then use an email-authentication or deliverability checker to confirm SPF, DKIM, and DMARC are configured and passing. This catches silent issues like an SPF missing a sender or a misconfigured DKIM before they cause mail to be filtered.
The bottom line
Email on your domain runs on a handful of DNS records that do two jobs: get mail in, and make your mail trusted. The MX (Mail Exchange) record is the way in — it directs incoming email to the correct mail server, using priority numbers for failover, and without a correct one, mail simply does not arrive. The way to be trusted is the authentication trio, all stored as TXT records: SPF authorizes which servers may send for your domain, DKIM cryptographically signs your outgoing mail so it cannot be forged or altered, and DMARC sets the policy for handling mail that fails those checks and provides reporting. Modern inbox providers increasingly expect all three, so together they are what keep your legitimate mail reaching inboxes instead of spam.
To configure email, set the MX record first to enable receiving, then add SPF, DKIM, and DMARC to authenticate your sending — adding each in your DNS editor with the exact values your provider supplies, on the nameservers your domain actually uses. Avoid the classic mistakes: a missing or wrong MX, no DKIM or DMARC, multiple or incomplete SPF records, or editing in the wrong DNS zone. Then verify by testing send and receive and using an authentication checker to confirm SPF, DKIM, and DMARC pass. With an all-in-one host these records are often configured for you automatically. Get them right, and your domain’s email both arrives reliably and is trusted — which is the whole goal.
When you are ready, you can start with Hostinger and use code PROTIPS for the reader discount. Email needs an MX record (directs incoming mail, with priority for failover) plus SPF, DKIM, and DMARC TXT records (authenticate outgoing mail so it’s trusted and avoids spam). Set MX first, then the trio; copy values exactly, keep a single SPF, edit in the active zone, and verify with a checker.