Skip to content
Email Deliverability Featured Guide

SPF vs. DKIM vs. DMARC: What's the Difference?

SPF, DKIM, and DMARC work together to authenticate email and protect your domain. Learn how each protocol works, how DMARC alignment affects authentication, and how to troubleshoot common email authentication problems.

Targetive Team Deliverability Specialist
October 13, 2026
8 min read
101 views
Share:
SPF vs. DKIM vs. DMARC: What's the Difference?

SPF vs. DKIM vs. DMARC: What's the Difference?

Email authentication is one of the foundations of reliable email delivery. If you send business emails, newsletters, customer notifications, or B2B outreach, understanding SPF, DKIM, and DMARC is essential.

These three protocols help receiving mail servers verify email identity, detect unauthorized use of a domain, and apply policies to messages that fail authentication checks.

However, SPF, DKIM, and DMARC do not perform the same job. A message can pass SPF but fail DMARC alignment. DKIM can pass while the visible From domain is not aligned. And even when all authentication checks pass, a message can still land in spam.

So, what is the difference between SPF, DKIM, and DMARC, and how should you configure them?

This guide explains each protocol, shows how they work together, covers common DNS configuration mistakes, and walks through a practical email authentication troubleshooting process.

What Are SPF, DKIM, and DMARC?

SPF, DKIM, and DMARC are email authentication standards that help mailbox providers evaluate whether messages are legitimately associated with a sending domain.

Here is the key difference:

Protocol Full name Primary purpose
SPF Sender Policy Framework Identifies servers authorized to send mail for a domain.
DKIM DomainKeys Identified Mail Uses a cryptographic signature to verify message integrity and the signing domain.
DMARC Domain-based Message Authentication, Reporting, and Conformance Checks authentication alignment and specifies a policy for messages that fail DMARC.

Think of them as complementary controls rather than interchangeable settings.

SPF identifies authorized sending infrastructure. DKIM provides a verifiable message signature. DMARC connects authentication results to the domain recipients see in the From address and allows domain owners to publish a handling policy.

For dependable email authentication, configure all three where applicable and verify that they work together.

1. What Is SPF?

Sender Policy Framework (SPF) is a DNS-based email authentication mechanism that identifies which sending servers are authorized to send email for a domain.

When a receiving mail server checks SPF, it evaluates the sending IP address against the SPF policy published for the relevant envelope sender domain, generally associated with the Return-Path address.

SPF does not directly verify the visible From address by itself. That distinction becomes important when DMARC alignment is evaluated.

How SPF Works

Suppose your organization sends email through a legitimate email service provider. You publish an SPF record in your domain's DNS to authorize that provider's sending infrastructure.

When a receiving server processes a message, it checks whether the sending IP address is permitted by the relevant SPF policy.

If the check succeeds, SPF passes. If the sending server is not authorized under the policy, SPF may fail or return another result depending on the record and evaluation.

Example SPF Record

A simplified SPF record might look like this:

v=spf1 include:example.net ~all

This example illustrates the structure of an SPF record. It is not a record you should copy into your production DNS without replacing the example mechanism with the one specified by your actual provider.

The components mean:

  • v=spf1 identifies the SPF version.
  • include:example.net references another SPF policy for authorized senders.
  • ~all indicates a soft-fail result for senders not matched by the preceding mechanisms.

The correct record depends on the services that legitimately send mail for your domain.

Common SPF Configuration Mistakes

Publishing multiple SPF records

A domain should not publish multiple independent SPF records for the same DNS name. Multiple SPF records can cause a permanent SPF error.

Exceeding the DNS lookup limit

SPF evaluation has a limit of 10 DNS-querying terms. Complex include chains can cause this limit to be exceeded.

Forgetting a legitimate sender

If you add a new email service without updating the relevant SPF configuration, its messages may fail SPF.

Leaving obsolete providers in the record

Unused authorization mechanisms unnecessarily expand the policy and may create security or maintenance problems.

Assuming SPF pass guarantees inbox placement

SPF passing does not guarantee that a message will reach the inbox. Reputation, recipient complaints, content, and other provider-specific signals still matter.

SPF Best Practices

  • Inventory every legitimate service sending mail for your domain.
  • Publish one valid SPF record per relevant DNS name.
  • Stay within SPF's DNS lookup limit.
  • Remove obsolete mechanisms when they are no longer required.
  • Test the record after changes.
  • Verify that the provider's sending domain and your visible From domain align appropriately for DMARC.

For technical details, consult the SPF specification, RFC 7208.

2. What Is DKIM?

DomainKeys Identified Mail (DKIM) adds a cryptographic signature to outgoing email messages.

The signature allows the receiving server to verify that the message was signed by a domain controlling the corresponding private key and that the signed portions of the message have not changed in a way that invalidates the signature.

Unlike SPF, DKIM can continue to provide a useful authentication result when a message passes through some forwarding arrangements, although modifications to signed content can invalidate the signature.

How DKIM Works

DKIM uses a private key to generate the message signature and a public key published in DNS to verify it.

The sending system adds a DKIM-Signature header to the outgoing message. The header includes information such as the signing domain and selector.

The receiving server uses these values to find the corresponding public key in DNS and validate the signature.

A successful DKIM check indicates that the signature is valid for the signing domain. DMARC then evaluates whether that signing domain aligns with the visible From domain.

Example DKIM DNS Record

A DKIM public key record typically uses a selector followed by ._domainkey.

For example, a DNS name might be:

selector1._domainkey.example.com

A simplified TXT record could look like this:

v=DKIM1; k=rsa; p=PUBLIC_KEY_VALUE

This is illustrative only. Your email provider should supply the correct selector, public key, and record format.

Do not publish the placeholder public key shown above. A real DKIM record contains the actual public key generated for your sending configuration.

Common DKIM Configuration Mistakes

  • Publishing the wrong selector or public key.
  • Enabling DNS records but not enabling DKIM signing in the sending platform.
  • Using an incorrect DNS hostname.
  • Rotating keys without coordinating the change with the sending service.
  • Assuming that a DKIM pass automatically means DMARC passes.
  • Failing to verify the signing domain against the visible From domain.

DKIM Best Practices

  • Enable DKIM signing for every relevant sending service.
  • Use the key length recommended by your provider and supported by your systems.
  • Verify the public key is published at the exact selector hostname.
  • Inspect real message headers after configuration.
  • Monitor authentication after changing providers or DNS records.
  • Confirm DKIM alignment with the visible From domain when implementing DMARC.

For additional technical details, see the DKIM specification, RFC 6376.

3. What Is DMARC?

Domain-based Message Authentication, Reporting, and Conformance (DMARC) builds on SPF and DKIM.

DMARC evaluates whether a message passes SPF or DKIM authentication with the required alignment to the domain in the visible From address.

It also allows the domain owner to publish a policy that tells receiving servers how to handle messages that fail DMARC, subject to the receiver's implementation.

DMARC provides reporting mechanisms that can help domain owners identify legitimate senders, authentication failures, and potential domain abuse.

How DMARC Alignment Works

DMARC alignment is one of the most important concepts in email authentication.

The visible From address is the address recipients typically see in their email client. DMARC checks whether the domain in that address aligns with either:

  • The authenticated SPF domain associated with the envelope sender.
  • The authenticated DKIM signing domain in the message signature.

At least one of these aligned authentication paths must pass for DMARC to pass.

For example, imagine a message has the following domains:

  • Visible From domain: example.com
  • SPF-authenticated envelope sender domain: bounce.example.com
  • DKIM signing domain: example.com

With relaxed alignment, the SPF domain can align with the visible From domain because it is a subdomain of the same organizational domain. The DKIM domain is also aligned.

With strict alignment, exact domain matching is required for the respective mechanism.

This distinction matters when you use third-party sending platforms, custom bounce domains, or separate domains for DKIM signing.

Example DMARC Record

A basic monitoring record might look like this:

v=DMARC1; p=none; rua=mailto:[email protected]

The components mean:

  • v=DMARC1 identifies the DMARC version.
  • p=none requests monitoring without DMARC-policy quarantine or rejection.
  • rua=mailto:[email protected] specifies an address for aggregate DMARC reports.

Replace the example domain and reporting address with your own configuration. Make sure the reporting mailbox is operational and prepared to receive reports.

Understanding DMARC Policies

DMARC supports three main policy values:

p=none — Monitor

Receivers are asked not to apply quarantine or rejection under the published DMARC policy. This is useful for collecting reports and identifying legitimate sending sources before enforcement.

p=quarantine — Quarantine

Receivers are asked to treat messages that fail DMARC as suspicious, often by directing them to spam or another quarantine location.

p=reject — Reject

Receivers are asked to reject messages that fail DMARC.

Receiving servers retain control over their own processing, so a published policy is not an absolute guarantee of how every message will be handled.

Should You Start With p=none?

For domains with multiple sending services, monitoring is often a sensible first step.

Before moving to quarantine or reject, identify all legitimate sending sources, verify SPF and DKIM alignment, review aggregate reports, and correct authentication failures.

Moving directly to an enforcement policy without understanding your sending environment can disrupt legitimate messages.

However, monitoring should not become a permanent excuse to ignore enforcement. Once legitimate senders are identified and authentication is working, evaluate a gradual move toward a stronger policy.

For more information, see Google's DMARC setup documentation.

4. SPF vs. DKIM vs. DMARC: Key Differences

Although these protocols work together, they answer different questions.

Question SPF DKIM DMARC
Does it identify authorized sending infrastructure? Yes No No
Does it verify a cryptographic message signature? No Yes No
Does it check alignment with the visible From domain? Not by itself Not by itself Yes
Can it specify a policy for DMARC failures? No No Yes
Can it provide reporting about authentication? SPF results are available in message processing DKIM results are available in message processing Yes, through configured DMARC reporting

The important point is that SPF and DKIM provide authentication mechanisms, while DMARC evaluates aligned results and adds a policy and reporting framework.

One protocol cannot replace the others' functions.

5. How SPF, DKIM, and DMARC Work Together

Consider a business sending an email from [email protected].

The message passes through the company's email platform and reaches a recipient's mailbox provider.

The receiving server can perform these checks:

  1. SPF: Does the sending IP address pass the SPF policy for the relevant envelope sender domain?
  2. DKIM: Is the message's DKIM signature valid for the signing domain?
  3. DMARC: Does SPF or DKIM pass with alignment to example.com, the visible From domain?
  4. Policy: If DMARC fails, what policy has the domain owner published?
  5. Additional filtering: What do reputation, recipient feedback, message content, links, and other provider-specific signals indicate?

The outcome is not determined by DNS authentication alone. Authentication helps establish legitimacy, but receiving providers still evaluate whether a message should be accepted and where it should be placed.

A message that passes all three authentication checks can still land in spam. Conversely, an authentication failure does not necessarily mean every receiving server will handle the message identically.

6. How to Check SPF, DKIM, and DMARC

After configuring authentication, verify the results using real messages and DNS checks.

Step 1: Check DNS Records

Confirm that your domain publishes the expected SPF and DMARC records and that your DKIM selector points to the correct public key.

You can use tools such as MXToolbox to inspect DNS records.

DNS tools can help identify missing records and syntax problems, but they do not replace testing an actual message through your sending infrastructure.

Step 2: Send a Test Email

Send a message from the actual service you intend to use to a mailbox you control.

If you use multiple providers or sending systems, test each one separately.

Step 3: Inspect the Message Headers

Open the message's original headers and locate the Authentication-Results field added by the receiving system.

Look for results such as:

  • spf=pass
  • dkim=pass
  • dmarc=pass

These are examples of possible results, not a guarantee that your own messages will display them.

Also inspect the authenticated domains. A passing result alone may not establish that the relevant domain aligns with the visible From address.

Step 4: Verify Alignment

Compare the visible From domain with the SPF-authenticated domain and DKIM signing domain.

Determine whether at least one mechanism passes and aligns under the DMARC policy.

Step 5: Check DMARC Reports

If aggregate reporting is configured, review the reports for sending sources, authentication outcomes, and potential unauthorized use of your domain.

Do not move to a stricter policy until you understand the legitimate traffic represented in those reports.

7. Common Email Authentication Problems and How to Fix Them

SPF Passes, but DMARC Fails

Possible cause: SPF passes for a domain that does not align with the visible From domain, and DKIM either fails or is not aligned.

What to do:

  • Check the envelope sender domain.
  • Verify the DKIM signing domain.
  • Confirm whether either authentication method aligns with the visible From domain.
  • Correct the sending service's configuration where necessary.

DKIM Fails

Possible causes: An incorrect public key, wrong selector, missing DNS record, disabled signing, or message modifications that invalidate the signature.

What to do:

  • Confirm the selector in the DKIM-Signature header.
  • Check the corresponding DNS record.
  • Verify that the sending service uses the matching private key.
  • Review whether an intermediate system changes signed content.

SPF Returns a Permanent Error

Possible causes: Multiple SPF records, syntax errors, or exceeding SPF's DNS lookup limit.

What to do:

  • Confirm that only one SPF record exists for the relevant DNS name.
  • Review the complete SPF policy and included records.
  • Reduce unnecessary DNS-querying mechanisms without removing legitimate senders.
  • Test the record after correcting it.

DMARC Reports Show Unknown Sending Sources

Possible causes: An overlooked marketing platform, transactional email provider, legacy application, or unauthorized sender.

What to do:

  • Inventory the organization's legitimate email systems.
  • Confirm ownership of unfamiliar sending sources.
  • Verify authentication for legitimate services.
  • Investigate unauthorized sources.
  • Strengthen enforcement after legitimate traffic is accounted for.

Authentication Passes, but Emails Still Go to Spam

Possible causes: Poor sender reputation, recipient complaints, irrelevant content, suspicious links, poor list quality, or provider-specific filtering.

What to do:

  • Review SMTP responses and available reputation data.
  • Investigate complaint and bounce patterns.
  • Verify that the audience is appropriate.
  • Check message content and destination links.
  • Review inbox placement evidence where available.

Do not repeatedly modify SPF, DKIM, and DMARC when all three are already passing and aligned. Investigate the other factors that influence inbox placement.

For a broader look at sender reputation and inbox placement, read our complete guide to email deliverability in 2026.

Authentication is only one part of inbox placement. If your messages pass authentication but still land in spam, use our email spam troubleshooting guide to investigate sender reputation, list quality, and sending practices.

8. SPF, DKIM, and DMARC Best Practices

Use this checklist when configuring a new sending domain or auditing an existing one.

SPF

  • Publish one valid SPF record per relevant DNS name.
  • Authorize all legitimate sending services.
  • Stay within the SPF DNS lookup limit.
  • Remove obsolete authorization mechanisms.
  • Verify SPF results using actual messages.

DKIM

  • Enable signing for each relevant sending service.
  • Publish the correct public key at the required selector.
  • Verify the signature on real messages.
  • Confirm the signing domain aligns with the visible From domain where required.
  • Review authentication after provider or DNS changes.

DMARC

  • Publish a valid DMARC record.
  • Configure aggregate reporting where appropriate.
  • Identify legitimate sending sources.
  • Review SPF and DKIM alignment.
  • Investigate failures before increasing enforcement.
  • Evaluate quarantine or reject policies when the sending environment is ready.

Ongoing Monitoring

  • Monitor authentication failures.
  • Review provider-specific delivery errors.
  • Investigate suspicious sending activity.
  • Maintain accurate sending-system documentation.
  • Review authentication whenever you add or remove an email provider.

Authentication is not a one-time task. Changes to sending platforms, DNS, domains, and mail routing can introduce new failures.

Frequently Asked Questions

Is SPF better than DKIM?

Neither is a replacement for the other. SPF authorizes sending infrastructure, while DKIM verifies a cryptographic signature associated with a signing domain. They address different aspects of email authentication.

Do I need SPF, DKIM, and DMARC?

You should configure all three for a properly authenticated sending environment. Specific provider requirements vary by sender type and message volume. Gmail, for example, requires SPF or DKIM for all senders under its published guidelines and SPF, DKIM, and DMARC for bulk senders.

Can DMARC work without SPF or DKIM?

DMARC relies on an aligned SPF pass or an aligned DKIM pass. If neither mechanism passes with the required alignment, DMARC fails.

Does SPF pass mean DMARC passes?

No. SPF can pass for an envelope sender domain that does not align with the visible From domain. If DKIM does not provide an alternative aligned pass, DMARC can fail.

Does DKIM improve email deliverability?

DKIM supports authentication and message integrity verification. It can help establish trust in a sending domain, but a valid DKIM signature does not guarantee inbox placement.

What is the difference between p=none, p=quarantine, and p=reject?

p=none requests monitoring without DMARC-policy enforcement. p=quarantine requests that failing messages be treated as suspicious, while p=reject requests rejection. These policies should be selected according to your authentication readiness and operational requirements.

Can I have more than one SPF record?

A domain should not publish multiple independent SPF records for the same DNS name. Consolidate the legitimate sending mechanisms into one valid record.

How do I know if my email authentication is configured correctly?

Inspect DNS records, send test messages through each sending service, review the receiving server's authentication results, verify DMARC alignment, and monitor aggregate reports where available.

Can correct authentication guarantee inbox placement?

No. SPF, DKIM, and DMARC establish important aspects of email legitimacy, but inbox placement also depends on reputation, recipient feedback, message quality, sending behavior, and provider-specific filtering.

Final Thoughts

SPF, DKIM, and DMARC solve different problems, but they are most effective when configured together.

SPF identifies authorized sending infrastructure. DKIM provides a verifiable message signature. DMARC evaluates aligned authentication results and gives domain owners a way to publish handling policies and receive reports.

If you are troubleshooting email deliverability, start by verifying all three protocols and their alignment. Then examine the actual evidence from message headers, SMTP responses, provider dashboards, and inbox placement tests.

A properly authenticated domain is an important foundation for reliable email communication, but it is only one part of a broader deliverability strategy.

Improve Your Email Outreach With Targetive

Targetive helps businesses manage B2B email outreach and sales engagement with organized sending workflows and deliverability-aware campaign management.

Explore Targetive to learn how the platform can support your outreach workflow.

For additional inbox placement and deliverability-related testing, visit InboxScope.


References and Further Reading

Share this article:

Targetive Team

Author

Written by deliverability specialists and cold email infrastructure architects at Targetive. We research inbox placement, spam filtering algorithms, mailbox warming protocols, and email verification.

Stop landing in spam. Start closing deals.

Warm up unlimited mailboxes, verify lead lists with 99.8% precision, and personalize cold email sequences that convert.

No credit card required • 5-minute onboarding • Cancel anytime
Recommended Reading

Related Deliverability Articles

More in Email Deliverability