Anyone can send an email that claims to come from your domain. SPF, DKIM and DMARC are three DNS records that let inbox providers check whether it really did. Set up properly, they stop criminals impersonating you, keep your genuine email out of spam folders, and protect the reputation of your domain. This guide explains each one, shows example records, and sets out a safe plan to reach full protection.
In short: use SPF to list the servers that send your email, DKIM to sign every message with your domain, and DMARC to require that one of them matches the From address and to tell providers to reject what fails. Start DMARC in monitoring mode, fix every legitimate sender, then move to p=reject. Gmail, Yahoo and Microsoft now require all three from bulk senders.
Why email authentication matters
- Fraud: phishing and invoice fraud often use a real company’s domain in the From address. Without DMARC enforcement, nothing tells the receiving server to refuse it.
- Deliverability: inbox providers trust authenticated mail. Unauthenticated email is more likely to be filtered as spam or rejected outright.
- Reputation: providers build a reputation for your domain from the mail it sends. Authentication ties that reputation to you, so spoofed mail can’t damage it and your good sending history counts.
- Visibility: DMARC reports show every service sending email as your domain, including ones you didn’t know about.
What the big inbox providers require
Since 2024, Gmail and Yahoo have required senders of more than 5,000 messages a day to their users to meet these rules, and Microsoft introduced similar requirements for Outlook.com in 2025:
- SPF and DKIM set up for the sending domain;
- a DMARC record, at least
p=none, with SPF or DKIM aligned to the From domain; - one-click unsubscribe in marketing email, with unsubscribes honoured within two days;
- a spam complaint rate kept well below 0.3%;
- valid forward and reverse DNS for sending servers, and TLS encryption.
Smaller senders benefit from the same rules: the requirements describe what good, trusted email looks like.
How the three work together
| SPF | DKIM | DMARC | |
|---|---|---|---|
| What it does | Lists the servers allowed to send for a domain | Adds a digital signature to each message | Requires an aligned SPF or DKIM pass, sets a policy, sends reports |
| What it checks | The sending server’s IP address against the envelope sender (Return-Path) domain | The signature against a public key in the signing domain’s DNS | That the passing SPF or DKIM domain matches the visible From domain |
| Where it lives | example.com TXT | selector._domainkey.example.com TXT | _dmarc.example.com TXT |
| Survives forwarding? | Usually not | Yes, if the message isn’t changed | Yes, through DKIM |
| On its own | Doesn’t protect the From address people see | Doesn’t say what to do with failures | Needs SPF or DKIM to work |
SPF: who is allowed to send
An SPF (Sender Policy Framework) record is a single TXT record on your domain listing every service that sends email for it: your own mail servers, your office email provider, and any platform that sends on your behalf, such as a CRM, helpdesk, billing system or email platform.
| Record | Name | Value (TXT) |
|---|---|---|
| SPF | example.com | v=spf1 include:_spf.google.com include:spf.example-esp.net ip4:203.0.113.10 -all |
- One record only. A domain must have exactly one SPF record. Two records make SPF fail. Add new services to the existing record.
- Stay under 10 lookups. Each
include,a,mxandredirectcosts a DNS lookup, including the ones nested inside other includes. More than 10 makes SPF fail. Remove services you no longer use, and move bulk senders to their own subdomain. - End with -all or ~all.
-all(hard fail) says anything not listed is unauthorised.~all(soft fail) is gentler while you’re still finding senders. Never use+all, which allows anyone. - Know its limits. SPF checks the hidden envelope sender, not the From address your recipients see, and it normally fails when a message is forwarded. That’s why you need DKIM and DMARC as well.
DKIM: a signature on every message
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to the headers of each email. The sending service signs with a private key; you publish the matching public key in DNS. Receiving servers check the signature, which proves the message was authorised by the signing domain and hasn’t been changed in transit.
| Record | Name | Value (TXT) |
|---|---|---|
| DKIM | s1._domainkey.example.com | v=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQAB |
- Sign with your own domain. The signature’s domain (
d=) should be your domain, not your provider’s. Only then does DKIM count towards DMARC. - One selector per service. The selector (
s1above) lets each sending service have its own key, so you can change or remove one without affecting the others. - Use 2048-bit keys where your DNS host and provider support them, and avoid 1024-bit keys for new set-ups.
- Rotate keys every 6 to 12 months, and straight away if a key may have been exposed. Publish the new selector before switching, then remove the old one.
DMARC: policy, alignment and reports
DMARC (Domain-based Message Authentication, Reporting and Conformance) ties SPF and DKIM to the From address people actually see. A message passes DMARC when SPF or DKIM passes and the domain that passed matches the From domain. This matching is called alignment. DMARC then tells receivers what to do with mail that fails, and asks them to send you reports.
| Record | Name | Value (TXT) |
|---|---|---|
| DMARC | _dmarc.example.com | v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; fo=1 |
| Tag | Meaning |
|---|---|
p= | The policy for failing mail: none (monitor only), quarantine (send to spam) or reject (refuse it). |
rua= | Where to send daily aggregate reports, summarising who sent mail as your domain and whether it passed. |
pct= | The percentage of failing mail the policy applies to, so you can roll out quarantine or reject gradually. |
sp= | A separate policy for subdomains. Without it, subdomains follow p=. |
adkim= / aspf= | Alignment mode: r (relaxed, the default) allows subdomains of the same organisation to match; s (strict) needs an exact match. |
A safe path to p=reject
- List your senders. Find every system that sends email as your domain: office email, marketing, CRM, invoicing, helpdesk, website forms, scanners and devices.
- Publish p=none with reports. Nothing is blocked, but within a day you start receiving reports.
- Fix every legitimate sender. Add it to SPF and turn on DKIM signing with your domain. Read the reports for two to four weeks until all genuine mail passes.
- Move to quarantine. Start with
p=quarantine; pct=25and increase to 100 while watching the reports. - Move to reject. Set
p=reject. Mail that fakes your exact domain is now refused. - Keep watching. New services get added over time. Check reports regularly, and before you add a new sender, set up its SPF and DKIM first.
Protecting your sender reputation
Authentication proves who you are; reputation decides whether providers want your email. Both matter for reaching the inbox.
- Separate your streams. Send marketing from one subdomain (for example
news.example.com) and transactional email from another (mail.example.com). A complaint-heavy campaign then can’t delay password resets or invoices. - Warm up new domains and IP addresses. Start with small volumes to your most engaged recipients and increase gradually over a few weeks.
- Only email people who asked. Use confirmed opt-in for marketing, never buy lists, and make unsubscribing one click.
- Remove bounces and inactive recipients. Stop sending to addresses that hard bounce or complain, and stop marketing to people who haven’t opened or clicked in months.
- Watch your complaint rate. Keep spam complaints below 0.1%, and never let them reach 0.3%. Google Postmaster Tools and Microsoft SNDS show how providers see your domain.
- Be recognisable. Use a consistent From name and address, avoid link shorteners, and send email people expect. See transactional email template best practices.
Preventing spam and fraud
- Enforce DMARC.
p=rejectis the single most effective step against criminals using your exact domain. - Lock down unused domains. For every domain or subdomain that doesn’t send email, publish the records below.
- Watch for lookalikes. DMARC doesn’t cover lookalike domains such as
examp1e.comorexample-billing.com. Register obvious variants and monitor new registrations that resemble your brand. - Add your logo with BIMI. Once DMARC is at quarantine or reject, BIMI can show your verified logo next to your email in supporting inboxes. Gmail requires a verified mark certificate.
- Encrypt mail in transit. MTA-STS and TLS reporting make other servers use encrypted connections when sending to you, and tell you when that fails.
- Don’t put sensitive details in email. Send a notification that links to a secure portal instead. See digital letters.
- Train your staff to check the real sender address, not just the display name, and to verify payment changes by phone.
| Record | Name | Value (TXT) |
|---|---|---|
| SPF | parked.example.com | v=spf1 -all |
| DMARC | _dmarc.parked.example.com | v=DMARC1; p=reject; |
Add a null MX record (MX 0 .) to show the domain receives no email either.
Checklist
- One SPF record per sending domain, listing every service, under 10 lookups, ending
-allor~all. - DKIM signing with your own domain on every service, using 2048-bit keys, rotated regularly.
- A DMARC record with reporting, moved from
p=nonetop=rejectonce all genuine mail passes. - Separate subdomains for marketing and transactional email.
- One-click unsubscribe, automatic bounce and complaint suppression, and a low complaint rate.
- SPF
-all, DMARCp=rejectand a null MX on every domain that doesn’t send email. - Regular review of DMARC reports and provider reputation dashboards.
How everymessage helps
- Authenticated from the first send. Every sending domain on our business email platform is set up with SPF, DKIM and DMARC, and we help you add the records.
- Reputation protected automatically. Hard bounces, spam complaints and unsubscribes are suppressed, so you don’t keep emailing people who can’t or don’t want to receive it.
- Email to SMS checks too. Our email to SMS service only accepts mail that passes SPF, and can require DKIM, so nobody can send texts by faking your address.
Frequently asked questions
What is the difference between SPF, DKIM and DMARC?
SPF lists the servers allowed to send email for your domain. DKIM adds a digital signature that proves the message came from your domain and wasn’t changed. DMARC checks that SPF or DKIM passed for the domain in the visible From address, tells inbox providers what to do with mail that fails, and sends you reports.
Do I need all three?
Yes. Gmail, Yahoo and Microsoft now expect bulk senders to use SPF, DKIM and DMARC, and each one covers gaps in the others. SPF breaks when email is forwarded, DKIM alone doesn’t tell providers what to do with failures, and DMARC needs at least one of the other two to pass.
Should my SPF record end in -all or ~all?
Once DMARC is in place, either works, because DMARC decides what happens to failing mail. -all (hard fail) is the stricter choice when you’re sure every sending service is listed. ~all (soft fail) is safer while you’re still finding services that send for you.
Will DMARC p=reject stop my own emails?
Only if a legitimate service sends as your domain without passing aligned SPF or DKIM. That’s why you start with p=none, read the reports for a few weeks, fix every legitimate sender, and only then move to quarantine and reject.
Does DMARC stop all phishing?
No. It stops criminals sending email that uses your exact domain. It doesn’t stop lookalike domains, such as examp1e.com, or free email accounts with your company name in the display name. Monitor lookalikes and train staff to check the real sender address.
What about domains we don’t send email from?
Protect them too. Publish an SPF record of v=spf1 -all, a DMARC policy of p=reject and a null MX record, so nobody can send convincing email from them.
Want a second opinion on your email set-up?
Tell us about your domains and sending services, and we’ll help you get SPF, DKIM and DMARC right.
