How to Set Up Domain Email Authentication With SPF, DKIM, and DMARC
SPFDKIMDMARCDNSemail deliverabilitydomain setup

How to Set Up Domain Email Authentication With SPF, DKIM, and DMARC

HHelps.website Editorial Team
2026-11-17
7 min read

Learn how to configure SPF, DKIM, and DMARC, test DNS records, interpret reports, and review domain email authentication over time.

Domain email authentication helps receiving mail systems verify that messages claiming to come from your domain are authorized. This step-by-step guide explains how to set up SPF, DKIM, and DMARC in a provider-neutral way, how to test the records, and how to review them on a recurring schedule when you add a mailing platform, change hosts, or investigate delivery problems.

Overview

SPF, DKIM, and DMARC are DNS-based controls that work together but solve different problems:

  • SPF lists the servers and services allowed to send mail for your domain.
  • DKIM adds a cryptographic signature to outgoing messages so a receiving system can check that the message was authorized and was not altered in transit.
  • DMARC tells receiving systems what to do when a message fails authentication and gives you a way to review authentication reports.

These settings do not replace good mailbox practices, accurate sender addresses, or a correctly configured email provider. They are part of a broader domain and email setup. Before editing DNS, identify every legitimate service that sends mail using your domain. This may include a mailbox provider, website contact forms, a newsletter platform, a customer support system, an invoicing tool, or an application that sends transactional messages.

Keep a copy of your current DNS records before making changes. A wrong SPF record can affect legitimate senders, while a strict DMARC policy can affect messages from services that have not been configured correctly. If your website is also being moved or your DNS is managed by a new host, use a documented migration checklist such as this domain transfer guide before changing records.

What to track

1. Your authorized sending services

Create a simple inventory with these columns: service name, purpose, sending domain or subdomain, SPF requirement, DKIM requirement, return-path or envelope-from domain, and the person responsible for the account. Do not assume that every service listed in your website documentation still sends mail. Confirm the current setup in each provider's administrative panel or documentation.

This inventory is especially important when a site uses more than one sender. A website host may deliver contact-form notifications, while a separate platform sends newsletters and an application sends password resets. Each service may provide different DNS values and may require you to verify a selector, subdomain, or custom tracking domain.

2. SPF record status

SPF is normally published as a TXT record at the root of the sending domain. A simplified example might look like this:

example.com. TXT "v=spf1 include:mail-provider.example -all"

The exact include: value must come from your email provider. Do not copy the example into production. If several services send mail, they generally need to be represented within one SPF policy rather than by publishing multiple independent SPF records for the same domain. Multiple SPF records can create an evaluation problem, so consolidate the authorized mechanisms according to the providers' instructions.

Track whether the record contains obsolete services, duplicate mechanisms, or a provider change that has not been reflected. Also note that SPF evaluation has a limit on DNS lookups. If your record becomes complicated, ask the relevant provider or administrator to simplify it rather than adding entries without review.

3. DKIM selectors and keys

DKIM usually requires a TXT or CNAME record at a selector-specific hostname, such as:

selector1._domainkey.example.com. CNAME selector1.provider.example

Some providers give you a TXT value containing a public key instead. The selector name and record type must match the provider's instructions. Keep a record of each selector, the service using it, and the date it was last confirmed. Never publish or share the private DKIM key; DNS should contain only the public key or the provider's delegated CNAME target.

4. DMARC policy and reports

DMARC is published at _dmarc as a TXT record. A monitoring-only example is:

_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"

The rua address is used for aggregate reports when supported by the reporting system. Use a mailbox that is monitored and prepared to receive automated reports. Some reporting services require an additional authorization step when the report address is hosted on a different domain.

Track the policy, reporting address, alignment settings if used, and whether reports are arriving. Avoid treating the presence of a DMARC record as proof that every message is authenticated. The useful question is whether legitimate traffic passes SPF or DKIM and aligns with the visible From domain.

Policy comparison

PolicyPurposeBest use in a rollout
p=noneCollect information without asking receivers to quarantine or reject failing messages.Initial monitoring while you identify legitimate senders and fix authentication.
p=quarantineAsk receivers to treat failing messages as suspicious, subject to their handling.A later testing stage after reports show that expected mail is aligned.
p=rejectAsk receivers to reject messages that fail the DMARC policy.A stricter stage used only after legitimate sending sources have been reviewed.

Policy behavior can vary by receiving system, so treat these values as instructions rather than guaranteed delivery actions. A gradual rollout is safer than switching directly to a strict policy when your sender inventory is incomplete.

Cadence and checkpoints

Use the following workflow when setting up or reviewing authentication:

  1. Map your senders. List every service that sends as your domain, including low-volume systems and website forms.
  2. Publish SPF. Add the provider-approved mechanisms to a single SPF policy. Check for old providers and unnecessary entries.
  3. Enable DKIM. Generate or obtain the provider's selector and public key record, then activate signing in the provider dashboard.
  4. Start DMARC monitoring. Publish a carefully reviewed p=none record with an appropriate reporting address while you investigate results.
  5. Test each sending path. Send messages from your mailbox, website forms, marketing platform, and applications. Inspect the authentication results in the received message headers when available.
  6. Review reports and correct gaps. Match unfamiliar sources to known services. Remove or investigate sources that should not be sending.
  7. Consider a stricter policy only after review. Move gradually if the evidence shows that legitimate mail is consistently aligned.

For an established domain, review authentication at least monthly during active changes and on a quarterly schedule when the sending environment is stable. A monthly review should compare the current DNS records with your inventory and check for new or missing report sources. A quarterly review can include provider accounts, website plugins, application integrations, and ownership of the reporting mailbox.

When launching a new website or changing hosts, add an authentication checkpoint to the launch plan. The website launch checklist can help place DNS verification alongside other prelaunch tasks. If your site sends mail through WordPress, confirm that contact forms and notification plugins use the intended provider instead of relying on an unverified server path.

How to interpret changes

A sudden increase in DMARC failures does not automatically mean that your domain has been attacked. It may indicate a new marketing tool, a changed mail route, forwarding behavior, a missing DKIM record, or a mismatch between the visible From domain and the domain authenticated by SPF or DKIM.

Investigate changes in this order:

  1. Check whether the source IP or service belongs to a tool your organization uses.
  2. Confirm that the service is sending with the intended From domain.
  3. Verify the provider's current SPF and DKIM instructions rather than relying on an old setup note.
  4. Check the exact DNS name, record type, selector, and value for typing or punctuation errors.
  5. Allow for DNS caching and reporting delays before concluding that a change failed.
  6. Review message headers from a controlled test rather than relying only on a summary report.

If legitimate messages fail, do not simply remove DMARC or add broad SPF permissions. First identify the failing authentication method and alignment relationship. If unfamiliar sources appear, preserve the report details, review account access and sending integrations, and consult your mail provider or administrator.

When to revisit

Revisit this setup immediately when you add or remove a mailing platform, change your mailbox provider, migrate hosting, alter a website contact form, introduce a new application, or change the domain used in a From address. Also review it after a noticeable increase in bounces, spam placement, authentication failures, or messages that recipients say they did not receive.

On a recurring basis, schedule a short monthly check during the first stages of deployment and a quarterly check thereafter. Record the date, current SPF value, DKIM selectors, DMARC policy, reporting mailbox, known senders, and unresolved anomalies. This turns DNS authentication from a one-time setup task into a maintainable part of domain administration.

Before each review, export or copy your DNS records, confirm that the person monitoring reports still has access, and check provider documentation for changed record values. After each change, test a real message path and document the result. If the review reveals a broader hosting or DNS issue, consult a relevant hosting guide for beginners or your provider's technical support rather than making multiple untracked edits.

Practical next step: create a sender inventory today, verify the existing SPF, DKIM, and DMARC records, and schedule the next review on your calendar. A small, dated record of what sends email and why makes future troubleshooting faster and reduces the risk of breaking legitimate website messages.

Related Topics

#SPF#DKIM#DMARC#DNS#email deliverability#domain setup
H

Helps.website Editorial Team

Technical Editorial Team

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.