Skip to main content
All CollectionsTroubleshooting & Support
Troubleshooting SPF and DKIM Failures
Troubleshooting SPF and DKIM Failures

A step-by-step guide to troubleshoot SPF and DKIM failures, ensuring proper email authentication, preventing spoofing, and improving deliverability through DNS checks, record validation, and compliance tools.

Updated over a month ago

SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) are essential components for email authentication and preventing spoofing. If misconfigured, they can lead to email deliverability issues and compliance failures. This detailed troubleshooting guide will help you diagnose and fix SPF and DKIM-related problems effectively.

Step 1: Verify SPF Record Configuration

To ensure your SPF record is correctly set up:

  • Check DNS Settings: Confirm that your SPF record is published in your domain's DNS under a TXT record.

  • SPF Record Syntax: Ensure the SPF record syntax is correct. Example:
    v=spf1 include:_spf.yourdomain.com -all

  • Include Mechanisms: Verify all sending sources are included, such as email service providers and third-party senders.

  • Limitations: SPF has a 10 DNS lookup limit. If exceeded, emails may fail authentication.

Step 2: Verify DKIM Record Configuration

For DKIM to work correctly:

  • Check for Public Key: Confirm the DKIM public key is published as a TXT record in your domain's DNS.

  • DKIM Selector: Ensure the correct selector is being used when signing outgoing emails.

  • Record Syntax: A valid DKIM record example:
    v=DKIM1; k=rsa; p=MIIBIjANBgkqh...

  • Key Match: Ensure the public key in DNS matches the private key used to sign outgoing messages.

Step 3: Confirm Alignment and Proper Authentication

SPF and DKIM need to align with the domain used in the "From" address for DMARC compliance:

  • SPF Alignment: Verify the domain in the Return-Path header matches the From address domain.

  • DKIM Alignment: Confirm the signing domain (d=) in the DKIM signature matches the From address domain.

Step 4: Use Diagnostic Tools

Leverage the following tools for troubleshooting:

  • SPF Record Checker: Verify SPF record correctness and lookup limits.

  • DKIM Record Checker: Confirm public key presence and selector usage.

  • DMARC Lookup Tool: Check overall domain authentication status.

Step 5: Monitor and Review Reports

  • DMARC Reports: Review failure reports to identify non-compliant sending sources.

  • Aggregate Data: Examine trends and recurring issues in DMARC reports.

Step 6: Address Common Issues

  • SPF Failures: Caused by exceeding DNS lookup limits or missing senders in the record.

  • DKIM Failures: Occur due to incorrect selector usage or key mismatches.

  • Email Deliverability Problems: May arise when DMARC is set to p=reject without proper configuration.

Step 7: Implement Corrective Actions

  • Update Records: Adjust SPF and DKIM records as necessary.

  • Testing Mode: Use DMARC policy p=none initially for monitoring.

  • Gradual Enforcement: Move to p=quarantine and finally p=reject after verifying configurations.


Need More Help?

If you continue to face issues, utilize our Guided Setup tool for step-by-step assistance or contact our support team for personalized troubleshooting guidance. Ensure your domain remains secure and compliant with proper SPF, DKIM, and DMARC configurations.

Did this answer your question?