What SPF, DKIM and DMARC do
SPF, DKIM and DMARC are three records in your domain's DNS that let a receiving mail server check whether a message claiming to come from your domain really does. Set up email authentication and Gmail, Outlook and Yahoo can tell your real invoice from a fraudster's copy. Skip it, and your own mail is the one that looks suspicious.
- SPF (Sender Policy Framework) lists the servers and services that may send mail for your domain.
- DKIM (DomainKeys Identified Mail) puts a digital signature on every message, which proves it was sent by your domain and not changed on the way.
- DMARC (Domain-based Message Authentication, Reporting and Conformance) checks that SPF or DKIM passed for the domain in the visible From address, tells receivers what to do when neither did, and sends you reports.
3records in your domain's DNS. Nothing to install, nothing to change in your mailboxes.
What a receiving server checks
A message arrives
From invoices@example.com, at Gmail, Outlook.com or any other receiving server.
- SPF
Allowed sender
Is this server allowed to send for the domain?
The receiver reads the SPF record of the envelope domain and compares it with the sending server's IP address.
- DKIM
Valid signature
Is the signature real, and is the message unchanged?
The receiver fetches the public key named in the signature and checks the signed headers and body against it.
- DMARC
Matching From domain
Did SPF or DKIM pass for the domain in the From line?
If not, the receiver applies the domain owner's policy and counts the result in the next daily report.
The receiver decides
Inbox
DMARC passes. Spam filters still look at reputation and content.
Spam or quarantine
DMARC fails and the policy is quarantine, or the message has no authentication at all.
Rejected
DMARC fails and the policy is reject. The sending server gets a bounce instead of a delivery.
The key idea is alignment. SPF checks the hidden envelope address that bounces go to, and DKIM checks whichever domain signed the message. A newsletter tool can pass both for its own domain while your name sits in the From line. DMARC only passes when at least one of the two passed for your domain, or for a subdomain of it.
Why Gmail, Outlook and Yahoo now require it
For years these records were good practice. Since February 2024 they have been the price of entry at the large consumer mailbox providers, and since 2025 they have been enforced with rejections, not just warnings.
| Provider | Every sender | Bulk senders | Since |
|---|---|---|---|
| Gmail | SPF or DKIMplus valid reverse DNS, TLS and a spam rate below 0.3%. | From 5,000 messages a daySPF and DKIM and DMARC (at least p=none), a From domain aligned with SPF or DKIM, and one-click unsubscribe for marketing mail. | February 2024Enforcement stepped up in November 2025, with temporary and permanent rejections. |
| Yahoo | SPF or DKIMplus valid forward and reverse DNS, and a spam rate below 0.3%. | No fixed thresholdSPF and DKIM, a DMARC policy of at least p=none that passes, alignment and one-click unsubscribe. Yahoo only speaks of a significant volume. | February 2024Rolled out over the first half of that year. |
| Outlook.com | No hard rule yetMicrosoft says every sender benefits from the same records. | Above 5,000 messages a daySPF and DKIM must pass, plus DMARC of at least p=none aligned with SPF or DKIM. | 5 May 2025Non-compliant mail is rejected with error 550 5.7.515. |
Checked against each provider's sender guidelines on 7 October 2026.
These rules protect personal mailboxes: Google says its requirements apply to mail sent to personal Gmail accounts. Business mailboxes on Microsoft 365 or Google Workspace follow their own administrators' settings, and Microsoft 365 can apply your DMARC policy to incoming mail as well.
Below 5,000 messages a day you are not exempt in practice. A message with neither SPF nor DKIM already fails Gmail's rule for every sender. And a domain without DMARC is easy to spoof: criminals send fake invoices in your name, and the complaints damage your reputation, not theirs.
In the Netherlands, the government has made these standards compulsory for itself. DMARC, DKIM and SPF are on the "pas toe of leg uit" list of Forum Standaardisatie, and government bodies agreed to use a strict policy on all their domains: quarantine or reject for DMARC, ~all or -all for SPF. That obligation binds the government and its procurement, not companies. It is still a useful yardstick, and internet.nl, the test of the Dutch Internet Standards Platform, uses the same one.
If your company falls under the Cyberbeveiligingswet, the Dutch NIS2 law, you must also take proportionate measures against your cyber risks. Email spoofing is one of the most common of those risks, so these three records belong in that work. Our guide to the Cyberbeveiligingswet (NIS2) explains who is in scope.
The three records, part by part
Each record is a line of text with a fixed start and a few tags. Below are the three records of a fictional company at example.com whose mailboxes run on Google Workspace and whose web server sends the contact form mail.
Many DNS panels add your domain to the Name field themselves. Then you type @ or nothing for SPF, _dmarc for DMARC and google._domainkey for DKIM.
SPF: who may send for your domain
- Name
- example.com
- Type
- TXT
Value
v=spf1 include:_spf.google.com ip4:203.0.113.25 ~allv=spf1VersionMarks the text as an SPF record. It comes first, and only one record per domain may start this way.
include:_spf.google.comGoogle WorkspaceAllows Google's mail servers. Every include costs at least one of the ten DNS lookups SPF allows, often more.
ip4:203.0.113.25Your own serverAllows one IP address, here the web server that sends contact form mail. ip4 and ip6 entries cost no lookups.
~allEveryone else~all (softfail): other servers are probably not allowed. -all (fail): they are not. With DMARC in place, both work.
DKIM: the key that checks your signature
- Name
- google._domainkey.example.com
- Type
- TXT
Value
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx3k...QIDAQABv=DKIM1;VersionMarks the text as a DKIM key record.
k=rsa;Key typeRSA, the type almost every mail service uses. Choose a 2048-bit key when your DNS host accepts one.
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx3k...QIDAQABPublic keyReceivers use it to verify the signature on every message. The matching private key stays with your mail provider. An empty p= revokes the key.
Microsoft 365 works differently. You do not paste a key: you create two CNAME records, selector1._domainkey and selector2._domainkey, that point to keys Microsoft hosts and rotates for you. Their targets look like selector1-example-com._domainkey.yourtenant.n-v1.dkim.mail.microsoft, but the exact values differ per tenant, so copy them from the Defender portal, never from an example.
DMARC: your policy and your reports
- Name
- _dmarc.example.com
- Type
- TXT
Value
v=DMARC1; p=none; rua=mailto:dmarc@example.com; adkim=r; aspf=r;v=DMARC1;VersionMarks the record as DMARC. It must be the first tag.
p=none;PolicyWhat receivers do with mail that fails: none (only report it), quarantine (treat it as suspicious, usually spam) or reject (refuse it).
rua=mailto:dmarc@example.com;Aggregate reportsWhere receivers send their daily summaries: which servers sent mail as your domain, and whether it passed. Use a mailbox meant only for this.
adkim=r;DKIM alignmentr (relaxed) accepts a signature from a subdomain such as mail.example.com; s (strict) demands the exact domain. r is the default.
aspf=r;SPF alignmentThe same choice for the envelope domain that SPF checks. Leave both at r unless you have a reason not to.
Setting it up, step by step
The order matters. First find out who sends mail as you, then make each of them pass SPF or DKIM, and only then publish DMARC.
List every service that sends as your domain
Your mailbox provider, the newsletter tool, the invoicing or accounting software, the webshop, the website's contact form, the CRM, the phone system that emails voicemail. Ask your colleagues: the forgotten ones are the ones that break.
Write one SPF record
Combine the include of every service into a single TXT record on your domain. Services that send with their own envelope domain, as many newsletter tools do, need DKIM rather than an include. Count the lookups and stay under ten.
Switch on DKIM at every service
In Microsoft 365 or Google Workspace, and in every tool that offers "domain authentication". Each one gives you records to publish: add them, wait until they are visible, then start signing.
Publish DMARC with p=none
Add the TXT record on _dmarc with a rua address you actually read. Delivery does not change yet; reports usually start arriving within a day or two.
Test and read the reports
Check the domain at internet.nl and send a test message to a Gmail address. Then read the reports for a few weeks before you tighten the policy.
10DNS lookups is the hard limit for one SPF record (RFC 7208). Every include, a, mx and exists counts, including those nested inside an include.
Microsoft 365 does not sign mail with your own domain until you switch DKIM on for it. Check it: mail flows without it, so nobody notices.
| Where | Path | Good to know |
|---|---|---|
| TransIP | Control panel > Domein > the domain > the "DNS instellingen" section, then DNS. | If the record list is hidden, switch on the "TransIP instellingen" toggle in that section. |
| Strato | Domeinen > Domeinbeheer > the gear icon next to the domain > DNS tab > "TXT- en CNAME-records" > configuratie. | Mail sent through Strato's own mail servers is already DKIM-signed. For DMARC, enter _dmarc as the prefix. |
| Vimexx | Klantenpaneel > Mijn Domeinen > the domain > DNS. | Domain linked to a Vimexx hosting package? Then add records in DirectAdmin under DNS Management, or your site may show a parked page. |
| Cloudflare | Dashboard > the domain > DNS > Records > Add record. | TXT records are always DNS only. Keep DKIM CNAME records DNS only as well, not proxied. |
| Microsoft 365 (DKIM) | Defender portal > Email & collaboration > Policies & rules > Threat policies > Email authentication settings > DKIM. | Open your domain, publish the two CNAME records it shows at your DNS host, then switch on "Sign messages for this domain with DKIM signatures". |
| Google Workspace (DKIM) | Admin console > Apps > Google Workspace > Gmail > Authenticate email. | Generate New Record (2048 bits, selector google), publish it as TXT, then Start authentication. It can take up to 48 hours to work. |
Checked against each provider's help pages on 7 October 2026. Menu names as on the Dutch help pages; they may shift.
From p=none to p=reject in eight weeks
A policy of p=none protects nobody: it only reports. Protection starts at quarantine and is complete at reject, when receivers refuse mail that pretends to be you. The way there is to read the reports until every legitimate sender passes.
Own domains that never send mail? Give them v=spf1 -all and v=DMARC1; p=reject; right away, so nobody can send in their name.
A DMARC rollout for a small business
InventoryList every service that sends as your domain.
Week 1SPF, DKIM, p=nonePublish SPF and DKIM for every sender, then DMARC at p=none.
Week 1–2Read the reportsCheck every sending server in the daily reports.
Week 2–5Fix the gapsAdd DKIM or an include for each of your services that fails.
Week 3–5p=quarantineFailing mail goes to spam. Watch for complaints and bounces.
Week 6–7p=rejectFailing mail is refused. Keep reading the reports monthly.
Week 8
In the reports, look for three kinds of rows. Your own services that fail: fix them before you go on. Unknown servers that fail: that is spoofing, and the policy will stop it. Mailing lists and forwarding that fail: normal, because forwarding breaks SPF, while DKIM usually survives if the message is not changed.
Older guides suggest stepping up with pct=, which applies the policy to a percentage of failing mail. The original DMARC standard (RFC 7489) allowed it, and Microsoft still describes steps from pct=10 to pct=100. The new DMARC standard, RFC 9989 of May 2026, removed pct and added a simpler test flag, t=y. Receivers will take time to catch up, so for a small business the plain path is the safest: none, then quarantine, then reject, each for as long as the reports need.
Test it, and the most common mistakes
Test from the outside, the way a receiving server sees you.
- internet.nl (opens in a new tab): enter your domain in the email test. It checks DMARC, DKIM and SPF and treats quarantine or reject (DMARC) and ~all or -all (SPF) as strict enough.
- The message headers: send a message to a Gmail address, open it and choose Show original. Gmail lists SPF, DKIM and DMARC with PASS or FAIL. In other mail clients, look for the Authentication-Results line: you want spf=pass, dkim=pass and dmarc=pass, with your domain after header.d and header.from.
- The DMARC reports: after a day or two, your rua mailbox receives zipped XML files from Google, Microsoft and others. Each row is a sending server with its message count and results.
The most common mistakes:
- More than ten lookups. Every service brings an include, and some includes hide three or four more. SPF then fails with a permerror for all your mail. Remove services you no longer use, or move a newsletter tool to a subdomain with its own record.
- Two SPF records. A new tool says "add this SPF record" and someone adds it next to the old one. Merge them into one.
- A forgotten newsletter or invoicing tool. It sent fine for years and lands in spam the week you switch to quarantine. That is what the weeks at p=none are for.
- DKIM published but never switched on. The records are in DNS, but nobody started signing in Microsoft 365 or Google Workspace, so DMARC rests on SPF alone and fails as soon as a message is forwarded.
- A rua address at another domain. If reports go to a mailbox on a different domain, that domain must publish an authorisation record (example.com._report._dmarc.otherdomain.com), or receivers send nothing. Report services set this up for you; on a second domain of your own, you add it yourself.
Rather have someone check it? A Secure security scan, from €495, checks your website, domain and email for known weaknesses and ends in a plain-language report. Setting up SPF, DKIM and DMARC is part of our hardening work, and continuous checks, from €75 a month, flag new weaknesses early. Or ask us about your domain first.
The internet.nl email test is free. It also checks secure connections (STARTTLS and DANE), DNSSEC and IPv6 for your mail.
permerroris what SPF returns with two records or more than ten lookups. DMARC counts it as a fail.
Sources
- Google: email sender guidelines (Google Workspace Admin Help) (opens in a new tab)
- Google: email sender guidelines FAQ, including the November 2025 enforcement (opens in a new tab)
- Yahoo: sender best practices and requirements (opens in a new tab)
- Microsoft: Outlook's new requirements for high-volume senders (April 2025, updated 29 April 2025) (opens in a new tab)
- Microsoft Learn: set up DKIM for a custom domain in Microsoft 365 (opens in a new tab)
- Microsoft Learn: set up DMARC in Microsoft 365 (opens in a new tab)
- RFC 7208: Sender Policy Framework (SPF), including the 10-lookup limit (opens in a new tab)
- RFC 6376: DomainKeys Identified Mail (DKIM) signatures (opens in a new tab)
- RFC 7489: the original DMARC specification (opens in a new tab)
- RFC 9989: DMARC, the updated standard (May 2026) (opens in a new tab)
- internet.nl: email test (opens in a new tab)
- Forum Standaardisatie: DMARC on the "pas toe of leg uit" list (opens in a new tab)



