Skip to main content
All CollectionsSource Configuration
Klaviyo SPF and DKIM Setup: A Comprehensive Step-by-Step Guide
Klaviyo SPF and DKIM Setup: A Comprehensive Step-by-Step Guide
Updated over a month ago

Setting up SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) records for your domain is crucial for improving your email deliverability, preventing unauthorized email use, and ensuring your emails align with DMARC (Domain-based Message Authentication, Reporting & Conformance) standards. This comprehensive guide will walk you through the entire process of configuring SPF and DKIM for Klaviyo.


What Are SPF and DKIM?

  • SPF (Sender Policy Framework): SPF is a system that allows receiving mail servers to verify whether an email is coming from a server authorized by the domain's owner. It helps prevent spammers from sending emails pretending to be from your domain (a.k.a. email spoofing).

  • DKIM (DomainKeys Identified Mail): DKIM uses cryptographic keys to add a digital signature to every email. This signature ensures the receiving mail server can verify that the email was indeed sent from your domain and hasn't been altered during transit.

Together, SPF and DKIM help authenticate your emails, ensuring that they are from trusted senders and haven't been tampered with, increasing the chances of your emails being successfully delivered to your recipients' inboxes.


Steps to Configure SPF and DKIM in Klaviyo

  1. Log in to Your Klaviyo Account

    • Open your Klaviyo dashboard and log in using your account credentials.

    • In the bottom-left corner, click on your account name and select Settings from the dropdown menu.

  2. Navigate to Domain Settings

    • In the Settings menu, hover over Settings and click on Domains.

  3. Add Your Domain

    • Click on the Add Domain button to initiate the setup process.

    • A pop-up will appear where you will enter your domain name (e.g., yourdomain.com).

    • Klaviyo will automatically generate a subdomain for you, typically something like email.yourdomain.com. You can change this subdomain if needed, but for simplicity, it’s recommended to leave it as is.

    • Make sure to select the Static option (static subdomain) for consistency.

  4. Copy the CNAME Record for the Subdomain

    • After the domain is added, Klaviyo will automatically provide the necessary records.

    • Start by copying the CNAME record that Klaviyo generates for the subdomain. This is necessary for SPF and DKIM setup.

  5. Add the CNAME Record to Your DNS

    • Log in to your DNS provider’s portal (CloudFlare, GoDaddy, etc.).

    • Navigate to the DNS Management section and create a new CNAME record.

    • In the CNAME record, paste the details provided by Klaviyo (typically the name and value) and save it.

    Example:

    • Name: email.yourdomain.com

    • Value: klaviyo.yourdomain.com

  6. Copy the First DKIM Record

    • After the subdomain record is added, proceed to copy the first DKIM CNAME record generated by Klaviyo. This will be listed in your Klaviyo domain setup interface.

  7. Add the First DKIM Record to Your DNS

    • Go back to your DNS provider, and create another CNAME record.

    • Add the DKIM information provided by Klaviyo for the first DKIM record.

    • The name of this record will likely be a combination of your domain and a unique selector (e.g., klaviyo._domainkey.yourdomain.com)

  8. Copy the Second DKIM Record

    • Klaviyo generates a second DKIM record for you as well. Copy this second DKIM CNAME record.

  9. Add the Second DKIM Record to Your DNS

    • Create a second CNAME record in your DNS zone for the second DKIM entry provided by Klaviyo.

    • As with the first DKIM record, ensure that the name and value correspond correctly.

  10. Copy and Add the TXT Record for SPF

    • Klaviyo will also provide a TXT record for SPF (Sender Policy Framework).

    • Copy this TXT record from the Klaviyo setup page.

  11. Add the TXT Record to Your DNS

    • In your DNS provider’s portal, create a new TXT record.

    • Paste the values provided by Klaviyo for the SPF record.

    • The TXT record will typically look something like this:

      makefileCopy codev=spf1 include:klaviyo.com ~all
  12. Verify the DNS Records in Klaviyo

    • Once all records (CNAME for DKIM and TXT for SPF) are added to your DNS zone, head back to Klaviyo.

    • On the domain setup page in Klaviyo, click on the Verify Records button to confirm that the records have been correctly added to your DNS.

    • Klaviyo will check the records and show you a confirmation.

  13. Confirm the Activation

    • Once the records have been verified, the warning icons should turn green.

    • Click on the Activate button to finalize the SPF and DKIM configuration for your domain.

    • After activation, the domain status will change to Active.

  14. Wait for DNS Propagation

    • It may take up to 72 hours for DNS changes to propagate fully across the internet. However, your SPF and DKIM records should pass verification almost immediately after setup if done correctly.


Final Steps:

  • After completing the setup, your domain will be fully configured with SPF and DKIM, ensuring that emails sent from Klaviyo are properly authenticated.

  • This configuration not only improves your email deliverability but also helps protect your domain from spoofing and phishing attempts.


Why SPF and DKIM Matter for Your Emails

  • Improved Deliverability: SPF and DKIM ensure that your emails are trusted by receiving servers, improving your inbox placement.

  • Protects Your Domain: These protocols help prevent unauthorized users from sending fraudulent emails using your domain.

  • DMARC Compliance: Setting up SPF and DKIM is essential for passing the DMARC alignment check, which protects your brand from phishing and email fraud.


Congratulations!

You’ve successfully configured SPF and DKIM for Klaviyo, ensuring your email marketing campaigns are secure, legitimate, and have the best chance of reaching your audience's inbox.

Did this answer your question?