How to set up SPF, DKIM and DMARC for cold email domains
Every domain you send cold email from needs three DNS records: an SPF record that lists the servers allowed to send for the domain, a DKIM key that lets receivers check the signature your mailbox provider adds, and a DMARC record that tells receivers what to do with mail that fails both. Publish SPF and DKIM first, wait 48 hours, then add DMARC with a policy of p=none and a reporting address, and finish all of it before warmup starts. Google requires SPF or DKIM from everyone who sends to personal Gmail accounts, and all three from senders of more than 5,000 messages a day.
The steps follow Google Workspace and Microsoft Learn documentation, the Gmail sender guidelines and RFC 7489, which defines DMARC. In the examples, example.com is the main domain and example.net is a secondary domain bought for cold email.
1Give cold email its own domain
Keep cold email off the domain your customers, investors and invoices use. Microsoft's guidance for email sent through services outside your direct control is to use a separate subdomain, so that problems with that mail do not hurt the reputation of mail your team sends from the main domain. Most cold email teams go a step further and buy separate secondary domains that look like the brand.
Each domain or subdomain needs its own records. Google says each domain must have its own SPF record and its own DKIM key, and Microsoft notes that a parent domain's SPF record does not cover its subdomains. Five cold email domains means repeating every step five times.
2List every service that sends from the domain
SPF only works if it names every source of mail. Google's first setup step is to identify all senders for the domain, including any third party that sends on your behalf. A cold email domain usually has a short list. The mailboxes live in Google Workspace or Microsoft 365, and a sending tool such as Instantly or Smartlead connects to those mailboxes. In that setup the mail still leaves through the mailbox provider, so the provider's SPF value covers it. If any tool on the domain sends through its own servers instead, its documentation will give you an extra include: value to add.
3Publish one SPF record
SPF is a TXT record at the root of the domain. At most DNS hosts you enter @ as the host name. The value starts with v=spf1, lists the allowed senders, and ends with a rule for everyone else.
| Setup | SPF value |
|---|---|
| Google Workspace only | v=spf1 include:_spf.google.com ~all |
| Microsoft 365 only | v=spf1 include:spf.protection.outlook.com -all |
| Both providers on one domain | v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all |
Google recommends ending with ~all, which asks receivers to mark mail from unlisted servers as spam. Microsoft recommends -all, which asks them to reject it, so that DMARC can act on SPF failures more reliably.
Three rules from Microsoft's documentation catch people out:
- One SPF record per domain. Two SPF TXT records on the same name cause a permanent error, and receivers cannot tell which one to read. Edit the existing record instead of adding a second one.
- Stay under 10 DNS lookups. Each
include:costs at least one lookup, and nested includes cost more. Past 10 lookups, SPF fails with a permanent error and the message can bounce. - Use a TTL of at least 3600 seconds (one hour) to avoid lookup timeouts.
Google says SPF can take up to 48 hours to start working after you publish it.
4Turn on DKIM
DKIM adds a signature to every message. The private key stays with the mail server, and the public key goes in DNS so receivers can check the signature.
On Google Workspace, a super administrator opens the Admin console and goes to Apps, then Google Workspace, then Gmail, then Authenticate email. Pick the domain, click Generate New Record, choose a 2048 bit key if your DNS host supports it, and keep the default prefix selector google. Google notes that after you turn on Gmail for a new domain you may need to wait 24 to 72 hours before the key can be generated. The Admin console then shows a host name and a value. Add them as a TXT record:
- Host:
google._domainkey - Value:
v=DKIM1; k=rsa; p=YOURPUBLICKEY(the real key is a long string copied from the Admin console)
Google allows up to 48 hours for the key to start working. Then return to the same page and click Start authentication. Gmail requires DKIM keys of at least 1024 bits for mail to personal Gmail accounts and recommends 2048.
On Microsoft 365, DKIM uses two CNAME records instead of a TXT record. The host names are the same for every organization, selector1._domainkey and selector2._domainkey. Each one points to a value Microsoft generates for your domain, which you copy from the Microsoft Defender portal. Microsoft says the values in its articles are illustrations only. Only one selector signs at a time, and the second is used after a key rotation. Once both CNAME records resolve, turn on DKIM signing for the domain in the Defender portal.
To confirm DKIM works, send a message to a Gmail or Google Workspace address you can open. Google notes you cannot verify it by mailing yourself. In Gmail, open the message, choose Show original, and look for a DKIM pass in the authentication results section of the header.
5Publish DMARC at p=none
DMARC tells receivers what to do with mail that fails SPF and DKIM, and it sends you reports about who is sending as your domain. Google says to let SPF and DKIM authenticate mail for at least 48 hours before you turn DMARC on.
The record is a TXT record on the host _dmarc. A safe first record for a cold email domain looks like this:
- Host:
_dmarc(some DNS hosts want_dmarc.example.net) - Value:
v=DMARC1; p=none; rua=mailto:[email protected]
What each part does, per Google's documentation and RFC 7489:
| Tag | What it does |
|---|---|
| v and p | are required and must come first. p=none takes no action on failing mail and only produces reports. p=quarantine asks receivers to send failing mail to spam, and p=reject asks them to refuse it. |
| rua | is where aggregate reports go. RFC 7489 sets the default report interval at 86400 seconds, so expect one report a day from each receiver that sends them. Google recommends a dedicated mailbox or group instead of a personal inbox, because volume can climb. |
| pct | is the share of failing mail the policy applies to. The default is 100. |
| sp | sets a separate policy for subdomains. Without it, subdomains inherit the main policy. |
| adkim and aspf | set alignment. Both default to relaxed, which Google says typically gives enough protection. Strict alignment can push mail from related subdomains into spam or rejection. |
One detail matters when you run several cold email domains. If the rua address sits on a different domain from the one publishing the record, for example reports for example.net sent to a mailbox at example.com, the receiving domain must publish an extra DNS record that authorizes those reports. RFC 7489 describes this in section 7.1, and Google's DMARC reports page explains how to add it. The simplest option is a report address on the same domain, or a DMARC reporting service that gives you the exact record to publish.
6Line up the From address with SPF or DKIM
Passing SPF or DKIM is not enough on its own. To pass DMARC, the domain that passed has to match the domain in the visible From address. Google's sender guidelines make this alignment a requirement for anyone sending more than 5,000 messages a day to Gmail accounts.
This usually takes care of itself when [email protected] sends through Google or Microsoft with DKIM turned on for example.net. It breaks when the DKIM signature uses another domain, for example because DKIM was never set up for yours. Check the authentication results in the header of a test message and confirm the DKIM domain matches the From domain.
7Tighten the policy after the reports look clean
Microsoft recommends a gradual rollout: start at p=none, move to p=quarantine, then to p=reject, and watch the reports at each stage. It suggests raising pct in steps of 10, 25, 50, 75 and 100 when you move to a stricter policy. Google's guidance is the same in shape: start with none and move to quarantine or reject as you learn how receivers see your mail.
On a cold email domain the reports are usually short, because only one or two services send from it. Once they show your mailbox provider passing and nothing unexpected, a stricter policy protects the domain from spoofing. Google's bulk sender rules accept none, so moving further is a protection choice. Microsoft routes outbound mail that fails DMARC through its high risk delivery pool when the policy is quarantine or reject, which is one more reason to fix any failures the reports show before you tighten.
8Check every domain before warmup
Instantly's Email Accounts dashboard has a Test Domain Setup button that checks MX, SPF, DKIM and DMARC. Smartlead's API guide says to set up all three records before turning warmup on, because missing records hurt deliverability however well an inbox is warmed. Free DNS lookup tools work too.
When the records pass, the next step is warmup. Our guide to warming up new inboxes, day by day picks up from here.
A complete example for one cold email domain
Here is the full set for example.net with mailboxes on Google Workspace:
| Record | Type and host | Value |
|---|---|---|
| SPF | TXT on @ | v=spf1 include:_spf.google.com ~all |
| DKIM | TXT on google._domainkey | v=DKIM1; k=rsa; p=YOURPUBLICKEY |
| DMARC | TXT on _dmarc | v=DMARC1; p=none; rua=mailto:[email protected] |
| MX | the mail records Google gives you for the domain | so replies and DMARC reports can arrive |
Common mistakes
- Adding a second SPF record for a new tool instead of editing the first. Merge every
include:into one record. - Copying a DKIM value from an example. It has to come from your own Admin console or Defender portal.
- Starting DMARC at reject on day one. Begin at
none, read the reports, then tighten.
FAQ
- Is DMARC needed below 5,000 emails a day?
- Google requires SPF or DKIM from every sender and adds DMARC as a requirement above 5,000 messages a day. Google still recommends all three for every domain, and the reports are the only way to see who is sending as your domain.
- How long does the whole setup take?
- Plan for about four days per domain. Google allows up to 48 hours for SPF and DKIM to start working, asks for 48 hours of authenticated mail before DMARC, and a new Workspace domain may need 24 to 72 hours before a DKIM key can be generated.
If you are setting up a set of cold email domains and want a second pair of eyes on the records before warmup starts, book a free working session and we can check them together.
Sources
- Set up SPF, Google Workspace Admin Help, checked 2026-11-20
- Set up DKIM, Google Workspace Admin Help, checked 2026-11-20
- Set up DMARC, Google Workspace Admin Help, checked 2026-11-20
- Email sender guidelines, Google, checked 2026-11-20
- Set up SPF to identify valid email sources for your Microsoft 365 domain, Microsoft Learn, checked 2026-11-20
- How to use DKIM for email in your custom domain, Microsoft Learn, checked 2026-11-20
- Set up DMARC to validate email in Microsoft 365, Microsoft Learn, checked 2026-11-20
- RFC 7489: Domain based Message Authentication, Reporting, and Conformance (DMARC), IETF, checked 2026-11-20
- When your email account is ready for campaigns, Instantly, checked 2026-11-20
- Email warmup guide, Smartlead, checked 2026-11-20