SPF, DKIM and DMARC - What Each Record Does and How to Set Them Up (2026)

These three DNS records prove your emails are really from you. Here's what each does, example records and a safe setup order.

SPF, DKIM and DMARC are DNS records that prove your emails really come from your domain. SPF lists the servers allowed to send for your domain, DKIM adds a digital signature that proves the message wasn't altered, and DMARC tells mailbox providers what to do when SPF or DKIM checks fail and sends you reports. Gmail, Yahoo and Microsoft's Outlook.com require all three from bulk senders, with DMARC at a minimum policy of p=none and aligned with SPF or DKIM.

You add these records in your domain's DNS settings, usually with values provided by your email platform. Below, we explain each record, show examples and give a safe setup order.

On This Page
  1. Why Authentication Matters
  2. SPF: Who Can Send for You
  3. DKIM: Proving the Message Wasn't Altered
  4. DMARC: Policy and Reporting
  5. A Safe Setup Order
  6. How Alignment Works
  7. Common Mistakes
  8. Checking Your Records
  9. Authentication on Moosend
  10. SPF, DKIM and DMARC FAQs

Why Authentication Matters

Key illustration representing email authentication records

Anyone can put your domain in an email's "From" line. Authentication lets receiving servers check whether a message claiming to be from you really is. Without it, your emails are more likely to land in spam or be rejected, and criminals can spoof your domain more easily.

SPF: Who Can Send for You

SPF (Sender Policy Framework) is a TXT record listing the services and servers allowed to send email using your domain.

Example SPF record (illustrative)
Type Host Value
TXT @ v=spf1 include:_spf.example-esp.com include:_spf.google.com ~all

Only one SPF record per domain. Combine services into a single record.

Stay under the 10-lookup limit. Each "include" counts toward a limit of 10 DNS lookups.

Use your platform's exact include value.

DKIM: Proving the Message Wasn't Altered

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each email. Your email platform signs messages with a private key, and you publish the matching public key in DNS, usually as a CNAME or TXT record.

Example DKIM record (illustrative)
Type Host Value
CNAME esp1._domainkey esp1.dkim.example-esp.com

Each sending service you use needs its own DKIM record.

DMARC: Policy and Reporting

Shield illustration representing DMARC policy protection

DMARC (Domain-based Message Authentication, Reporting and Conformance) builds on SPF and DKIM. It checks alignment, meaning the domain in the visible "From" address matches the domain that passed SPF or DKIM, and tells receivers what to do if checks fail.

DMARC policies
Policy What happens to failing mail When to use
p=none Nothing; monitoring only Starting out, collecting reports
p=quarantine Sent to spam After fixing legitimate senders
p=reject Rejected Full protection once confident
Example DMARC record (illustrative)
Type Host Value
TXT _dmarc v=DMARC1; p=none; rua=mailto:[email protected]

A Safe Setup Order

  1. List every service that sends email for your domain: marketing platform, store, help desk, office email.

  2. Add SPF with all legitimate senders in one record.

  3. Add DKIM for each service, using values from each provider.

  4. Add DMARC at p=none with a reporting address.

  5. Verify in your email platform that authentication passes.

  6. Review DMARC reports for a few weeks to find unknown senders.

  7. Tighten to quarantine, then reject once all legitimate mail passes.

How Alignment Works

For DMARC to pass, at least one of these must be true:

SPF passes and the domain used for SPF matches your From domain.

DKIM passes and the signing domain matches your From domain.

Many email platforms default to using their own domain for SPF (the "return path"), so DKIM alignment through your own domain is usually what makes DMARC pass. Some platforms also let you set a custom return path for SPF alignment.

Common Mistakes

Adding a second SPF record instead of editing the first breaks SPF entirely. Always combine senders into one SPF record.

Jumping straight to p=reject before confirming every legitimate sender passes.

Forgetting a sending service, such as your help desk or store.

Typos in DNS values. Copy them exactly.

Waiting for propagation. DNS changes can take time to apply.

Checking Your Records

Use your email platform's domain verification page, a DMARC checker, or tools like MXToolbox to confirm records are published and valid. Google Postmaster Tools also reports authentication results for mail sent to Gmail.

Authentication on Moosend

Moosend's domain settings provide the records you need to authenticate your sending domain and verify them once they're in place. It's available on every plan, including the free trial. See our Moosend deliverability guide for setup steps.

Authenticate your domain on Moosend's free trial.

Try Moosend Free

SPF, DKIM and DMARC FAQs

Do I need SPF, DKIM and DMARC?

Yes for bulk senders to Gmail, Yahoo and Outlook.com, and recommended for everyone.

Can I have more than one SPF record?

No. Combine all senders into one SPF record.

What DMARC policy should I start with?

p=none, so you can monitor reports before enforcing.

How long do DNS changes take?

Often minutes to a few hours, but propagation can take up to 48 hours.

Does DMARC improve deliverability?

It's now a requirement for bulk senders and helps prevent spoofing, which protects your reputation.