Real SMTP mailbox checks — Unknown results are never charged.

Home / Blog / SPF, DKIM and DMARC: A Sender's Guide to Domain Health

SPF, DKIM and DMARC: A Sender's Guide to Domain Health

Authentication records prove your mail really comes from you. Learn what SPF, DKIM and DMARC each do, how to set them up, and how to check they are working. · 2026-11-23 · 11 min read

SPF, DKIM and DMARC: A Sender's Guide to Domain Health

When an inbox provider receives a message, it asks a simple question: is this mail really from the domain it claims to be from? The answer comes from three DNS records — SPF, DKIM and DMARC — that together form the authentication system for email. If the records are set up correctly, your mail carries proof of origin. If they are missing or broken, your mail looks exactly like the mail sent by someone pretending to be you.

This post explains what each record does, how they work together, how to set them up, and how to check that they are working. It is written for senders who manage their own domain, not for DNS engineers, and it focuses on the practical steps and the mistakes that cause the most trouble.

Why authentication exists

Email was designed in an era when the internet was small and its users trusted each other. The protocol that delivers mail, SMTP, does not verify the sender: any server can claim to be sending from any domain, and the receiving server has no built-in way to know whether the claim is true. That design made email easy to adopt and easy to abuse, and abuse is exactly what happened — phishing, spoofing, and impersonation all exploit the fact that a sender address can be faked.

Authentication was added later, as a set of DNS records that let a domain owner publish facts about their mail: which servers are allowed to send for the domain, a cryptographic signature that proves a message was not altered, and a policy that tells receivers what to do when a message fails those tests. The system is voluntary — a domain without the records can still send mail — but inbox providers treat authenticated mail much more favourably, and they treat unauthenticated mail with suspicion, because they have no way to distinguish it from a forgery.

For a sender, authentication is therefore not an optional extra. It is one of the strongest positive signals available, and it is entirely under the sender's control. A clean list sent from a domain with broken authentication will still struggle to reach the inbox, because the provider cannot confirm who sent it.

SPF: who may send for your domain

SPF, the Sender Policy Framework, is a TXT record published in your domain's DNS. It lists the servers and services that are allowed to send mail claiming to be from your domain. When a receiving server gets a message, it looks up the SPF record for the sender's domain and checks whether the server that delivered the message is on the list. If it is, SPF passes. If it is not, SPF fails, and the message is treated as suspicious.

A typical SPF record looks like a short line of text: it starts with "v=spf1", then lists the allowed senders — your mail host, your email platform, any other service that sends on your behalf — and ends with a qualifier that says what to do with mail from servers not on the list. The qualifier matters: "-all" means reject mail from unlisted servers, "~all" means treat it as suspicious but do not reject it outright, and "+all" means allow everything, which defeats the purpose.

The most common SPF mistakes are easy to make and hard to notice. The first is forgetting a sender: you add a new email platform or a new transactional mail service, and you do not add it to the SPF record, so its mail starts failing. The second is exceeding the lookup limit: SPF allows at most ten DNS lookups in the chain of includes, and a record that includes several services, each of which includes others, can exceed the limit and fail for everyone. The third is publishing more than one SPF record for the same domain, which is invalid — the records must be merged into one. The fourth is a syntax error, such as a missing space or a wrong mechanism, which makes the whole record unreadable.

Setting up SPF is a one-time job in your DNS settings, but it has to be repeated — or at least reviewed — every time you change how you send mail. Every new sending service is a new entry that the record has to allow.

DKIM: a signature that proves the message is genuine

DKIM, DomainKeys Identified Mail, adds a cryptographic signature to each outgoing message. The sending server signs selected parts of the message — the headers and the body — with a private key. The public key is published as a TXT record in the domain's DNS, under a selector name chosen by the sender. When the receiving server gets the message, it looks up the public key, verifies the signature, and knows whether the message was altered after it was signed.

The signature covers the content, so a message that is modified in transit — a link changed, a sentence altered — will fail verification. That is the point: DKIM proves not only who sent the message, but that the message is the one that was sent. It is the reason DKIM is harder to forge than SPF, which only checks the sending server and says nothing about the content.

Setting up DKIM involves generating a key pair, publishing the public key in DNS, and configuring the sending server or service to sign outgoing mail with the private key. Most email platforms do the first two steps for you: they generate the key, show you the DNS record to publish, and sign the mail once the record is in place. The mistakes to watch for are publishing the key under the wrong selector name, publishing a key that is too short (1024-bit keys are the minimum that should be used today, and 2048-bit is better), and forgetting to enable signing after publishing the key — a published key with no signature on the mail does nothing.

DKIM also has a subtlety worth knowing: the signature survives forwarding in most cases, because forwarding usually preserves the signed headers and body, while SPF often breaks on forwarding, because the forwarding server is not on the original domain's SPF list. That is one reason DMARC exists — to combine the two checks and to accept a message if either one passes.

DMARC: the policy that ties it together

DMARC, Domain-based Message Authentication, Reporting and Conformance, is a TXT record published at _dmarc.yourdomain.com. It does three things: it says which domain the SPF and DKIM checks should be evaluated against (alignment — the domain in the visible From address must match the domain that passed SPF or DKIM), it states a policy for messages that fail both checks (none, quarantine, or reject), and it names an address where receiving servers should send aggregate reports about authentication failures.

The policy is the part that requires care. A policy of "none" means the receiver takes no action on failures but sends reports — it is the monitoring mode, and it is where every domain should start. A policy of "quarantine" means failures go to spam. A policy of "reject" means failures are refused outright. Moving from "none" to "quarantine" to "reject" is a progression that should be made gradually, with the reports checked at each step, because a strict policy applied before the SPF and DKIM records are correct will cause legitimate mail to be rejected.

The reports are the most underused part of DMARC. Receiving servers send aggregate reports — usually daily, in XML format — listing which servers sent mail for your domain, whether it passed or failed, and how much of it there was. Those reports are the best available view of who is sending mail as you, including senders you did not know about and impersonation attempts you would otherwise never see. There are free and paid tools that turn the reports into readable summaries, and reading them regularly is one of the most useful habits a sender can develop.

How the three records work together

For a message to pass DMARC, it must pass SPF or DKIM (or both) with alignment — the domain that passed must match the domain in the visible From address. A message that passes SPF but with a different domain in the From address does not pass DMARC. A message that passes DKIM with a signature for a different domain does not pass DMARC either. Alignment is what stops an attacker from passing SPF with their own domain and then putting your domain in the From address.

In practice, the usual setup is: SPF lists all your sending services, DKIM signs all outgoing mail, and DMARC starts at "none" while you check the reports, then moves to "quarantine" and finally "reject" once the reports show that all legitimate mail is passing. That progression can take weeks, and it should not be rushed — a premature "reject" policy is one of the most damaging mistakes a sender can make, because it causes the provider to refuse mail that should have been delivered.

Checking your domain health

After setting up the records, check them. The fastest way is to send a test message to a mailbox you control and inspect the authentication results in the message headers — most mail clients can show the original headers, and the Authentication-Results line reports SPF, DKIM and DMARC pass or fail for that message. A domain health tool that queries your DNS directly and reports the status of all three records is faster and more thorough, because it checks the records themselves rather than a single message.

Check again whenever anything changes: a new email platform, a new subdomain for sending, a migration to a new host, a change of DNS provider. Each change can break a record, and a broken record can quietly push your mail towards spam for weeks before anyone notices. A regular check — monthly, and before every large campaign — is cheap insurance.

It is also worth checking the domains you mail to, not just your own. A domain health check on a recipient's domain can reveal that the domain has no authentication records at all, which is useful context when deciding whether the address is worth keeping. A domain that nobody maintains is a domain whose addresses are unlikely to be valuable.

Common mistakes and how to avoid them

A checklist for domain health

SPF, DKIM and DMARC are not glamorous, and they are not visible to recipients. They are infrastructure, and like most infrastructure they are only noticed when they are missing. Set them up carefully, check them regularly, and read the reports — and your mail will carry the proof of origin that inbox providers need to trust it, which is the foundation everything else in deliverability is built on.

Try it on your own list

Verify your list with the same 9 checks described above — Unknown results free, no setup fee.

Try the Live Demo Create a Free Account

Keep reading

← All posts

Ready to Reach the Inbox?

Clean your list, strengthen your sender reputation, and send with confidence.

✉ Create a free account and verify your first addresses today.