How do I troubleshoot DMARC, SPF, and DKIM setup issues in Klaviyo?

Summary

Troubleshooting DMARC, SPF, and DKIM setup issues in Klaviyo involves a multi-faceted approach. Start by verifying the setup using Klaviyo's documentation and tools, while understanding that some third-party tools may not be entirely accurate. Address DMARC alignment by ensuring the 'From' domain matches validated domains. Manage SPF records by including all sending sources and staying within the 10 DNS lookup limit. Properly validate DKIM records using tools like dmarcian and understanding the importance of the selector. Be aware of how DMARC policies affect email delivery and how subdomains inherit these policies. Finally, adopt a monitoring approach with a 'none' DMARC policy initially before moving to stricter settings. Always check email headers to understand authentication results and confirm DNS records have propagated after making changes.

Key findings

  • DMARC Alignment: DMARC requires either SPF or DKIM to pass and align, meaning the domain in the 'From' address must match the domain validated by SPF or DKIM.
  • SPF Configuration: SPF records must include all authorized sending sources and adhere to the 10 DNS lookup limit to avoid 'SPF Permanent Error'.
  • DKIM Verification: Verifying DKIM involves checking DNS records and the selector, and reviewing a received message for full confirmation.
  • DMARC Policies: DMARC policies (none, quarantine, reject) dictate how emails are handled based on authentication results; 'none' is for monitoring.
  • Subdomain Impact: DMARC policies set for a primary domain can influence the deliverability of emails from subdomains.

Key considerations

  • Tool Accuracy: Be aware that some third-party tools might not accurately reflect DMARC/SPF/DKIM setup and results due to selector or other limitations.
  • Policy Implementation: Start with a DMARC policy of 'none' to monitor results before implementing stricter policies like 'quarantine' or 'reject'.
  • DNS Propagation: Always ensure DNS records have fully propagated after making changes to SPF, DKIM, or DMARC settings.
  • Header Analysis: Checking raw email headers is crucial to accurately diagnose SPF, DKIM, and DMARC pass/fail results.
  • DKIM Selectors: When configuring multiple DKIM selectors, use unique keys for each.
  • SPF Flattening: If you are exceeding the 10 DNS lookup limit in SPF, consider flattening your SPF records.

What email marketers say
10Marketer opinions

Troubleshooting DMARC, SPF, and DKIM setup issues in Klaviyo involves verifying correct alignment, monitoring DMARC policies, and ensuring proper SPF and DKIM configurations. Key steps include checking DNS propagation, ensuring proper syntax, respecting DNS lookup limits, and understanding how subdomains affect DMARC.

Key opinions

  • DMARC Alignment: DMARC requires SPF or DKIM to pass and align, meaning the domain in the 'From' address must match the domain validated by SPF or DKIM.
  • DMARC Policies: DMARC policies (none, quarantine, reject) dictate how emails that fail authentication are handled, with 'none' being a monitoring mode.
  • SPF Configuration: SPF records must include all authorized sending sources and adhere to the 10 DNS lookup limit to avoid failures.
  • DKIM Verification: Verifying DKIM involves checking DNS records for propagation and ensuring correct signatures.
  • Subdomain Impact: DMARC policies set for a main domain can be inherited by subdomains, affecting email authentication.

Key considerations

  • Tool Accuracy: Third-party tools may not always accurately reflect DMARC setup due to selector issues.
  • Policy Staging: Start with a DMARC policy of 'none' to monitor results before implementing stricter policies like 'quarantine' or 'reject'.
  • Header Inspection: Checking raw email headers helps identify the domain used for SPF checks and authentication results.
  • DNS Propagation: Ensure DNS records have fully propagated after making changes to SPF, DKIM, or DMARC settings.
  • Key Rotation: Address DKIM failures related to key rotation issues by ensuring DNS records are updated accordingly.
  • Multiple Selectors: For multiple DKIM selectors, ensure different keys are used for different DNS records.
Marketer view

Email marketer from Email on Acid shares common DMARC errors. These include incorrect syntax, SPF failures due to exceeding DNS lookup limits, and DKIM failures due to key rotation issues. The article advises using DMARC monitoring tools to identify and resolve these errors.

December 2021 - Email on Acid
Marketer view

Email marketer from Gmass answers question about how subdomains can affect DMARC. For example if you have a DMARC record set up for your main domain, then subdomains with email traffic will inherit that DMARC policy.

July 2021 - Gmass
Marketer view

Email marketer from Postmark advises troubleshooting SPF failures by checking the syntax and ensuring all sending sources are included. The documentation advises checking the raw email headers to identify the domain used for the SPF check and comparing it to the SPF record for that domain.

December 2022 - Postmark
Marketer view

Email marketer from Microsoft support explains how to view message headers to check email authentication results. This includes how to see if SPF, DKIM, and DMARC passed or failed for a particular email.

May 2024 - Microsoft
Marketer view

Email marketer from Mailjet explains how to configure SPF records. It provides guidance on creating an SPF record that includes all authorized sending sources (e.g., Mailjet servers, Klaviyo servers, internal servers). It also highlights the 10 DNS lookup limit for SPF and how to avoid common misconfigurations.

January 2023 - Mailjet
Marketer view

Email marketer from StackExchange answers a user question about DKIM appearing not valid. It suggests checking the DNS records have propagated, and that you have the correct DKIM signature.

August 2022 - StackExchange
Marketer view

Email marketer from AuthSMTP describes DNS records for DKIM. In particular if there are multiple selectors, it's important to have different DKIM keys on different DNS records.

April 2024 - AuthSMTP
Marketer view

Marketer from Email Geeks, Faisal Misle, indicates the DMARC setup is properly aligned and the tool used might not be accurate. He suggests the tool might not know the selector being used.

May 2023 - Email Geeks
Marketer view

Email marketer from Reddit explains DMARC policies (none, quarantine, reject). It describes 'none' as a monitoring mode, 'quarantine' as placing failing emails in spam, and 'reject' as blocking emails. The post advises starting with 'none' to monitor results before moving to stricter policies.

April 2021 - Reddit
Marketer view

Email marketer from Stack Overflow addresses a DMARC failure even when SPF and DKIM pass. It highlights that DMARC requires either SPF or DKIM to pass *and* align. Alignment means that the domain in the 'From' address must match the domain validated by SPF or DKIM. The answer suggests checking the alignment status if SPF and DKIM checks out individually.

September 2023 - Stack Overflow

What the experts say
7Expert opinions

Troubleshooting DMARC, SPF, and DKIM setup issues involves verifying the setup using tools, understanding DKIM selector implications, respecting SPF DNS lookup limits, and employing valid testing methodologies. Confirmation of setup correctness from tools and experts is valuable, but deeper analysis is sometimes necessary to ensure functionality.

Key opinions

  • DMARC Setup Confirmation: Tools and experts can confirm the basic DMARC setup, but this does not guarantee full functionality.
  • DKIM Selector Importance: Retrieving a DKIM public key relies on knowing or guessing the selector; verification requires examining received messages.
  • SPF DNS Lookup Limits: SPF records are limited to 10 DNS lookups; exceeding this limit results in an SPF Permanent Error and record invalidation.

Key considerations

  • Selector Guessing: Testing websites often guess at DKIM selectors, which can lead to inaccurate results if non-standard selectors are used.
  • SPF Record Flattening: Reduce SPF DNS lookups by flattening SPF records to avoid exceeding the limit, especially when using multiple includes.
  • SPF Testing Tools: Be cautious when using online SPF testing tools due to potential issues with their code; direct header analysis may be more reliable.
  • Review Received Message: The only 100% accurate way to confirm that DKIM is working, is to review a received message from that sender.
Expert view

Expert from Spam Resource, Laura Atkins, answers questions about testing SPF records. It's important to test your SPF records to ensure they are valid before sending email. It suggests that many online tools use bad code, and may cause issues. Check if your SPF record returns a neutral result, or check your headers directly.

July 2021 - Spam Resource
Expert view

Expert from Email Geeks, Steve Atkins, confirms that according to his tool, the DMARC setup is working correctly.

September 2021 - Email Geeks
Expert view

Expert from Spam Resource, Laura Atkins, explains the DNS lookup limit with SPF. Using too many includes will cause problems, so it's worth flattening your SPF records if possible.

August 2024 - Spam Resource
Expert view

Expert from Email Geeks explains even if the selector is found, you're not sure if it's actually in use. The only 100% accurate way to confirm that DKIM is working, is to review a received message from that sender.

July 2024 - Email Geeks
Expert view

Expert from Word to the Wise, Steve Atkins, explains that seeing a 'spf Permanent Error: Too many DNS lookups' message when testing a domain's SPF record means that the SPF record is invalid and must be fixed. The error means that the SPF record exceeds the limit of 10 DNS lookups. This is a common problem.

March 2021 - Word to the Wise
Expert view

Expert from Email Geeks explains the only way to get a DKIM public key unless you know, or can guess, the selector. A lot of test websites guess at the selector, by trying a long list of possibles. Obviously that fails unless you use a common choice of selector.

October 2023 - Email Geeks
Expert view

Expert from Email Geeks, Al Iverson, confirms the setup looks good and mentions Klaviyo's work on one-click unsubscribe.

December 2022 - Email Geeks

What the documentation says
4Technical articles

Troubleshooting DMARC, SPF, and DKIM involves following setup guides, understanding record syntax, and validating DNS records. Key resources include Klaviyo's setup documentation, dmarcian's DKIM checking guide, Cloudflare's explanation of DMARC policies, and the RFC defining SPF syntax.

Key findings

  • Klaviyo Setup: Klaviyo provides documentation for setting up DMARC, SPF, and DKIM, including steps for authenticating sending domains and troubleshooting issues.
  • DKIM Record Verification: dmarcian outlines methods to check DKIM records using online tools or command-line utilities, emphasizing the importance of validating the selector.
  • DMARC Policies: Cloudflare explains DMARC policies (none, quarantine, reject) and their impact on email delivery.
  • SPF Record Syntax: The RFC defines SPF record syntax, including mechanisms and qualifiers for specifying authorized sending sources.

Key considerations

  • DNS Record Validation: Properly validating DNS records is crucial for ensuring that SPF, DKIM, and DMARC are correctly configured.
  • Selector Validation: Validating the DKIM selector ensures that the correct public key is being used for DKIM verification.
  • Policy Impact: Understanding the impact of different DMARC policies is essential for managing email deliverability.
  • Syntax Accuracy: Adhering to the correct SPF record syntax is critical for avoiding configuration errors.
Technical article

Documentation from RFC explains SPF record syntax. It outlines the different mechanisms and qualifiers that can be used in an SPF record, such as 'a', 'mx', 'ip4', 'ip6', 'include', etc. It also specifies the rules for combining these mechanisms to create a valid SPF record.

November 2022 - RFC
Technical article

Documentation from Klaviyo explains how to set up a sending domain with DMARC, SPF, and DKIM. It details the steps for authenticating a sending domain, including adding DNS records and troubleshooting common issues within the Klaviyo platform.

October 2022 - Klaviyo
Technical article

Documentation from Cloudflare explains DMARC records and implementation. It outlines the different DMARC policies (none, quarantine, reject) and how they affect email delivery. It includes detail around proper record syntax.

April 2024 - Cloudflare
Technical article

Documentation from dmarcian explains checking the DKIM record. It outlines how to use online tools or command-line utilities (like dig or nslookup) to query the DNS record and verify the presence and correctness of the DKIM public key. The importance of validating the selector is also mentioned.

July 2022 - dmarcian