SPF, DKIM, and DMARC work together to help legitimate messages from your business domain reach recipients and to make spoofed messages easier to identify. This guide explains what each email DNS record does, how to publish provider-neutral records, how to monitor authentication results, and how to move carefully from reporting to enforcement.
Overview
Email authentication is a DNS management task, but it also depends on configuration inside every service that sends mail for your domain. Your business email platform, newsletter system, contact forms, support application, billing system, and transactional email provider may all require separate setup.
SPF identifies servers that are permitted to send mail for a domain. DKIM adds a cryptographic signature to outgoing messages. DMARC tells receiving systems how to evaluate SPF and DKIM together, where to send aggregate reports, and what to do when a message fails alignment. None of these records is a complete substitute for the others.
The safest approach is to create an inventory of legitimate senders, configure each sender according to its documentation, publish a monitoring-only DMARC policy, and review results before applying stricter enforcement. Record syntax and setup screens vary between providers, so treat the examples below as patterns to adapt rather than values to copy unchanged.
If you are new to DNS management, first review DNS records explained to understand names, record types, values, and propagation. Email authentication changes should be made in the authoritative DNS zone for the domain used in the visible From address.
What to track
SPF: the permitted sending sources
SPF is published as a TXT record at the root of the domain, commonly represented by the host or name field as @. A provider may give you an include: mechanism, an IP address, or both. A provider-neutral pattern might look like this:
Type: TXT
Name: @
Value: v=spf1 include:sender.example.net ~all
Do not publish a separate SPF record for every sender. A domain should have one combined SPF policy, assembled from the authorized services. Adding multiple independent SPF TXT records can produce an invalid or unpredictable result. Remove old services when they are retired, and check any provider-specific limits before expanding a long policy.
DKIM: the message signature
DKIM uses a private key held by the sending service and a public key published in DNS. The public key is placed at a selector hostname, which lets one domain use different keys for different services or rotate keys without replacing every configuration at once.
Type: TXT
Name: selector1._domainkey
Value: v=DKIM1; k=rsa; p=PUBLIC_KEY_FROM_YOUR_SENDER
The selector, key format, and record value must come from the sending provider. Preserve the complete public key, avoid adding quotation marks unless the DNS interface requires them, and follow the provider's instructions for long TXT values. A DKIM record can exist in DNS while messages still fail DKIM if the sender has not enabled signing or is using a different selector.
DMARC: alignment, reporting, and policy
DMARC is published at _dmarc. It evaluates whether SPF and/or DKIM authenticates in alignment with the domain shown to the recipient. A monitoring-oriented example is:
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=none; rua=mailto:[email protected]; adkim=r; aspf=r
In this example, p=none requests reporting without asking the recipient system to quarantine or reject failing messages. The rua address receives aggregate reports; use a monitored mailbox or a reporting service that is prepared to process them. The relaxed alignment settings shown are an example, not a requirement. Confirm the syntax and supported options with your DNS and email providers before publishing.
Keep a simple inventory with the domain, sender, purpose, SPF mechanism, DKIM selector, From domain, return-path domain, owner, and last verification date. This is especially useful when you add a newsletter or transactional email service, change business email providers, or investigate delivery failures.
Cadence and checkpoints
Use a staged workflow rather than changing all three records at once:
- Inventory senders. Search application settings, website forms, CRM tools, help desks, ecommerce systems, monitoring tools, and cloud services for anything that sends as your domain.
- Configure each sender. Add its SPF authorization where required, publish its DKIM public key, and enable signing in the sender's control panel. Confirm whether it sends directly or through another provider.
- Test DNS visibility. Query the authoritative DNS zone for the root SPF record, each DKIM selector, and the DMARC record. Check for duplicate SPF records, missing semicolons, truncated keys, or a record placed at the wrong hostname.
- Send representative messages. Test ordinary employee mail, website forms, newsletters, receipts, password resets, and support notifications. Inspect authentication results in the receiving mailbox where available.
- Monitor DMARC reports. Review aggregate data on a regular schedule. Identify sources you recognize, sources that need configuration, and sources that appear unauthorized.
- Increase enforcement gradually. After legitimate senders consistently pass alignment, consider moving from monitoring to a quarantine policy and, later, a reject policy. Make each change deliberately and watch for business-critical failures.
A practical cadence is to check reports more frequently during an initial rollout or provider migration, then use a monthly or quarterly review once sending patterns are stable. Keep a change log so an unexpected report can be compared with recent DNS, application, or vendor changes.
How to interpret changes
A rise in SPF failures does not always mean spoofing. It may indicate a new marketing platform, a forwarded message, an overlooked application, an outdated SPF include, or a return-path that is not aligned with the visible From domain. Confirm the sending IP or service against your inventory before making a policy change.
DKIM failures can result from a missing selector, an incorrect public key, disabled signing, or message modification after signing. If only one service fails, inspect that service's selector and domain settings. If failures appear after forwarding or mailing-list delivery, compare the original sender, authentication results, and final recipient behavior.
DMARC alignment is the key diagnostic detail. A message can pass SPF but fail DMARC if the authenticated envelope domain differs from the visible From domain. It can also pass DKIM cryptographic validation but fail DMARC if the signing domain is not aligned. Review both the authentication result and the domains involved before concluding that a sender is unauthorized.
When a report identifies an unknown source, do not immediately authorize it. Check application logs, vendor accounts, recent domain changes, and message samples. If the source cannot be tied to a legitimate workflow, leave it out of SPF and investigate it as possible spoofing or misuse. For broader domain and hosting changes, keep a tested recovery plan; the hosting backup and restore guide provides a useful model for documenting operational checks.
When to revisit
Review SPF, DKIM, and DMARC at least quarterly, and schedule an additional review whenever the domain's email architecture changes. Revisit the records when you:
- add or remove a newsletter, CRM, help desk, ecommerce, or transactional email service;
- change business email providers, DNS providers, or domain registrars;
- see a sudden change in delivery, authentication failures, or DMARC report volume;
- change the visible From domain, return-path domain, or DKIM selector;
- receive reports from unfamiliar sending infrastructure; or
- plan to move from monitoring to quarantine or rejection.
At each checkpoint, export or record the current DNS values, compare every sender with the inventory, confirm that aggregate reports are still being received, and remove retired authorization. Test a real message from each important workflow before and after a policy change. If your website or mail services are being moved between hosts, the domain transfer checklist can help you coordinate DNS changes without overlooking dependent records.
Finally, assign ownership. Someone should know which mailbox or reporting system receives DMARC data, who approves new senders, and who investigates failures. Email authentication is not a one-time DNS edit: it is a small operating process that protects the domain while keeping legitimate business mail working.