How to Set Up SPF, DKIM and DMARC for Cold Email
By Moe Ameen, founder of BILT · Published · Updated
SPF, DKIM and DMARC are three DNS TXT records that prove mail from your domain is really yours. SPF lists the servers allowed to send, DKIM adds a signature checked against a public key in DNS, and DMARC tells receivers what to do when a message fails and where to send reports. Gmail and Yahoo require all three from bulk senders, and DMARC must pass through an aligned SPF or DKIM domain.
Key takeaways
- Publish one SPF record per domain and keep it to 10 or fewer DNS lookups, or SPF returns a permanent error.
- Use a 2048-bit DKIM key where your host supports it; Google requires at least 1024 bits.
- Start DMARC at p=none with a rua reporting address, then tighten once reports look clean.
- DMARC is now RFC 9989 (May 2026), which replaced RFC 7489 and dropped the pct tag.
These three records are the only part of cold email infrastructure that is pure mechanics. They are either right or wrong, and a wrong one usually fails quietly.
Below, each record comes in the order you'd add it to a new sending domain on Google Workspace or Microsoft 365, followed by the check that proves it works.
What does each record actually check?
SPF checks the sending server, DKIM checks a signature on the message, and DMARC checks that one of them matches the visible From domain.
DMARC alignment is the part people miss. Google's guidelines require the From: domain to match the SPF or DKIM domain for bulk mail. Yahoo accepts relaxed alignment, which under the DMARC spec means the domains share the same organizational domain, so mail.example.com aligns with example.com.
| Record | Where it lives | What it proves | Classic failure |
|---|---|---|---|
| SPF | TXT at the domain root | The sending IP is authorized | Two SPF records, or more than 10 lookups |
| DKIM | TXT at selector._domainkey.domain | The message was signed by the domain and not altered | Key pasted with broken line breaks |
| DMARC | TXT at _dmarc.domain | SPF or DKIM passed for the From domain | SPF passes but for a different domain, so it doesn't align |
The three records side by side (RFC 7208, RFC 6376, RFC 9989)
How do you set up SPF without breaking it?
Publish exactly one TXT record starting with v=spf1 that names every service sending for the domain, ending in ~all.
For a domain that sends only through Google Workspace, Google's example record is v=spf1 include:_spf.google.com ~all, and Google recommends ~all. Under RFC 7208, ~all produces a softfail (probably not authorized) while -all is an explicit fail.
Two rules in RFC 7208 break SPF without warning. A domain must not publish more than one SPF record, and evaluation is capped at 10 DNS-querying terms. Exceed either and receivers return permerror, which counts as no SPF at all. Google notes changes can take up to 48 hours to work, and each subdomain that sends needs its own record.
How do you set up DKIM on Google Workspace?
Generate a key in the Admin console, publish it as a TXT record at google._domainkey, then click Start authentication.
The steps from Google's Set up DKIM page: go to Apps, Google Workspace, Gmail, Authenticate email; pick the domain; generate a 2048-bit key if your DNS host supports it (1024 if not); publish the TXT value at the selector host name; then return and start authentication. Google says the key may not be available for 24 to 72 hours after Gmail is enabled, and authentication can take up to 48 hours to start after you publish it.
Google's sender guidelines require DKIM keys of at least 1024 bits and recommend 2048. Microsoft 365 publishes DKIM through its own admin flow with CNAME records, so follow Microsoft's steps there rather than these.
Which DMARC policy should a cold email domain use?
Start with p=none and a rua address so you receive aggregate reports, then move to quarantine once every legitimate source passes.
A starting record looks like v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com, published at _dmarc.yourdomain.com. Gmail, Yahoo and Microsoft all accept p=none for bulk senders, and Yahoo strongly recommends the rua tag during setup.
DMARC has a new spec. RFC 9989, published in May 2026, obsoletes RFC 7489. The record still begins v=DMARC1 and keeps none, quarantine and reject, but it removes the pct tag and defines a t= test-mode flag. If an old guide tells you to roll out with pct=25, use t=y instead and check that your reporting tool reads it.
How do you confirm all three records pass?
Send a real message to a Gmail account you don't send from and read the Authentication-Results header for spf=pass, dkim=pass and dmarc=pass.
Google warns that you can't verify DKIM by sending a test message to yourself, so use a separate account. Then add the domain to Postmaster Tools, which has an authentication dashboard, and read your first DMARC aggregate reports to catch any service sending on your behalf that you forgot.
What are the most common setup mistakes?
Duplicate SPF records, too many SPF includes and unaligned DMARC cause most authentication failures on new cold domains.
Other mistakes worth checking: adding a second sending tool and forgetting to add it to SPF; publishing DKIM before generating the key in the admin console; leaving DMARC at p=none forever without reading the reports; and assuming a subdomain inherits the parent's SPF record, which Google says it does not.
Who is this for, and who should skip it?
Best for
- Anyone setting up a new sending domain on Google Workspace or Microsoft 365
- Senders whose Authentication-Results header shows a fail or permerror
- Teams adding a new sending tool to an existing domain
Not ideal for
- People who can't edit DNS at their registrar; get access or use a setup service first
- Domains already at p=reject with clean reports; there's nothing to change
What else do people ask?
Can I have two SPF records if I use two sending tools?
No. RFC 7208 says a domain must not have multiple SPF records, and receivers return permerror if they find two. Merge both tools into one record with two include terms.
Should I use ~all or -all?
Google recommends ~all in its Workspace SPF guide. Either works for DMARC, because DMARC decides the outcome when SPF fails.
Is p=none enough for Gmail's bulk sender rules?
Yes. Google, Yahoo and Microsoft all accept a DMARC policy of p=none, as long as the record exists and messages pass DMARC through aligned SPF or DKIM.
Do I need a new DMARC record because of RFC 9989?
Usually not. The record still starts v=DMARC1 and keeps the same policy values. Remove the pct tag if you used it, since RFC 9989 drops it.
How long until new records work?
Google says SPF and DKIM can each take up to 48 hours to start working after you publish them. Test before you send any campaign volume.
The takeaway
Publish one SPF record under 10 lookups, a 2048-bit DKIM key at your provider's selector, and a DMARC record at p=none with reporting turned on. Confirm all three pass in a real message header, read the DMARC reports, then tighten the policy. Do this once per sending domain, before the domain sends anything.
How do we know this?
We read RFC 7208 (SPF), RFC 6376 (DKIM), RFC 9989 (DMARC, May 2026), Google Workspace's SPF and DKIM setup pages, Google's Email sender guidelines and Yahoo's Sender Hub on November 4, 2026. The record examples follow those documents.
Sources
- RFC 7208: Sender Policy Framework (SPF) (accessed November 4, 2026)
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures (accessed November 4, 2026)
- RFC 9989: DMARC (May 2026, obsoletes RFC 7489) (accessed November 4, 2026)
- Google Workspace: Set up SPF (accessed November 4, 2026)
- Google Workspace: Set up DKIM (accessed November 4, 2026)
- Yahoo Sender Hub: Sender Best Practices (accessed November 4, 2026)