Email authentication is the set of checks that prove an email really came from the domain shown in its From address. It mainly uses three DNS-based methods: SPF lists the servers allowed to send for a domain, DKIM adds a cryptographic signature that proves the message was not altered, and DMARC ties them together by telling receivers what to do when checks fail.
Key takeaways
- SPF authorizes sending servers, DKIM signs messages so tampering is detectable, and DMARC sets the policy for failures.
- Since February 2024, Gmail and Yahoo require SPF or DKIM from all senders, and all three from bulk senders.
- DMARC at p=reject is the step that actually stops exact-domain spoofing; SPF and DKIM alone do not.
Anyone can type your domain into the From line of an email. Nothing in the original design of email stops them. Email authentication is the fix: three DNS records that let receiving servers check whether a message really came from the domain it claims.
What is email authentication?
Email authentication is the process of verifying that an email message genuinely comes from the domain shown in its From address. It uses records published in DNS that receiving servers check when a message arrives.
Without it, spoofing is trivial. An attacker can send mail that looks exactly like it came from your bank, your supplier or your CEO, because email was designed in an era when senders were trusted by default. Authentication adds a check that did not exist in the original protocol.
Three methods do almost all of the work: SPF, DKIM and DMARC. They answer different questions, and they only protect you properly when used together. Cloudflare's documentation describes them as verifying sender identity and improving deliverability, which captures both halves of the value: security and getting legitimate mail delivered.
This matters beyond security. Since February 2024, Gmail and Yahoo have required at least SPF or DKIM from everyone sending to their users, and all three methods from bulk senders. A domain with no authentication now risks having its mail rejected or sent to spam.
How does email authentication work?
When a message arrives, the receiving server looks up the sending domain's DNS records and runs three checks in sequence. SPF checks the sender, DKIM checks the signature, and DMARC decides what to do with the result.
The checks happen in seconds and are invisible to the recipient. What the recipient sees is only the outcome: the message lands in the inbox, in spam, or never arrives at all.
Authentication results also appear in message headers. If you open the headers of a message in Gmail or Outlook, you will see lines such as spf=pass, dkim=pass and dmarc=pass. Our free email header analyzer reads those lines for you and explains them in plain language.
What is SPF?
SPF, or Sender Policy Framework, is a DNS TXT record that lists the servers allowed to send email for your domain. When a message arrives, the receiver checks whether the sending server's address is on that list.
Think of it as a guest list. If a server is not on the list, it has no business sending mail as your domain. A typical record looks like v=spf1 include:_spf.google.com ~all, which authorizes Google's mail servers and treats anything else as suspicious.
SPF was standardized as RFC 7208 in 2014, building on work from 2003. It has real limits. It checks the envelope sender address used in the SMTP conversation, not the From address the recipient sees. An attacker can pass SPF with their own domain while displaying yours. SPF also breaks when mail is forwarded, because the forwarding server is usually not on your list.
Common mistakes include having more than one SPF record, which makes the check fail, and exceeding the limit of 10 DNS lookups, which happens when too many include mechanisms are chained together. Keep the record flat and short where you can.
What is DKIM?
DKIM, or DomainKeys Identified Mail, adds a cryptographic signature to every outgoing email. The receiving server verifies that signature against a public key published in your DNS, proving the message came from your domain and was not altered in transit.
Think of it as a wax seal. The sending server signs selected headers and the body with a private key that only it holds. If anyone changes the message on its way, the signature no longer matches and the check fails.
DKIM was standardized as RFC 6376 in 2011. Unlike SPF, it survives forwarding, because the signature travels with the message rather than depending on the sending server's address. That makes it the more robust of the two checks for messages that pass through mailing lists and forwarding services.
Setup means generating a key pair, publishing the public key as a TXT record under a selector such as selector._domainkey.yourdomain.com, and turning on signing in your mail provider. Use a 2048-bit key where your provider supports it, and rotate keys when staff or providers change.
What is DMARC?
DMARC, or Domain-based Message Authentication, Reporting and Conformance, ties SPF and DKIM together. It checks that at least one of them passes and aligns with the visible From domain, then tells receivers what to do when neither does.
DMARC was published as RFC 7489 in 2015. It adds the two things SPF and DKIM lack: a policy and reporting. The policy is one of three values: p=none (deliver the mail and send reports), p=quarantine (send failures to spam) and p=reject (refuse failures outright).
Only p=reject actually stops spoofed mail from reaching inboxes. Many organizations publish DMARC at p=none and never move further, which gives them visibility but no protection. The safe path is to start at p=none, read the reports, fix legitimate senders that fail, then move to quarantine and finally to reject.
DMARC reports are XML files sent to the address in your record's rua tag. They show who is sending mail as your domain, including attackers. Reading them is how you discover forgotten services, such as an old marketing tool, before you enforce a strict policy. Our guide to what DMARC is and how to set it up walks through that path step by step.
SPF vs DKIM vs DMARC: what is the difference?
SPF answers who may send, DKIM answers whether the message is genuine and unchanged, and DMARC answers what to do when the checks fail. No one method is enough on its own.
| Method | What it checks | How it works | Main weakness |
|---|---|---|---|
| SPF | The sending server | DNS list of approved servers | Checks the hidden envelope sender, not the visible From address; breaks on forwarding |
| DKIM | The message content | Cryptographic signature verified against a DNS public key | Does not say what to do with failures; needs key management |
| DMARC | Alignment and policy | Requires SPF or DKIM to align with the From domain | Only protects at p=reject; does not stop look-alike domains |
For a fuller picture of the two signature-based methods, see our guide to what DKIM is. Together, the three records form a chain: SPF and DKIM produce evidence, and DMARC turns that evidence into a decision.
How do I set up email authentication?
Set up SPF first, then DKIM, then DMARC at p=none, and only enforce a strict policy after you have read the reports. Doing it in that order avoids blocking your own legitimate mail.
- Inventory every sender. List every service that sends email as your domain: your mail provider, marketing tool, helpdesk, invoicing system and any server that sends alerts.
- Publish SPF. Add one TXT record listing all approved senders. Keep it under 10 DNS lookups and use
~all(soft fail) while you test. - Enable DKIM. Generate a key pair in your mail provider, publish the public key in DNS, and turn on signing. Verify a test message passes.
- Publish DMARC at p=none. Add a TXT record at
_dmarc.yourdomain.comsuch asv=DMARC1; p=none; rua=mailto:[email protected]. - Read the reports for two to four weeks. Find legitimate senders that fail and fix them before enforcing anything.
- Move to p=quarantine, then p=reject. Raise the policy in stages and watch for deliverability problems after each change.
You can verify the first step with our free SPF checker.
Check the signing step with our DKIM checker.
Check the policy itself with the DMARC checker.
What does email authentication not protect against?
Email authentication does not stop phishing from look-alike domains, from hacked accounts, or from domains the attacker legitimately owns. It only stops exact-domain spoofing.
A look-alike domain such as your-company.com with a hyphen, or .co instead of .com, can pass its own SPF, DKIM and DMARC perfectly, because the attacker owns that domain. Authentication checks the domain in the From address, not whether that domain is the one you meant.
Messages sent from a genuinely compromised mailbox also pass, because they come from a real authorized server. CISA recommends authentication alongside other controls in its joint phishing guidance. The same applies to phishing sent from a free mailbox or a newly registered domain with valid records. This is why CISA's phishing guidance recommends authentication alongside phishing-resistant MFA, look-alike domain monitoring and verification processes for payments.
For the wider picture, our spear phishing guide explains how targeted attacks bypass technical filters.
Our phishing email examples show what these messages actually look like.
What are the most common email authentication mistakes?
The most common mistakes are publishing multiple SPF records, exceeding the SPF lookup limit, leaving DMARC at p=none forever, and forgetting a sender when enforcing p=reject.
Another frequent error is using +all in SPF, which authorizes every server on the internet and defeats the purpose. Use ~all while testing and -all once you are confident the record is complete.
Finally, remember that authentication is not a one-time task. Every time you add a new tool that sends email, update SPF and DKIM first, or its mail will start failing once DMARC is enforced.
The bottom line
Email authentication is three small DNS records that answer one question: did this message really come from the domain it claims? SPF lists who may send, DKIM proves the message was not changed, and DMARC decides what happens when the checks fail.
Publish all three, move DMARC to p=reject once your legitimate senders pass, and keep watching the reports. You can check your domain in seconds with the free DMARC checker.
Frequently asked questions
What is email authentication in simple terms?
Email authentication is how a receiving mail server checks that an email really came from the domain it claims. The domain owner publishes records in DNS, and the receiver checks them when each message arrives. If the checks pass, the message is more likely to reach the inbox.
What is the difference between SPF, DKIM and DMARC?
SPF checks whether the sending server is on the domain's approved list. DKIM checks a cryptographic signature to prove the message was not changed in transit. DMARC checks that SPF or DKIM aligns with the visible From domain and tells receivers to accept, quarantine or reject failures.
Do I need all three: SPF, DKIM and DMARC?
Yes, for real protection. SPF alone can be bypassed by forwarding and does not check the visible From address. DKIM alone does not tell receivers what to do with failures. DMARC only works when SPF or DKIM is in place, and only p=reject actually blocks spoofed mail.
What happens if email authentication fails?
It depends on the domain's DMARC policy. With p=none, failing mail is usually still delivered and the owner only gets reports. With p=quarantine it goes to spam, and with p=reject the receiving server refuses it. Without DMARC, each receiver decides on its own.
Does email authentication stop phishing?
It stops exact-domain spoofing, which is a large share of phishing. It does not stop look-alike domains, messages from a genuinely hacked account, or phishing sent from a domain the attacker owns. Those need domain monitoring, phishing-resistant MFA and user verification habits.
How do I check if my domain has email authentication?
Look up your domain's DNS records for an SPF TXT record, a DKIM record under a selector such as selector._domainkey, and a DMARC record at _dmarc. You can also run a free check that reports all three at once and flags missing or broken records.
What is DMARC alignment?
Alignment means the domain authenticated by SPF or DKIM matches the domain in the visible From header. SPF checks the envelope sender, which recipients never see, so DMARC adds this alignment test. Without alignment, an attacker could pass SPF with their own domain while displaying yours.
Can email authentication affect deliverability?
Yes. Gmail and Yahoo have required SPF or DKIM from all senders since February 2024, and SPF, DKIM and DMARC from bulk senders. Missing or broken authentication is a common reason legitimate mail lands in spam or gets rejected.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Cloudflare's email authentication documentation, Google's sender guidelines, and RFCs 7208, 6376 and 7489.
How we write and fact-check →