Authentication · How-to
How to set up SPF, DKIM and DMARC for cold email (with example records)
By PipeRoad team · · 6 min read
To authenticate a cold email domain, publish three DNS TXT records: one SPF record listing the services allowed to send for the domain, a DKIM public key generated by your mail provider, and a DMARC record at _dmarc starting with p=none. Then send a test to Gmail and check "Show original": SPF, DKIM and DMARC should all say PASS before you warm up or send a single campaign.
This guide uses Google Workspace as the example, because it's the most common setup for cold email inboxes. The logic is identical for Microsoft 365; only the values change. Replace example.com with your sending domain.
What do Gmail, Yahoo and Outlook require?
| Provider | Who it applies to | Requirement |
|---|---|---|
| Gmail | Bulk senders (close to 5,000+ messages/day to personal Gmail) | SPF and DKIM, plus a DMARC record; spam rate kept under 0.1%, never 0.3% |
| Yahoo | All senders | SPF or DKIM at minimum; spam rate below 0.3% |
| Yahoo | Bulk senders | SPF and DKIM, DMARC at least p=none, From domain aligned |
| Outlook.com | Domains sending 5,000+/day | SPF and DKIM pass; DMARC at least p=none, aligned with SPF or DKIM (effective May 5, 2025) |
Your cold domain probably sends far less than 5,000 a day. Set everything up anyway. Google counts all messages from the same primary domain toward that threshold, and authenticated mail is simply treated better at any volume.
What do SPF, DKIM and DMARC actually do?
- SPF (Sender Policy Framework) publishes which servers may send mail for your domain.
- DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each email, which receivers check against a public key in your DNS.
- DMARC tells receivers what to do when a message fails, requires that SPF or DKIM pass for the same domain shown in the From address (alignment), and sends you reports.
Step 1: Add the SPF record
Create one TXT record on the root of the domain (host @). For Google Workspace, Google's help center gives this value (Set up SPF):
Host: @
Type: TXT
Value: v=spf1 include:_spf.google.com ~all
Rules that trip people up:
- Only one SPF record per domain. Two
v=spf1records break SPF. Merge them into one. - Max 10 DNS lookups. The SPF spec requires evaluators to stop at 10 lookup terms (
include,a,mx,ptr,exists,redirect) and return an error. On a dedicated cold domain, you rarely need more than your mail provider. - Don't add your sequencer's include unless its docs tell you to. Tools like Instantly or Smartlead usually send through your Google or Microsoft inbox, so the provider's include is what covers them.
Step 2: Turn on DKIM
In Google Workspace, DKIM is generated in the Admin console under Apps → Google Workspace → Gmail → Authenticate email (Google's DKIM guide). Choose the domain, generate a key (Google recommends 2048-bit if your DNS host supports it), and Google shows you a record like this:
Host: google._domainkey
Type: TXT
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqh...(long key)...IDAQAB
Publish it exactly as shown, wait for DNS to update (Google says DKIM can take up to 48 hours to start working), then go back to the Admin console and click Start authentication. Skipping that last click is the most common reason DKIM "doesn't work": the key is in DNS but Gmail isn't signing with it yet.
Step 3: Publish a DMARC record
Create a TXT record on the _dmarc subdomain. Start in monitoring mode (Google's DMARC guide):
Host: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; adkim=r; aspf=r
| Tag | Meaning | Start with |
|---|---|---|
p | Policy for failing mail: none, quarantine, reject | none |
rua | Where aggregate reports are sent | An inbox you'll read, or a DMARC report tool |
adkim / aspf | Alignment strictness: r (relaxed) or s (strict) | r (relaxed; Yahoo says relaxed is acceptable) |
pct | Share of mail the policy applies to | Leave out (defaults to 100) |
Tag definitions per RFC 7489.
After a few weeks of clean reports showing your real mail passing, you can tighten to p=quarantine. There's no prize for jumping to reject on day one of a new cold domain.
Step 4: Add MX records so replies arrive
It sounds obvious, but cold domains are often set up for sending and forgotten for receiving. Add your provider's MX records (Google Workspace shows them during domain setup). A reply that bounces is a lost lead, and a domain that can't receive mail looks suspicious.
Step 5: Verify that all three pass
- Send a plain email from the new inbox to a different Gmail account you control. (Google notes you can't verify DKIM by emailing yourself.)
- Open it, click the three-dot menu, choose Show original.
- Check the summary at the top:
SPF: PASS,DKIM: PASS,DMARC: PASS. - Confirm the DKIM line shows
d=example.com(your domain), not your tool's or provider's. - Repeat for an Outlook.com address if you'll email many Microsoft users.
What does a complete cold domain look like?
Here is the full record set for one Google Workspace sending domain, so you can check yours line by line:
| Host | Type | Purpose |
|---|---|---|
@ | MX | Google Workspace mail servers, so replies arrive |
@ | TXT | SPF: v=spf1 include:_spf.google.com ~all |
google._domainkey | TXT | DKIM public key from the Admin console |
_dmarc | TXT | DMARC: v=DMARC1; p=none; rua=mailto:… |
@ or www | A / CNAME / redirect | A simple site or redirect to your main site |
| Tracking subdomain (optional) | CNAME | Custom tracking domain, if your sequencer supports one |
Repeat this set for every sending domain. If you manage several, keep a simple spreadsheet with one row per domain and a "Show original: PASS" column you re-check after any DNS change.
Common mistakes checklist
- Two SPF records on the same domain.
- SPF ends in
+all(allows anyone to send as you). Use~allor-all. - DKIM key published, but "Start authentication" never clicked.
- DMARC record placed on
@instead of_dmarc. - Records added at the registrar while the domain's DNS is actually hosted elsewhere.
- Sending domain authenticated, but a tracking or link domain shared with other senders.
- Only the first domain set up; spare domains left unauthenticated.
What comes after authentication?
Authentication makes you eligible for the inbox; it doesn't guarantee it. Next, warm the domain up slowly (our warmup guide has a 4-week schedule), and if mail still lands in spam, work through the 10 spam checks.
Doing this for three to six domains is the least fun part of cold email, and it's a big part of why PipeRoad exists. We're pre-launch; the plan is that you send from our pre-authenticated, pre-warmed pool instead of configuring DNS yourself. If you prefer owning your domains, the five steps above are all you need.
FAQ
Do I need SPF, DKIM and DMARC for cold email?
Yes. Google requires all bulk senders to use SPF and DKIM and to publish DMARC, Yahoo requires bulk senders to do the same, and Microsoft requires it for high-volume senders to Outlook.com. Even below those thresholds, unauthenticated mail is far more likely to be filtered.
What DMARC policy should a cold email domain use?
Start with p=none and a reporting address so you can see results without blocking anything. That meets the minimum Yahoo and Microsoft describe. Once reports show your legitimate mail passing consistently, you can move to quarantine.
Can a domain have two SPF records?
No. A domain should publish exactly one SPF TXT record. If you use several services, combine them into one record with multiple include: entries, and stay within the 10-lookup limit.
How long do DNS changes take to work?
Often minutes, sometimes longer depending on your DNS host and the record's TTL. Google notes that DKIM authentication can take up to 48 hours to start after you add the record. Re-test with Show original before you start warmup.
Do I need these records on every sending domain?
Yes. Authentication is per domain. Every domain you send from needs its own SPF, DKIM and DMARC records, and its own MX records so replies arrive.