SPF, DKIM, and DMARC work together to show receiving mail systems that your messages are authorized and have not been altered or impersonated. This step-by-step guide explains how to inventory your senders, publish the right DNS records, verify alignment, monitor results, and tighten your policy safely over time.
Overview
Email authentication is a DNS and domain-management task, but the most important work happens before you add any record. First identify every system that sends mail using your domain. This may include a normal mailbox provider, a website or WordPress contact form, a newsletter platform, a help desk, an ecommerce application, a customer relationship system, and transactional services such as password-reset or order notifications.
SPF, DKIM, and DMARC have different jobs:
- SPF publishes the servers or services allowed to send mail for your domain.
- DKIM adds a cryptographic signature to outgoing messages. The receiving system uses a public key in DNS to check that signature.
- DMARC tells receiving systems how to handle messages that fail authentication and provides a way to receive reports. It also checks alignment between the authenticated domain and the visible From domain.
These records are usually added where your domain's authoritative DNS is managed, not necessarily where your website is hosted. If you are unsure, review the domain's nameserver settings or use the DNS records guide before editing anything. Save a copy of the existing zone and note the time of each change.
What to track
1. Build a sender inventory
Create a simple table with the sender, purpose, provider instructions, sending domain, SPF requirement, DKIM selector, and owner. Do not assume that your website and mailbox provider are the only senders. A contact form plugin, hosting control panel, or application may send directly even if you normally use a separate email platform.
For each service, confirm whether it supports custom-domain DKIM signing and whether its SPF include value is required. Use the provider's current setup screen or documentation for the exact hostname and value. Provider-specific values change, so copying an example from another domain can produce an invalid record.
2. Track the SPF record
An SPF record is a TXT record at the domain root, commonly shown as @ in a DNS dashboard. A simplified example is:
v=spf1 include:mail.example.net ~all
This is only a format example. Replace the include value with one supplied by your sending provider. If you authorize a second service, it may be added to the same SPF record:
v=spf1 include:mail.example.net include:news.example.org ~all
Publish one SPF policy for the domain. Creating separate TXT records that each begin with v=spf1 can cause SPF evaluation to fail. Keep a record of every authorized service, including senders that are temporarily inactive.
3. Track DKIM selectors and keys
Your provider normally generates a selector and a public key. The selector is part of the DNS hostname, often in a pattern such as:
selector1._domainkey.example.com
Add the record type and value exactly as instructed. Some providers use a TXT record containing a long key; others use a CNAME that points to a provider-controlled key. Do not add quotation marks unless your DNS interface requires them, and do not insert spaces or line breaks into a key unless the provider explicitly shows them.
Keep a list of active selectors. Multiple selectors can exist during a provider change or key rotation, but a retired selector should eventually be removed only after you are confident that no active messages depend on it.
4. Track DMARC policy and reports
DMARC is published as a TXT record at _dmarc. A cautious monitoring example is:
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com
The p=none setting requests reporting without asking receivers to quarantine or reject failing messages. It is useful while you discover legitimate senders and correct alignment problems. A stricter policy can be considered after reviewing results:
v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com
or:
v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com
Only use a stronger policy when you understand the effect on every legitimate sender. Reports can contain sensitive operational information, so use a monitored mailbox or a reporting service that your organization has approved.
Cadence and checkpoints
DNS changes may not appear everywhere immediately. After publishing a record, allow time for DNS caching and then verify it from an independent lookup tool or your email provider's authentication screen. Also send controlled test messages to mailboxes you manage and inspect the message headers for SPF, DKIM, and DMARC results.
Use this initial checkpoint sequence:
- Confirm that there is one SPF record at the root domain.
- Check that every active sender is represented in the SPF configuration or uses DKIM with the required domain setup.
- Verify that each provider's DKIM selector resolves and that the public key is complete.
- Confirm that the DMARC record is located at
_dmarc.example.com, not at the root domain. - Send a test from each important service and inspect authentication results.
- Record the date, DNS values, test recipient, and result in your change log.
Review authentication reports monthly while a domain is being configured or whenever a new sender is added. Once the sending environment is stable, a quarterly review is a practical minimum. A larger organization or a domain used for important customer communications may choose a more frequent review.
Pair this process with a broader domain transfer checklist before changing registrars, nameservers, or email providers. Moving DNS without copying authentication records can interrupt delivery even when the website remains online.
How to interpret changes
Authentication results should be read in context. A message can pass SPF or DKIM and still fail DMARC if the authenticated domain does not align with the domain shown in the From address. Conversely, a new sending service may be legitimate but appear as an unexpected source until its configuration is documented.
| Symptom | Likely cause | Practical check |
|---|---|---|
| SPF fails | The sender is missing, the record is malformed, or more than one SPF policy exists. | Find all root TXT records beginning with v=spf1, then compare authorized services with your sender inventory. |
| DKIM fails | The selector is wrong, the key is incomplete, or the provider is not signing the message. | Compare the selector in the message header with the DNS hostname and check the provider's DKIM status. |
| DMARC fails while SPF passes | SPF passed for a domain that does not align with the visible From domain. | Inspect the SPF-authenticated domain and compare it with the From domain. |
| DMARC fails while DKIM passes | The DKIM signature uses a different, non-aligned domain. | Check the signing domain in the DKIM header and enable custom-domain signing if the provider supports it. |
| Legitimate mail is quarantined or rejected | A sender was missed before the DMARC policy became strict. | Review reports and message headers, correct the sender configuration, and avoid raising policy further until results are consistent. |
Do not respond to an unfamiliar source by immediately adding it to SPF. First determine whether it is an authorized application, a forwarding path, a misconfigured system, or an attempted spoof. Keep evidence such as timestamps, sending IPs, header results, and provider logs before changing the policy.
When to revisit
Make email authentication part of routine domain maintenance rather than a one-time setup. Revisit the records monthly or quarterly, and always review them when you add or remove a newsletter, contact-form service, help desk, ecommerce system, or transactional sender. Also check them after a domain transfer, nameserver change, email migration, major website change, or unexplained delivery problem.
At each review, compare DNS records with your sender inventory, verify that DKIM selectors still resolve, check recent DMARC reports, and look for new unauthorized sources. If a provider changes its setup instructions or recommends a new record format, update the relevant entry after testing. Keep the previous configuration and change date so that a failed change can be reversed safely.
For a practical next step, create a small authentication register with four fields: sending service, DNS record, last verified date, and responsible owner. Then run one test message from every listed service. Resolve failures while DMARC remains in monitoring mode, and move toward a stricter policy only when legitimate mail consistently passes with aligned SPF or DKIM. For related DNS work, see the website troubleshooting checklist, which can help separate email authentication problems from wider DNS or hosting issues.