SPF, DKIM, DMARC: What They Are and Why They Matter

by

Last Updated:
10 min read
SPF, DKIM, DMARC: What They Are and Why They Matter

Key Takeaways

  • SPF, DKIM, and DMARC serve distinct purposes. While DMARC requires either SPF or DKIM to pass and align, domains publishing p=reject must not rely solely on SPF and must apply valid DKIM signatures. Together, they protect your domain from exact-domain spoofing, though supplemental defenses are still required for display-name spoofing and lookalike domains.
  • SPF authorizes sending servers, DKIM signs messages cryptographically, and DMARC allows domain owners to define policies for their message handling preferences and provides reporting.
  • DMARC is the only protocol that tells inboxes what to do with failed messages and gives you visibility through reports.
  • Major mailbox providers—including Google, Yahoo, and Microsoft—mandate SPF, DKIM, and at least a p=none DMARC record for bulk senders (5,000+ daily emails). Microsoft began enforcing this on May 5, 2025, for consumer addresses (@outlook.com, @hotmail.com, @live.com), rejecting non-compliant messages.
  • SPF records are looked up at the domain used in MAIL FROM (or HELO), which is often a subdomain such as a bounce or return-path domain. DMARC is published as a TXT record specifically at _dmarc.yourdomain.com. DKIM is published at <selector>._domainkey.yourdomain.com.
  • Without email authentication, your domain is exposed to impersonation, lower deliverability, and compliance failures.

SPF, DKIM, and DMARC are three email authentication protocols that work together to verify your emails are legitimate, protect your brand from impersonation, and control what happens when a message fails verification.

This matters more than ever today. Google, Yahoo, and now Microsoft all require SPF, DKIM, and DMARC for high-volume senders. Since May 5, 2025, Microsoft has been rejecting non-compliant emails from domains sending over 5,000 messages per day to Outlook. Email authentication is no longer optional.

This guide breaks down how SPF, DKIM, and DMARC work, why you need all three, and how to implement them correctly.

What are SPF, DKIM, and DMARC?

SPF (Sender Policy Framework)

SPF allows domain owners to publish a list of authorized IP addresses and servers in DNS. Crucially, SPF validates the envelope sender (MAIL FROM / Return-Path), not the visible From: address seen by the recipient.

SPF defines policies (such as -all to suggest fail), and legitimate email forwarding frequently causes SPF checks to fail. RFC
9989 Section 7.1 warns that “-all” can get mail rejected early in SMTP, before DMARC runs. Additionally, domain owners must limit SPF mechanisms that cause DNS lookups (include, a, mx, ptr, and exists mechanisms) to at most 10 DNS lookups and must not publish more than one SPF record per domain to prevent PermError.

However, SPF does not verify the content of the email, and it does not tell the receiving server what to do when a check fails.

That is where DKIM and DMARC come in.

Suggested read: DMARC vs. DKIM | Which is Better For You and Why?

DKIM

DKIM (DomainKeys Identified Mail) signs outbound messages with a private cryptographic key, allowing the receiving server to verify authenticity and message integrity against a public key published in DNS.

However, DKIM alone does not stop spoofing of your visible brand: an attacker can send an email displaying your brand in the From: header while signing with their own unrelated domain, yielding a valid DKIM pass. DKIM only prevents domain spoofing when paired with DMARC identifier alignment. Additionally, modern security standards recommend using 2048-bit RSA keys (or Ed25519) and rotating keys every 6 to 12 months as an operational practice.

But like SPF, DKIM records alone do not tell the recipient server what action to take when verification fails. For that, you need DMARC.

Simplify Email Authentication with PowerDMARC!

Unlike other solutions, PowerDMARC offers:

  • Real-time threat intelligence and automated policy recommendations
  • 24/7 expert support and hands-on deployment assistance
  • Comprehensive reporting with actionable insights
  • Seamless integration with existing email infrastructure

 

No credit card required.

DMARC

DMARC (Domain-based Message Authentication, Reporting, and Conformance) allows domain owners to instruct email receivers on how to handle unauthenticated emails sent from their domain. Final handling is always determined by the receiver’s local policy. Receivers MAY accept mail failing p=reject and MUST NOT reject solely on the basis of p=reject.

DMARC closes authentication gaps by binding SPF and DKIM verification to the visible From: address through Identifier Alignment. To pass DMARC, a message must pass SPF and/or DKIM, and the authenticated domain must match (or align with) the domain in the visible From: header. DMARC allows domain owners to publish instructions (p=none, p=quarantine, or p=reject) on how receivers should handle unaligned emails, while generating daily aggregate XML reports (rua) on domain activity.

It’s the only protocol that tells inboxes what to do with failed email messages and gives you visibility through reports.

SPF vs. DKIM vs. DMARC: Key Differences

All three protocols play a role in email authentication, but they each handle a different piece of the puzzle. Here is a side-by-side comparison.

FeatureSPFDKIMDMARC
PurposeAuthorizes which servers can send email for your domainVerifies email integrity and sender authenticity using a digital signatureEnforces authentication policies and provides reporting
How It WorksChecks the sending IP against a list of authorized senders in DNSUses asymmetric cryptography to sign outgoing emails with a private key; recipients verify with a public key in DNSChecks that SPF or DKIM passes and aligns with the From domain; applies a policy to failing emails
DNS Record TypeTXT recordTXT record (public key)TXT record
What It ChecksReturn-Path domain and sending server IPDKIM-Signature headerFrom address alignment with SPF and/or DKIM
Policy EnforcementNoNoYes (quarantine, reject)
ReportingNoNoYes (aggregate and failure reports)
Prevents Spoofing Alone?PartiallyPartiallyYes (only exact-domain spoofing), when combined with SPF and DKIM

Watch this video for more:

SPF, DKIM and DMARC Protocols Explained

How SPF, DKIM, and DMARC Work Together

SPF, DKIM, and DMARC each serve a different purpose, and you need all three to fully protect your domain from spoofing, phishing, and impersonation. Here is how the authentication flow works when an email lands in someone’s inbox:

  1. SPF check: The receiving server looks at the sending IP and checks it against the authorized senders listed in the domain’s SPF record. If the IP is on the list, SPF passes.
  2. DKIM check: The receiving server checks the DKIM-Signature header on the email and retrieves the public key from the sender’s DNS. If the signature is valid and the message has not been modified, DKIM passes.
  3. DMARC evaluation: DMARC then checks whether at least one of these protocols (SPF or DKIM) has passed and whether the domain used in that check aligns with the domain in the From address. A DMARC pass validates the use of the Author
    Domain. It does not validate the localpart (the individual sender) and makes no value assertion about the message. The message proceeds to the mailbox provider’s reputation and content filters. If DMARC fails, the receiving server applies the domain owner’s published policy (p=none delivers normally with monitoring, p=quarantine may send to Spam/Junk as a common receiver choice as the message is considered suspicious, and p=reject drops or bounces the message), subject to the receiver’s local security overrides.
  4. Reporting: Receiving mail servers supporting DMARC periodically generate aggregate XML reports (rua) and email them to the address designated in your record. These reports detail which IP addresses are sending mail claiming your domain, along with their SPF, DKIM, and DMARC alignment status.

Without DMARC, a spoofed email could pass SPF (if the attacker uses a different Return-Path domain) or bypass DKIM (if the message is not signed). DMARC closes these gaps by requiring alignment between the authentication results and the visible From address.

Suggested read: Why is DMARC Failing? Common Causes and Solutions

How to Set Up SPF, DKIM, and DMARC

Setting up all three protocols may sound technical, but the process is straightforward once you know what goes where. To implement SPF, DKIM, and DMARC, you need access to your domain DNS provider’s settings.

Step 1: Set up SPF

An SPF record is published as an TXT record in your domain’s DNS. Your SPF record tells receiving servers which IP addresses and mail servers are authorized to send email on behalf of your domain.

To create your SPF record:

  1. Identify all the servers and services that send email for your domain (your mail server, marketing platforms, CRM tools, etc.).
  2. Create a TXT record in your DNS with the authorized sending sources.
  3. Publish the record and test it to confirm it passes SPF checks.

An SPF record looks something like this:

v=spf1 include:_spf.google.com include:sendgrid.net -all

This example authorizes Google and SendGrid to send email for the domain, and “-all” makes unlisted sources produce an SPF “fail” result, meaning the domain owner states they are not authorized. Whether to reject depends on the receiver’s local policy.

Note: The include hostnames are used for example purposes only. Verify the vendors’ correct ones by checking against vendor docs.

Step 2: Set up DKIM

DKIM requires a public key to be published in the sender’s DNS to verify the digital signature on outgoing emails.

To set up DKIM:

  1. Generate a DKIM key pair (public and private key) through your email service provider or mail server.
  2. Add the public key as a TXT record in your domain’s DNS.
  3. Configure your email server or provider to sign outgoing messages with the private key.
  4. Test by sending an email and checking the headers to confirm the DKIM signature is present and valid.

Step 3: Set up DMARC

A DMARC record is published as a DNS TXT record under the _dmarc. subdomain. To set up DMARC, you need to define a policy that applies to mail that fails DMARC, meaning no aligned SPF or DKIM pass. Note that mail passing SPF and DKIM for unaligned domains still fails DMARC.

To create your DMARC record:

  1. Start with a policy of p=none to monitor your email traffic without affecting deliverability.
  2. Add a reporting address so you can receive aggregate reports about authentication results.
  3. Publish the DMARC record in your DNS.
  4. Review your reports regularly, and once you are confident your legitimate emails are passing, move to p=quarantine and eventually p=reject.

A basic DMARC record looks like this:

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

Step 4: Verify your setup

You can check if an email has passed SPF, DKIM, and DMARC checks by looking at the email headers. Send a test email and inspect the Authentication-Results header to confirm all three protocols are passing.

PowerDMARC’s free tools make this even easier. You can use the DMARC Generator, SPF Generator, and DKIM Generator to create your records in one click, and the platform’s reporting dashboard gives you full visibility into your authentication status.

Here's why 10,000+ customers trust PowerDMARC's platform

  • Huge reduction in spoofing attempts and unauthorized emails through AI-driven threat intelligence
  • Faster onboarding + automated authentication management that saves IT teams hours
  • Real-time threat intelligence & PGP-encrypted reporting across domains
  • Better email delivery rates due to strict DMARC enforcement with expert guidance

Your first 15 days are on us

Start Free Trial

What Happens if You Don’t Implement SPF, DKIM, and DMARC?

Skipping email authentication might seem harmless until the consequences start stacking up. Here is what is at stake when you leave your domain unprotected.

Damaged sender reputation

Not implementing email authentication can lead to a damaged brand reputation due to increased susceptibility to phishing attacks.

If attackers spoof your domain and send fraudulent emails to your customers, partners, or employees, the trust you have built with your audience erodes quickly. Even if you were not responsible for the attack, recipients associate the phishing attempt with your brand.

Lower email deliverability

Without email authentication, legitimate emails may be marked as spam, resulting in lower email deliverability rates.

Many email service providers now require DKIM and DMARC to be set up for successful email delivery. If your emails consistently land in spam folders, your open rates drop, your marketing efforts suffer, and important transactional emails may never reach their intended recipients. Even with all three protocols properly configured, mailbox providers also weigh how a sending domain has historically engaged real recipients – which is why teams launching a new domain typically warm up their sending infrastructure gradually by sending real, low-volume campaigns to their most engaged, opted-in subscribers, steadily scaling volume over several weeks to establish positive IP and domain reputation without violating mailbox provider policies. 

Explore email warm-up tools. 

Financial losses and customer trust issues

Failing to implement email authentication can allow attackers to impersonate your domain, leading to potential financial losses and customer trust issues.

Business email compromise (BEC) attacks, where an attacker poses as an executive or vendor, can result in fraudulent wire transfers, stolen credentials, and legal liability.

Loss of visibility

Not using email authentication can result in a loss of visibility into email performance and security, making it difficult to identify unauthorized use of your domain.

Without DMARC reports, you have no way of knowing who is sending email on your behalf, whether your legitimate emails are authenticating correctly, or whether attackers are actively spoofing your domain.

SPF, DKIM, and DMARC Best Practices

Getting your records published is just the beginning. To get the most out of SPF, DKIM, and DMARC, follow these best practices to keep your email authentication strong over time.

Start with DMARC at p=none and progress gradually

When you first implement DMARC, start with a policy of p=none so you can monitor your email traffic and identify all legitimate sending sources.

Once you are confident everything is properly authenticated, move to p=quarantine and then p=reject for full protection.

Keep your SPF record up to date

Every time you add or remove an email service (a new marketing platform, CRM, helpdesk tool, etc.), update your SPF record to reflect the change.

An outdated SPF record can cause legitimate emails to fail authentication.

Rotate your DKIM keys periodically

Regularly rotating your DKIM keys reduces the risk of key compromise. Most security experts recommend rotating keys at least once or twice a year.

Use a platform to simplify management

Managing SPF, DKIM, and DMARC across multiple domains and sending sources can get complex fast.

A platform like PowerDMARC consolidates everything into a single dashboard with hosted record management, human-readable reports, and real-time alerts so you can stay on top of your authentication posture without manual DNS editing.

Secure your Domain Confidently with PowerDMARC

As your trusted email security partner, we recommend that every organization implement SPF, DKIM, and DMARC. These protocols are the backbone of modern email protection, helping you stay ahead of cyber threats and maintain trust with every message you send.

Drawing on years of experience helping organizations secure their email infrastructure, our team at PowerDMARC recommends a phased approach to implementation.

Start with monitoring, analyze the data, then gradually enforce stricter policies as you gain confidence in your setup.

To make monitoring, reporting, and ongoing optimization easier, PowerDMARC brings SPF, DKIM, and DMARC management into a single platform. With real-time visibility, guided policy enforcement, and automated insights, it takes a lot of the manual effort out of the process, helping teams maintain a secure, reliable email authentication setup.

Start a free 15-day trial to strengthen your domain protection.

Frequently Asked Questions (FAQs)

1. What is the difference between SPF, DKIM, and DMARC?

SPF verifies that emails come from authorized IP addresses, DKIM ensures email content hasn’t been tampered with using digital signatures, and DMARC provides policy enforcement and reporting by building on both SPF and DKIM. Think of SPF as checking the email sender’s address, DKIM as verifying the message integrity, and DMARC as the overall security policy that decides what to do when checks fail.

2. Do I need both SPF and DKIM for my domain?

While you can implement SPF or DKIM individually, using both together provides significantly stronger protection. SPF can fail when emails are forwarded, and DKIM alone doesn’t verify the sending infrastructure. For maximum security and DMARC compliance, implement both SPF and DKIM, then add DMARC for policy enforcement and reporting.

3. How can I check if my SPF, DKIM, and DMARC records are working?

Use DNS lookup tools to verify records exist, send test emails and check headers for domain authentication results, analyze DMARC reports for failures, and use online validators like PowerDMARC’s free tools. Regular monitoring through DMARC reports is the most comprehensive way to ensure ongoing protection.

4. Do SPF, DKIM, or DMARC affect how my emails look to recipients?

No. These protocols work behind the scenes and do not change the appearance, content, or layout of your emails. Most email clients don’t display them by default. However, properly authenticated emails are less likely to be marked as spam, which improves inbox placement and overall trust.

5. How often should I review or update my SPF, DKIM, and DMARC records?

You should review your records whenever you add or remove email-sending services and as part of regular maintenance. SPF records often need updates when new tools or vendors are introduced. DKIM keys should be rotated periodically for security. DMARC reports should be reviewed consistently to detect issues early and guide policy enforcement.

spf dkim and dmarc