SPF, DKIM, and DMARC are not three generic DNS records you copy onto every cold email domain. SPF must include the systems that actually send mail. DKIM comes from each provider that signs mail. DMARC passes only when SPF or DKIM aligns with the domain people see in the From address.
For Google Workspace, that usually means one SPF TXT record, one generated DKIM TXT record, and one DMARC TXT record. Microsoft 365 uses a different SPF include and two generated DKIM CNAME records. Do not mix the two setups.
This guide shows the correct order: inspect, publish, activate, test, and hand off.
The setup checklist
Run these steps for every sending domain:
- List every system allowed to send from the domain.
- Check the DNS records that already exist.
- Build one SPF record from the active sender list.
- Generate DKIM inside Google, Microsoft, or the actual signing service.
- Publish the generated DKIM values and turn signing on.
- Send a test message to an external mailbox and inspect its headers.
- Publish DMARC in monitoring mode with aggregate reporting.
- Fix legitimate senders that fail authentication or alignment.
- Save the DNS results, message-header results, owner, and review date.
A provider dashboard saying “configured” is not enough. The final proof is an externally received message that shows the expected authentication and alignment results.
What SPF, DKIM, and DMARC do
| Record | Question it answers | What to verify | What it does not prove |
|---|---|---|---|
| SPF | Is this sending server authorized for the envelope domain? | spf=pass and the domain shown in smtp.mailfrom | That the visible From domain aligns |
| DKIM | Did a valid domain signature survive transit? | dkim=pass, the d= signing domain, and the s= selector | That the signer matches the visible From domain |
| DMARC | Does an authenticated SPF or DKIM domain align with the visible From domain? | dmarc=pass and the domain shown in header.from | Inbox placement, message quality, or sender reputation |
DMARC needs one aligned path:
- SPF passes and its envelope domain aligns with the visible From domain; or
- DKIM passes and its
d=domain aligns with the visible From domain.
You should configure both SPF and DKIM when the provider supports them. But one aligned pass is enough for DMARC.
Google Workspace vs Microsoft 365
The protocols are the same. The records and activation steps are not.
| Setup step | Google Workspace | Microsoft 365 |
|---|---|---|
| SPF when it is the only sender | v=spf1 include:_spf.google.com ~all | v=spf1 include:spf.protection.outlook.com -all for the commercial cloud |
| DKIM DNS record | One generated TXT record | Two generated CNAME records |
| Typical selectors | Google commonly suggests google, but use the generated value | Microsoft uses selector1 and selector2 with tenant-specific targets |
| Turn signing on | Start authentication in Google Admin after DNS resolves | Enable DKIM signing after both CNAMEs resolve |
| Final check | Send to an external mailbox and inspect the original message | Send outside the Microsoft tenant and inspect the headers |
Those SPF examples only work when that provider is the domain's only sender. If a website form, support desk, billing tool, or another platform also sends from the domain, build the record from the complete sender list.
Step 1: inspect DNS before changing it
Check the root domain, the provider's DKIM selector, and _dmarc before adding records:
dig TXT example.com +short
dig TXT SELECTOR._domainkey.example.com +short
dig CNAME SELECTOR._domainkey.example.com +short
dig TXT _dmarc.example.com +short
Replace example.com and SELECTOR with the real domain and the selector generated by the provider.
You are looking for:
- an existing SPF record that must be updated instead of duplicated;
- an old DKIM selector that may still be in use;
- a DMARC record already applied to the domain;
- a hostname or record type that does not match the provider instructions.
Confirm the authoritative DNS answer before changing anything. A missing result from one resolver can also mean you queried the wrong hostname or record type.
Step 2: publish one SPF record
RFC 7208 allows one SPF policy at each owner name. If two TXT records both start with v=spf1, SPF can return a permanent error.
Use this process:
- Read the current SPF record.
- Compare it with the active sender list.
- Remove services that no longer send mail.
- Add only the mechanisms documented by current senders.
- Publish one combined record.
- Test every sending path again.
SPF also limits evaluation to ten lookup-causing terms. An include: can trigger more lookups inside the referenced policy, so counting visible includes is not enough.
Google Workspace SPF
When Google Workspace is the only sender, Google's SPF setup guide documents:
v=spf1 include:_spf.google.com ~all
Add other services to this record only from their current documentation. Do not publish another SPF record beside it.
Microsoft 365 SPF
When commercial Microsoft 365 is the only sender, Microsoft's SPF guide documents:
v=spf1 include:spf.protection.outlook.com -all
Government and regional Microsoft clouds can use different values. Use the documentation for the tenant you are configuring.
Step 3: generate DKIM in the sending provider
Never copy a DKIM value from another domain or a tutorial. The DNS record contains or points to a public key that must match the private signing key held by the provider.
Google Workspace DKIM
Google's DKIM guide uses this workflow:
- Select the domain in Google Admin.
- Generate the DKIM record.
- Publish the exact TXT hostname and value Google provides.
- Return to Google Admin and start authentication.
- Send a message to an external recipient and inspect the result.
Save the selector Google generated. The common google selector is not a value you should assume.
Microsoft 365 DKIM
Microsoft's DKIM guide provides two CNAME targets for each custom domain. Publish both because Microsoft uses the two selectors for key rotation.
The target format changed for new custom domains in 2025, and older domains can still use the earlier format. Copy the exact targets from Microsoft Defender or the documented Exchange Online PowerShell output. Do not construct them from a blog example.
After both CNAMEs resolve, enable DKIM signing and send an external test message.
Step 4: add DMARC in monitoring mode
DMARC belongs at _dmarc.example.com. Start with aggregate reporting while you confirm every legitimate sender. A basic same-domain example is:
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com
Use a mailbox or reporting service that can process aggregate XML reports. If reports go to another domain, follow the external-report authorization requirements in the current standard and your reporting provider's documentation.
p=none means monitor. It does not mean finished. Use the reports to find:
- legitimate senders missing from the inventory;
- SPF passes that do not align with the visible From domain;
- DKIM signatures using an unexpected provider domain;
- retired systems that still send mail;
- unauthorized use of the domain.
Do not jump to p=reject because a setup screen recommends it. Move to quarantine or reject only after the legitimate mail flow is known and tested.
Important 2026 change: RFC 9989 replaced the older DMARC standard and removed the
pcttag. Current Google and Microsoft guides still showpct, but it is no longer a reliable cross-receiver rollout control. Use source inventory, aggregate reports, and staged domains instead.
RFC 9990 defines DMARC aggregate reporting. A receiver is not required to send every requested report, so an empty report inbox is not proof that authentication passes.
Step 5: verify an external message
Send one plain message through each authorized sending path to a mailbox outside the sending workspace or Microsoft tenant. Then open the original message or raw headers and find Authentication-Results.
A passing result looks roughly like this:
spf=pass smtp.mailfrom=mail.example.com
dkim=pass header.d=example.com header.s=provider-selector
dmarc=pass header.from=example.com
Record four values:
- the SPF result and
smtp.mailfromdomain; - the DKIM result,
d=domain, ands=selector; - the DMARC result and
header.fromdomain; - the sending path used for the test.
Repeat the check for every authorized system. A passing Google Workspace message does not validate a separate application sender.
Fix the failed layer
| Result | Most likely check | Next action |
|---|---|---|
spf=none | The envelope domain differs from the visible From domain | Query the domain shown in smtp.mailfrom |
spf=permerror | Duplicate records, invalid syntax, or too many lookups | Merge SPF records and trace the evaluated lookup path |
spf=pass, dmarc=fail | SPF passed for an unaligned bounce domain | Check whether aligned DKIM can provide the DMARC pass |
dkim=none | Signing is not enabled or the path does not sign | Turn signing on and send another external test |
dkim=fail | Wrong selector, hostname, value, or modified message | Query the selector shown in the message and compare it with provider output |
dkim=pass, dmarc=fail | The d= domain does not align with the visible From domain | Configure an aligned signing domain when the provider supports it |
dmarc=none | No applicable DMARC record was found | Query _dmarc for the exact From domain and its applicable parent policy |
| All three pass but mail is filtered | Authentication is not the problem | Investigate receiver response, list quality, complaints, content, and sending behavior separately |
Do not change all three records when one layer fails. Start with the failed result and the domain named in the header.
Save a handoff record
Campaign operations needs more than “DNS is done.” Save this for every sending domain:
Client and sending domain:
Mailbox provider and workspace/tenant:
DNS host and DNS owner:
Authorized sending paths:
- Provider:
- Envelope / Return-Path domain:
- Expected DKIM d= domain and selector:
SPF:
- Current DNS result:
- External header result:
DKIM:
- Record type and selector(s):
- Current DNS result:
- External header result:
DMARC:
- Current policy and report destination:
- External alignment result:
- Known exceptions:
Verified by and date:
Evidence location:
Launch status: ready / blocked
Next review trigger:
Do not place passwords, private keys, API keys, or customer-sensitive data in this record.
Review the domain after adding or removing a sender, changing providers, rotating DKIM keys, moving DNS, or changing DMARC policy.
Cheap Inboxes provides DNS, DKIM, DMARC, and forwarding management workflows. The developer overview shows the current public product and API surface. Regardless of who manages the DNS, keep the external header result in the handoff.
The launch rule
A sending domain is ready when every authorized path has current DNS evidence, an external message-header result, a named owner, and a review trigger.
The records existing is not the finish line. The right records must authenticate the right mail for the right From domain—and the next operator must be able to prove it.
Sources
Official and primary sources reviewed on 2026-07-21:
- RFC 7208: Sender Policy Framework
- RFC 6376: DomainKeys Identified Mail
- RFC 8301: DKIM cryptographic algorithm and key usage update
- RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance
- RFC 9990: DMARC aggregate reporting
- Google Workspace: Set up SPF
- Google Workspace: Set up DKIM
- Google Workspace: Set up DMARC
- Microsoft 365: Set up SPF
- Microsoft 365: Set up DKIM
- Microsoft 365: Set up DMARC
- Cheap Inboxes developer overview
- Cheap Inboxes public API documentation
