SPF, DKIM, and DMARC form the core of email authentication for a custom domain. This guide gives you a provider-neutral setup checklist, DNS templates, a staged DMARC rollout plan, and a troubleshooting workflow you can reuse whenever you add an email platform, change providers, or investigate delivery failures.
Overview
Email authentication helps receiving systems evaluate whether a message claiming to come from your domain was authorized. It also gives your organization a way to identify unauthorized use and, with DMARC, communicate how unauthenticated messages should be handled.
Each standard addresses a different part of the problem:
- SPF publishes the mail servers and services allowed to send email for your domain.
- DKIM adds a cryptographic signature to outgoing messages. The receiving system checks that signature against a public key published in DNS.
- DMARC checks whether SPF or DKIM authentication aligns with the visible From domain and lets you request reports or recommend a handling policy for messages that fail.
These records are managed through the DNS service authoritative for your domain. Your registrar may provide DNS management, or your nameservers may point to a separate DNS provider. If you are unsure where records belong, confirm the active nameservers before making changes. The DNS records explained guide provides additional context on record types and common fields.
Authentication is not a complete deliverability program. It does not replace secure account practices, accurate recipient lists, appropriate sending volumes, or an operational process for reviewing failures. It does, however, establish a clear technical foundation for custom domain email security and helps reduce the risk of domain spoofing.
Authentication-record reference
| Record | Typical DNS name | Type | What to publish | Important check |
|---|---|---|---|---|
| SPF | Your root domain | TXT | A single policy listing authorized senders | Keep one SPF record and include every legitimate sending service |
| DKIM | selector._domainkey | TXT or CNAME | A provider-generated public key or key reference | Use the exact selector and value supplied by the email provider |
| DMARC | _dmarc | TXT | A policy, alignment mode, and optional reporting destinations | Start with monitoring before requesting enforcement |
Provider requirements vary, so treat the following examples as templates rather than values to copy unchanged. Replace placeholders with the records supplied by each service.
Provider-neutral DNS templates
Host: @
Type: TXT
Value: v=spf1 include:SPF_PROVIDER_A include:SPF_PROVIDER_B ~all
Host: SELECTOR._domainkey
Type: TXT or CNAME
Value: DKIM_VALUE_FROM_PROVIDER
Host: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:[email protected]; adkim=s; aspf=sDo not add an SPF include unless the corresponding provider documents it. Do not invent a DKIM key or selector. Some platforms request a TXT record, while others request a CNAME that points to a provider-managed key. For DMARC, use a reporting mailbox or reporting system that your organization can monitor and that is appropriate for receiving aggregate reports.
Checklist by scenario
When setting up email for a new domain
- Confirm the authoritative DNS provider and record-editing access.
- List every service that may send mail using the domain, including hosted mail, contact forms, billing tools, customer-support systems, marketing platforms, and application infrastructure.
- Publish the email provider’s SPF instruction. Combine authorized services into one SPF record rather than creating separate SPF TXT records.
- Enable DKIM in each sending platform and publish every required selector or CNAME.
- Publish a DMARC record with
p=noneand an address for aggregate reports. - Send controlled test messages to several mailboxes and inspect the authentication results in the message headers.
- Record the final hostnames, values, selectors, owners, and dates in your DNS change documentation.
When adding another sending platform
- Identify whether the platform sends from your visible From domain, a subdomain, or a provider-owned address.
- Follow its SPF instructions without replacing existing authorized senders.
- Generate or enable a separate DKIM selector if the platform supports one. A unique selector makes future rotation and removal easier.
- Check whether the platform’s return-path or envelope-from domain affects SPF alignment.
- Send test messages and verify that either aligned SPF or aligned DKIM passes DMARC.
- Review DMARC reports after the platform begins sending. Do not move to enforcement until legitimate traffic is accounted for.
When investigating rejected or missing messages
- Collect the complete bounce message and the headers from a message that arrived successfully, if available.
- Note the sending service, From address, recipient domain, timestamp, message identifier, and any SMTP response.
- Check SPF, DKIM, and DMARC records publicly, then compare them with the provider’s current setup instructions.
- Determine whether the failure is authentication, policy, content, reputation, rate limiting, recipient configuration, or a temporary DNS issue.
- Test one sending path at a time after making a change, and document the result.
Reporting-address worksheet
Before publishing a DMARC reporting address, write down:
- Domain being protected: ____________________
- Reporting mailbox or service: ____________________
- Person or team reviewing reports: ____________________
- Review frequency: ____________________
- Authorized sending services: ____________________
- Subdomains requiring separate treatment: ____________________
- Target DMARC policy after validation: ____________________
Aggregate reports can contain technical data about sending sources and authentication results. Decide who should access them, how long they should be retained, and whether a dedicated reporting service is needed to make them usable.
What to double-check
- SPF record count: There should be one SPF policy for a domain. Multiple SPF records can produce an SPF PermError. Consolidate authorized mechanisms into one policy, following provider guidance and DNS size limitations.
- SPF scope: Make sure every legitimate sender is covered, including less obvious systems such as website forms, invoicing tools, and cloud applications.
- DKIM selector: The selector is part of the lookup name. A correct public key at the wrong selector will not authenticate the message.
- DKIM signing: Publishing a key is not enough; the sending platform must be configured to sign outgoing messages using that key.
- DMARC alignment: A message can pass SPF or DKIM but still fail DMARC if the authenticated domain does not align with the visible From domain. Check the provider’s alignment instructions and the message headers.
- Subdomains: Decide whether subdomain mail should inherit the organizational policy or receive a separate policy. Test subdomain sending paths before enforcement.
- DNS formatting: Remove accidental quotation marks, line breaks, spaces, or copied labels that your DNS interface does not expect. DNS dashboards differ in whether they append the domain automatically.
- Propagation and caching: A record change may not be visible everywhere immediately. Use a DNS lookup or propagation checker, but also allow for resolver caching and the publishing provider’s stated timing.
- Change control: Save the previous values and the reason for each change. This is especially important when several teams manage the domain or when a provider rotates DKIM keys.
If your domain also hosts a website, keep email DNS changes separate from web hosting changes. A nameserver change can affect A, CNAME, MX, TXT, and other records at once. Review the website launch infrastructure checklist before changing DNS for a production site.
Common mistakes
Publishing more than one SPF record
Adding a new SPF TXT record each time a service is introduced is a common error. Maintain one policy and update it deliberately. Remove obsolete senders only after confirming that no active workflow depends on them.
Copying a DKIM value into the wrong field
Some providers supply a long TXT value; others supply a CNAME name and destination. Treat the provider’s record type, host, and value as a matched set. Do not convert one format into another unless the provider explicitly instructs you to do so.
Starting DMARC with an aggressive policy
A policy such as p=reject can affect legitimate messages if SPF, DKIM, or alignment is incomplete. Begin with monitoring, review reports and test traffic, then increase enforcement in stages. A staged path might be p=none, followed by a limited quarantine policy, and finally a stronger policy when the evidence supports it.
Ignoring non-human senders
Teams often configure employee mail but overlook password resets, order notifications, support tickets, monitoring alerts, or application messages. Build the sender inventory from DNS, application configuration, billing records, and message headers rather than relying on memory.
Assuming a DNS lookup proves delivery
A visible record confirms what DNS returns; it does not prove that a provider is signing messages correctly or that a recipient will accept them. Always test the complete sending path and read the receiving system’s result.
When to revisit
Review this setup before seasonal planning cycles, major campaigns, or other periods when email volume and business impact may increase. Revisit it whenever workflows or tools change, including these events:
- Launching a new email, CRM, marketing, support, billing, or transactional platform.
- Changing nameservers, DNS providers, registrars, or domain ownership.
- Moving mailboxes or applications to a new hosting environment.
- Rotating or replacing DKIM keys.
- Adding a subdomain that sends email.
- Seeing new bounces, spoofing reports, authentication failures, or unexplained delivery changes.
- Receiving DMARC reports that show an unknown or unauthorized source.
At each review, compare the DNS records with the current provider instructions, confirm that the sender inventory is still accurate, inspect recent authentication results, and verify that someone is monitoring the reporting address. A practical six-month review is useful for stable environments, but an active email migration or provider change calls for review immediately rather than waiting for a scheduled date.
Action checklist: document the domain and DNS provider, inventory every sender, publish one accurate SPF record, enable DKIM for each platform, start DMARC in monitoring mode, test real sending paths, review reports, and only then consider stronger enforcement. Keep the checklist with your domain and infrastructure records so it is available during the next migration or delivery investigation. For broader account protection, pair email authentication with the registrar account security checklist.