If you run IT for a small company, your email almost certainly lives in Microsoft 365 or Google Workspace. Both of them will happily send mail for your domain on day one, and both leave the authentication work to you. SPF, DKIM and DMARC are three DNS changes that decide whether Gmail and Outlook trust mail from your domain, and whether anyone can pretend to be you.
Here is the order I do them in, the exact records, and the checks that tell you each step worked. Do it in this order: SPF, DKIM, then DMARC. Google says the same thing: DMARC does not work until SPF or DKIM is in place, and it suggests waiting 48 hours after setting those up before you publish a DMARC record.
Step 1: SPF
SPF is a TXT record at your domain that lists who may send mail for it. You get one SPF record per domain. Two records is an error, and one of the more common ones.
Microsoft 365. Microsoft has no admin portal for SPF. You create the record at your DNS host. If Microsoft 365 is your only mail source:
example.com. IN TXT "v=spf1 include:spf.protection.outlook.com -all"
If an on-premises Exchange server also sends, add its public IP before the include, for example ip4:192.0.2.10. Microsoft recommends -all (hard fail) for Microsoft 365 domains, in combination with DKIM and DMARC.
Google Workspace. Google’s documented record is:
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
Google’s page uses ~all in its example. Whether you tighten that to -all is a judgment call once you are confident you have found every sender.
The part that bites people: lookups. SPF evaluation stops at 10 DNS-querying terms (include, a, mx, exists, redirect). RFC 7208 says that if you exceed the limit the result is a permerror, and the message fails SPF. Every SaaS tool you add with its own include: spends from that budget. Microsoft’s guidance is to move third-party senders to subdomains, which each get their own budget, and not to flatten spf.protection.outlook.com, since the underlying IPs change often. If your record is already misbehaving, Why Your SPF Record Is Breaking covers the diagnosis.
Check it:
dig +short TXT example.com
You should see exactly one v=spf1 line.
Step 2: DKIM
DKIM signs outgoing mail with a key; the public half lives in DNS. DMARC passes on DKIM only when the signing domain (d=) aligns with your From domain, so you want your own domain signing, not the provider’s default.
Microsoft 365. DKIM here uses two CNAME records, not a TXT record, because Microsoft manages the keys. The targets depend on your tenant, so do not build them by hand. Connect to Exchange Online PowerShell and ask for them:
Get-DkimSigningConfig -Identity example.com | Format-List Selector1CNAME,Selector2CNAME
If the domain is not listed, create the config first, disabled:
New-DkimSigningConfig -DomainName example.com -Enabled $false
Create both CNAMEs at your DNS host (selector1._domainkey and selector2._domainkey) with the values it returned, then enable signing after they propagate:
Set-DkimSigningConfig -Identity example.com -Enabled $true
Get-DkimSigningConfig -Identity example.com | Format-List Name,Enabled,Status
You want Enabled: True and Status: Valid. Microsoft’s notes worth remembering: DNS hosts such as GoDaddy, Cloudflare and Azure append the zone automatically, so enter only selector1._domainkey; on Cloudflare set the records to DNS only (the grey cloud), or verification fails; use a TTL of at least 3600 seconds. If the enable command errors, check for typos, wait a while, and retry.
Google Workspace. In the Admin console, go to Apps > Google Workspace > Gmail > Authenticate email, pick the domain, and click Generate New Record. Google recommends a 2048-bit key if your DNS host accepts a record that long (some hosts cap TXT length), with the default selector google. Add the TXT record it gives you:
google._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
Then click Start authentication in the console. If Gmail was only just turned on for the domain, Google says to wait 24 to 72 hours before generating the key, and DKIM can take up to 48 hours to start working.
Check it by sending a message to a Gmail account that is not your own, since sending to yourself does not verify DKIM. Open the original message and look for dkim=pass in the Authentication-Results header.
Step 3: DMARC, starting in monitor mode
With SPF and DKIM working, publish DMARC. Start at p=none, which asks receivers to take no action but to send you reports:
_dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
Google recommends always including rua= and pointing it at a dedicated mailbox, group or reporting service, not your own inbox, because reports arrive in volume. That is the job of a DMARC monitoring tool. Whether you use MonitorDMARC or another one, you need somewhere to send them.
Add the third-party senders next. Your CRM, helpdesk, marketing platform and invoicing system all send as your domain, and each needs its own SPF include or custom-domain DKIM. This is where most people discover the sender nobody told them about. Watching the first reports is how you find them, and How to Read DMARC Reports shows what you are looking at.
Doing it by hand, and when to stop
You can do all of this with the raw XML reports and a spreadsheet. A few people do, and they are the ones who tell me it is a part-time job. The reports arrive daily from every receiver, each is a zipped file, and you need to correlate IPs to services to know whether a failure is a problem or a stranger.
If you would rather not, MonitorDMARC reads the reports for you, shows who is sending as your domain and what is failing, and alerts you when your SPF, DKIM, DMARC or BIMI records change. The setup guide takes you from signup to first report, and Use MonitorDMARC Alerts to Reach p=reject covers the path after that. There is a 14-day free trial, no credit card needed, with 2 domains.
When you have a clean week of reports, the next step is enforcement. The DMARC Enforcement Journey takes you from p=none to p=reject without breaking invoices.
