SPF, DKIM, and DMARC work together to authenticate business email and reduce the risk of spoofing. This reusable setup guide explains what each record does, how to publish the records in DNS, how to move from monitoring to enforcement, and what to check when delivery or alignment fails.
Overview
Email authentication is configured at the domain level, usually by adding DNS records supplied by your email or sending provider. The three standards have different jobs:
| Standard | DNS record | What it verifies | Primary setup task |
|---|---|---|---|
| SPF | TXT at the domain root | Whether a sending server is authorized to send for the domain | List the provider's approved sending services in one SPF record |
| DKIM | TXT or CNAME at a selector hostname | Whether a message carries a valid cryptographic signature | Publish the provider's public key or delegation record |
| DMARC | TXT at _dmarc | Whether SPF or DKIM passes and aligns with the visible From domain | Choose a policy and optionally receive aggregate or forensic reports |
These records do not replace one another. SPF authorizes infrastructure, DKIM signs messages, and DMARC tells receiving systems how to evaluate authentication results in relation to the address users see in the From field. A domain can have valid SPF and DKIM while still failing DMARC alignment if the authenticated domain does not match the visible From domain closely enough for the configured policy.
Before changing records, inventory every legitimate sender: employee mail, customer-support platforms, contact-form notifications, newsletters, invoicing systems, marketing automation, monitoring alerts, and applications hosted on your cloud infrastructure. For background on TXT, MX, CNAME, and other DNS records, see DNS Records Explained: A Practical Guide.
Checklist by scenario
For a new business email domain
- Confirm which service handles mailbox delivery and which services send messages on behalf of the domain.
- Open the authoritative DNS provider for the domain. If the registrar and DNS host differ, make changes at the authoritative DNS host.
- Ask the mail provider for its current SPF include, DKIM selector, and DKIM key or CNAME instructions. Do not guess provider-specific values.
- Publish one SPF TXT record at the root, commonly represented by
@. A generic pattern may look likev=spf1 include:provider.example ~all, but the provider's documented value takes precedence. - Publish DKIM exactly as supplied. A typical TXT format is
selector1._domainkey.example.comwith a value beginningv=DKIM1;. Some providers use a CNAME instead of a TXT public key. - Publish an initial DMARC record at
_dmarc.example.com, such asv=DMARC1; p=none; rua=mailto:[email protected]. - Send test messages to several monitored mailboxes and verify the Authentication-Results headers for SPF, DKIM, and DMARC.
When adding a new sending platform
- Record the platform name, purpose, sending domain, return-path or envelope-from domain, DKIM selector, and authorized SPF mechanism.
- Check whether the platform sends from the main domain or a dedicated subdomain such as
news.example.comormail.example.com. - Merge the new SPF authorization into the existing SPF record rather than creating a second record.
- Publish the platform's DKIM record and complete any verification step in its control panel.
- Confirm that the platform's DKIM signing domain or SPF return-path aligns with the domain in the visible From address.
- Test both normal delivery and a representative reply, bounce, unsubscribe, or notification flow if the platform supports those messages.
When moving email providers or DNS hosts
- Export or document existing MX, SPF, DKIM, and DMARC records before the change.
- Keep the old provider's sending authorization temporarily if legitimate messages may still originate there during the transition.
- Publish and verify the new provider's DKIM records before switching production traffic.
- Change MX records separately from website records unless the migration plan requires otherwise. Website A, AAAA, and CNAME records should not be removed as part of an email-only change.
- Review DMARC reports after the transition, then remove obsolete SPF mechanisms and old DKIM records when they are no longer needed.
If a domain or hosting migration is also involved, use a separate change plan. The website hosting migration checklist and domain transfer checklist can help keep DNS responsibilities clear.
DMARC policy progression
DMARC policy should reflect what you know about legitimate sending sources. A cautious progression is:
- Monitor: start with
p=noneand collect aggregate reports. This observes failures without asking receivers to reject or quarantine them. - Quarantine: after investigating expected senders, use
p=quarantineto request that failing messages receive suspicious treatment. - Reject: when legitimate sources pass and align consistently, use
p=rejectto request rejection of messages that fail DMARC.
A basic monitoring record is:
Host: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:[email protected]
Use a reporting mailbox that is monitored and suitable for the volume of reports. Reports can contain information about sending sources and should be handled as operational data. If you use an external reporting service or a reporting address on another domain, follow that service's verification requirements.
What to double-check
- There is only one SPF record. Multiple SPF TXT records at the same domain are not a safe way to combine senders. Consolidate mechanisms into one provider-approved record.
- Every sender is accounted for. Search application settings, SMTP credentials, website forms, billing tools, CRM automations, and scheduled jobs. A cloud-hosted website can send mail even when its main mailbox provider does not.
- DKIM is published at the exact selector. Selector names are case-sensitive in practice for troubleshooting purposes, and an extra domain suffix or missing label can make the key invisible to receivers.
- Alignment is tested, not assumed. Inspect the message headers for the visible From domain, DKIM
d=domain, SPF authenticated domain, and DMARC result. - DNS values are entered without accidental formatting. Remove quotation marks added by a dashboard if the dashboard does not require them, avoid line breaks inside a value, and follow the host's method for long TXT records.
- Propagation is allowed for. A correct record may not appear everywhere immediately because DNS caches honor the record's TTL. Confirm the authoritative answer first, then test from more than one resolver.
- Website and email records remain separate. Do not replace A, AAAA, or CNAME records while editing TXT or MX records. For HTTPS changes, see the SSL and HTTPS setup guide.
Troubleshooting workflow
- Capture the complete headers from a delivered or rejected message.
- Identify the actual sending service and the domains shown in SPF, DKIM, and DMARC results.
- Query public DNS for the SPF root record, the DKIM selector, and
_dmarc. - Compare the published values with the provider's current setup screen, paying attention to a changed selector or newly added sending service.
- Check alignment between the visible From domain and the authenticated domains.
- Correct one issue at a time, send a new test, and document the result before changing the DMARC policy.
Common mistakes
- Creating several SPF records: combine authorized services into one record instead of adding a new TXT record for each provider.
- Publishing a sample value unchanged: examples such as
include:provider.exampleare placeholders. Use the exact value supplied for your account. - Protecting only the main mailbox provider: forgotten website forms, ticketing systems, and marketing tools often become the source of DMARC failures.
- Enforcing reject immediately: move through monitoring and investigation first, especially when several teams or applications send mail.
- Confusing authentication with reputation: passing SPF, DKIM, and DMARC does not guarantee inbox placement. It confirms identity and policy alignment; content, recipient engagement, sending practices, and provider-specific filtering also affect delivery.
- Ignoring subdomains: review whether separate subdomains send mail and whether your DMARC policy should apply to them. Provider-specific tags and inheritance behavior should be checked against current documentation before use.
- Leaving former providers authorized forever: remove unused SPF mechanisms and DKIM keys after confirming that no legitimate workflow depends on them.
When to revisit
Make email authentication part of the domain and website operations calendar rather than a one-time launch task. Recheck SPF, DKIM, and DMARC before seasonal planning cycles, after a mail or marketing platform changes, during a domain transfer, after a website migration, and whenever a new application is permitted to send as the business.
At least quarterly, review DMARC aggregate reports or the equivalent monitoring dashboard. Look for unknown sending sources, sudden volume changes, new alignment failures, expired provider configurations, and legitimate systems that still rely on an old sender. Keep a short inventory containing each sender, owner, purpose, SPF requirement, DKIM selector, From domain, and last verification date.
Use this final action list for the next audit:
- List every legitimate sending system and its responsible owner.
- Confirm one valid SPF record and remove obsolete authorization.
- Verify DKIM for each active sender using a real message header.
- Review DMARC reports for unknown sources and alignment failures.
- Keep
p=nonewhile investigating unresolved legitimate traffic, then consider quarantine or reject when evidence supports the change. - Record the DNS changes, test results, date, and next review date.
For broader domain operations, pair this audit with a DNS record review and the business website launch preflight checklist. Keeping email authentication, website DNS, SSL, and hosting changes in one documented operating process makes future launches and provider changes easier to verify.