SPF, DKIM, and DMARC Guide 2026 - Set Up Email Authentication for Cold Outreach | BounceZero
BlogEmail Deliverability

SPF, DKIM, and DMARC Guide 2026
Email Authentication for Cold Outreach

SPF, DKIM, and DMARC are the three DNS-based authentication records that tell receiving mail servers your emails are legitimate. Without all three correctly configured, Gmail and Microsoft route a disproportionate share of cold email to spam - regardless of content quality or list hygiene. This guide explains each record, shows exact DNS syntax, and walks through DMARC policy progression.

By BounceZero Team |July 2026 |9 min read

1. SPF - Sender Policy Framework

SPF is a TXT record that lists which services are authorised to send email for your domain. Receiving servers check SPF before delivering - if the sending IP isn’t in your SPF record, the message may be marked as spam or rejected.

Google Workspace - add as TXT on @ (root domain)
v=spf1 include:_spf.google.com ~all
Microsoft 365 / Outlook - add as TXT on @ (root domain)
v=spf1 include:spf.protection.outlook.com ~all
SendGrid - add as TXT on @ (root domain)
v=spf1 include:sendgrid.net ~all
Multiple senders - add as TXT on @ (root domain)
v=spf1 include:_spf.google.com include:sendgrid.net ~all

Common SPF mistakes

  • › Using -all (hardfail) before testing - use ~all (softfail) until all senders are confirmed
  • › More than 10 DNS lookups in one SPF record (causes permerror)
  • › Duplicate TXT records for SPF - only one SPF record allowed per domain

2. DKIM - DomainKeys Identified Mail

DKIM attaches a cryptographic signature to every email you send. The receiving server looks up your public key in DNS and verifies the signature. If it passes, the email provably came from your domain and wasn’t tampered with in transit.

How to add DKIM

1

Generate the key pair

Your email provider (Google Workspace, Microsoft 365, Instantly, Smartlead) generates a private/public key pair. The private key stays on their servers; you publish the public key in DNS.

2

Add the TXT record

Record name: selector._domainkey.yourdomain.com - the selector is provided by your email service (usually “google”, “mail”, or a custom string). Record value: v=DKIM1; k=rsa; p=MIGf... (the public key from your provider).

3

Verify

Run: nslookup -type=TXT selector._domainkey.yourdomain.com - you should see your public key in the response. Most providers have a built-in verification button.

Verify DKIM from command line
# Replace "google" with your DKIM selector
# Replace "yourdomain.com" with your domain
nslookup -type=TXT google._domainkey.yourdomain.com

# Expected output includes something like:
# v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3...
# If you see "can't find", the record is not yet published

3. DMARC - Domain-based Message Authentication

DMARC tells receiving servers what to do when SPF or DKIM fail. It also instructs receiving servers to send you XML reports of who is sending email claiming to be from your domain - legitimate or not.

Policy DNS record What happens When to use
none (monitor) v=DMARC1; p=none; rua=mailto:[email protected] Reports sent; no action on failing mail First 30 days - collect data before enforcing
quarantine v=DMARC1; p=quarantine; rua=mailto:[email protected] Failing mail goes to spam folder Safe production setting for cold email domains
reject v=DMARC1; p=reject; rua=mailto:[email protected] Failing mail is blocked entirely Only when all legitimate sending is confirmed authenticated

DMARC DNS setup

Add a TXT record at _dmarc.yourdomain.com (not the root @). The rua address receives aggregate XML reports - use a dedicated mailbox or a service like Postmark DMARC Digests or Google DMARC Reporting.

Quick Authentication Checklist

SPF record published for your sending domain

nslookup -type=TXT yourdomain.com | grep spf

SPF includes your ESP (Google Workspace, M365, sending tool)

Check your ESP’s DKIM setup guide

DKIM key added to DNS for your sending domain

nslookup -type=TXT selector._domainkey.yourdomain.com

DMARC record published at _dmarc.yourdomain.com

nslookup -type=TXT _dmarc.yourdomain.com

DMARC policy is p=none or p=quarantine (not p=reject until tested)

Read rua reports after first send

Run a test via mail-tester.com before first send

Aim for 9/10 or 10/10 score

DMARC rua address is a monitored mailbox or service

Set up Postmark DMARC Digests (free)

Frequently Asked Questions

What is SPF and how do I set it up?

SPF is a DNS TXT record listing services authorised to send email for your domain. For Google Workspace: v=spf1 include:_spf.google.com ~all. For Microsoft 365: v=spf1 include:spf.protection.outlook.com ~all. Add at the root (@) of your domain. Use ~all not -all to avoid false positives if you add new senders later.

What is DKIM and why does it matter for cold email?

DKIM attaches a cryptographic signature to every email, proving it wasn’t tampered with in transit. Cold email without DKIM fails authentication checks at Gmail and Microsoft, significantly increasing spam placement. Your ESP generates the key pair - you publish the public key as a TXT record at selector._domainkey.yourdomain.com.

What DMARC policy should I use for cold email?

Start with p=none for 30 days to collect reports without blocking mail. Move to p=quarantine once you confirm all legitimate sends pass SPF and DKIM. Only advance to p=reject when fully confident no legitimate paths are failing authentication.

Authentication passes. Now verify your list.

SPF, DKIM, and DMARC prevent spoofing. BounceZero prevents bounces - removes invalid, disposable, and high-risk addresses before your first send. $3/1K. 100 free credits.

AL

Written by

Ayoub Lebda

Founder, BounceZero - Email-infrastructure engineer

Ayoub built BounceZero's 5-stage validation pipeline, its dedicated BGP-announced IP infrastructure, and the Patroni HA PostgreSQL cluster behind every verification. Previously built high-volume email delivery infrastructure. Trained at 1337 Benguerir (École 42 network, 2019). Open-source: bgp_analyzer.

Email verification & deliverability explained

Deep-dive guides on how email verification and inbox placement work