Email Marketing & Klaviyo

SPF, DKIM & DMARC Setup for Shopify and Klaviyo Domains

Emails failing authentication? Configure SPF, DKIM and DMARC across Shopify and Klaviyo sending domains so messages reach the inbox. Follow the walkthrough.

DA

Daniel Herovic — Lead Strategist & Founder

Published on Sep 25, 2026 • 13 min read

Table of Contents

    Every Shopify brand running Klaviyo has, whether the team realizes it or not, at least two separate systems sending mail on the store's behalf: Shopify itself, firing off order confirmations, shipping notifications, and password resets, and Klaviyo, sending the campaigns and flows your marketing team built. Both need to prove to Gmail, Yahoo, and every other mailbox provider that they're actually authorized to send as your domain. If either one isn't authenticated correctly, you don't get a clean failure — you get intermittent spam-folder placement, sender name rewrites to generic addresses, or silent inbox suppression that never shows up as an obvious error anywhere in Klaviyo's dashboard.

    This guide covers the one-time technical setup: what SPF, DKIM, and DMARC actually do, why a Shopify + Klaviyo stack specifically involves two sending domains under one DMARC policy, the exact DNS records each system needs, and how to verify everything is configured correctly before you consider the job done.

    Technical Note — Scope of This Guide

    This article covers getting authentication configured correctly, once — the DNS records, the alignment logic, and how to confirm each protocol is passing. It does not cover what happens after setup: ongoing inbox placement monitoring, seed-list testing, or diagnosing deliverability drift once your records are already correct. That's a separate, continuous discipline, covered in Inbox Placement Testing for Shopify Email Programs. If your SPF, DKIM, and DMARC are all passing and you're still landing in spam, that article — not this one — is where you look next.

    What SPF, DKIM, and DMARC Actually Do

    These three protocols solve related but distinct problems. Mailbox providers evaluate all three independently on every message, then use the combined result to decide whether a message looks legitimate enough to deliver.

    • SPF (Sender Policy Framework): A TXT record published on your domain that lists which mail servers are allowed to send email claiming to be from that domain. When a receiving server gets a message, it checks the sending server's IP address against your domain's SPF record. If the IP isn't on the list, SPF fails.
    • DKIM (DomainKeys Identified Mail): A cryptographic signature attached to each outgoing email, verified against a public key published in your DNS as a TXT record (delivered via a CNAME in most modern setups, including Klaviyo's and Shopify's). DKIM proves the message content wasn't altered in transit and that it was genuinely signed by a server holding the private key — i.e., a server you've authorized.
    • DMARC (Domain-based Message Authentication, Reporting & Conformance): A policy layer that sits on top of SPF and DKIM. It tells receiving mailboxes what to do when a message fails authentication, and — critically — it requires alignment: the domain in the visible "From:" address has to match (or be a subdomain of) the domain that passed SPF or DKIM. A message can pass SPF and DKIM individually and still fail DMARC if neither one is aligned with the From: domain.

    That alignment requirement is the part most Shopify merchants miss. It's why "Klaviyo says my domain is verified" and "my emails pass DMARC" are not the same statement.

    Why Shopify + Klaviyo Means Two Sending Domains, One DMARC Policy

    Here's the part that's specific to your stack, not a generic email-authentication tutorial. Shopify and Klaviyo are two independent platforms, each sending mail on your domain's behalf, and each needs its own SPF and DKIM authentication configured through its own DNS records:

    • Shopify's transactional sends: Order confirmations, shipping updates, refund notices, and password resets, sent from Shopify's infrastructure using your store's custom domain.
    • Klaviyo's marketing sends: Campaigns and flows, sent from Klaviyo's infrastructure using your branded sending domain (or Klaviyo's shared domain, if you haven't connected one).

    Both need their own CNAME-delegated SPF and DKIM records pointing at their respective platforms. But DMARC works differently: it's published once, at the root (organizational) domain level, and it governs every system sending as that domain — Shopify, Klaviyo, your helpdesk, your transactional SMS-to-email gateway, all of it. You don't need — and can't have — a separate DMARC record per platform. In fact, publishing more than one DMARC TXT record on the same domain breaks validation entirely and causes providers to treat the domain as unauthenticated.

    So the mental model is: two independent authentication setups, one shared policy. Get Shopify's CNAMEs right, get Klaviyo's CNAMEs right, and publish exactly one DMARC record that covers both.

    Setting Up SPF and DKIM for Klaviyo

    In Klaviyo, this happens through Settings > Domains > Sending Domain. Connecting a branded sending domain there generates a set of CNAME (or, on some registrars, NS) records that you add to your DNS. Once those records propagate and verify, Klaviyo automatically enables both SPF and DKIM for mail sent through that domain — you don't add separate SPF or DKIM TXT records manually; the CNAME delegation handles both.

    Without a branded sending domain connected, Klaviyo sends using its own shared domain (what shows up as "via klaviyomail.com" in some inbox clients), and your emails are DKIM-signed by Klaviyo's domain, not yours — which means they can never achieve DMARC alignment with your own domain's policy. If you're relying on Klaviyo's default setup without connecting your own domain, your marketing sends are structurally unable to pass DMARC alignment, regardless of how your DMARC record itself is written.

    Why This Works

    Connecting a branded sending domain in Klaviyo means your marketing emails are DKIM-signed by your own domain, not Klaviyo's shared one. That's what allows DMARC alignment to succeed — and alignment is the exact mechanism Google and Yahoo use to decide whether a message "is" your brand or just claims to be. Skip this step and every other piece of authentication work is undermined at the one point that matters most.

    Setting Up SPF, DKIM, and DMARC for Shopify's Own Emails

    Shopify's notification emails (order confirmation, shipping, etc.) go through a separate authentication path from Klaviyo. If your store uses a domain purchased directly through Shopify, this is handled automatically — DKIM, SPF, and a default DMARC record are configured for you with no action required.

    If your domain was registered elsewhere (GoDaddy, Cloudflare, Namecheap, etc.) and connected to Shopify, you need to add the CNAME records Shopify provides under Settings > Domains for that domain. Those CNAME records handle both SPF and DKIM authentication for Shopify's sends — no separate SPF TXT record is required for this purpose. Automated DNS connection through providers like Cloudflare, GoDaddy, or IONOS will typically configure those CNAME records for you but will not add a DMARC record; that step is manual regardless of registrar.

    If no DMARC record exists at all, Shopify (like most platforms) will fall back to protecting deliverability by rewriting your sender address to a generic format (something like [email protected]) rather than risk your branded From: address getting flagged. That's a visible, customer-facing signal that authentication is missing — if your order confirmations are arriving from a shopifyemail.com address instead of your own domain, this is why.

    Writing Your DMARC Record

    Your DMARC record is a single TXT record published at _dmarc.yourdomain.com. A minimal, compliant record looks like this:

    Host: _dmarc.yourdomain.com
    Type: TXT
    Value: v=DMARC1; p=none; rua=mailto:[email protected]

    The p= tag is the policy mode, and it's the part worth understanding rather than copy-pasting blind:

    • p=none: Monitor only. Failing messages are still delivered as normal; you just receive aggregate reports (via the rua tag) showing what passed and failed. This is the correct starting point for every domain, and it's explicitly sufficient to satisfy Google's and Yahoo's bulk sender requirements — you are not required to enforce a stricter policy to be compliant.
    • p=quarantine: Failing messages get routed to spam/junk rather than the inbox. A meaningful escalation, appropriate once you've reviewed DMARC reports and confirmed all your legitimate sending sources (Shopify, Klaviyo, any other tool sending as your domain) are passing.
    • p=reject: Failing messages are rejected outright. The strongest protection against spoofing, but also the least forgiving — if you have a sending source you forgot about (an old helpdesk integration, a review-request app, a shipping-label tool), it will be silently blocked with no delivery at all. Move here only after a monitoring period at p=quarantine shows no unexpected failures.

    Google's own bulk sender guidelines state plainly: "Set up DMARC email authentication for your sending domain. Your DMARC enforcement policy can be set to none." That guidance applies to any domain sending 5,000 or more messages per day to Gmail addresses — a threshold most stores in the $50k–$300k/mo range cross without realizing it once you count Shopify transactional mail and Klaviyo campaigns together. You are not required to reach p=reject, or even p=quarantine, to be compliant. You are required to have a published, valid, single DMARC record.

    Google's guidelines are also explicit about the alignment mechanism underneath all of this: "For direct email, the domain in the sender's From: header must be aligned with either the SPF domain or the DKIM domain. This is required to pass DMARC alignment." That's the whole system in one sentence — SPF or DKIM has to match what the recipient sees in the From: address, or DMARC fails regardless of the policy mode.

    Verifying Everything Is Configured Correctly

    Don't take "domain verified" in Klaviyo's UI as proof the whole chain works. Verify it directly:

    • Check Klaviyo's own authentication status: Settings > Domains will show whether your branded sending domain's CNAME/NS records are correctly detected and whether SPF and DKIM show as active.
    • Send a real test email and inspect headers: Send a campaign or flow test to a Gmail address you control, open the message, and check "Show original." Gmail reports SPF, DKIM, and DMARC results explicitly for every message — look for all three showing PASS, not just DKIM.
    • Check your DMARC record resolves correctly and only once: Query _dmarc.yourdomain.com with a DNS lookup tool. You should see exactly one TXT record. If you see none, or more than one, that's a hard failure state, not a warning.
    • Confirm Shopify's transactional domain independently: Under Settings > Domains in Shopify, check that the domain shows as fully connected with DNS records verified, separately from whatever you've confirmed in Klaviyo.
    • Read your DMARC aggregate reports once they arrive: The rua address you specified will start receiving daily XML reports from Google, Microsoft, and others within a few days, showing every source claiming to send as your domain and whether each passed alignment. This is the only way to catch a sending source you forgot to authenticate.

    Common SPF, DKIM and DMARC Misconfigurations

    • Sending Klaviyo campaigns without a connected branded domain: Every send is DKIM-signed by Klaviyo's shared domain instead of yours, which can never align with your DMARC policy no matter how the record is written.
    • Multiple DMARC records on the same domain: Often the result of one being added manually and another added later by a registrar's "auto-configure" tool, or a leftover record from a previous ESP migration. Multiple records cause DMARC to fail validation entirely, not just for the newer one.
    • Authenticating Klaviyo but forgetting Shopify's own domain connection (or vice versa): These are two separate setups. A merchant who connects a Klaviyo branded domain but never checks Shopify's own domain DNS status often has one system passing and one silently failing.
    • Jumping straight to p=reject: Skipping the monitoring period at p=none means you find out about a forgotten legitimate sending source (an app, a helpdesk, a marketing tool outside Klaviyo) only after it starts silently failing to deliver.
    • Confusing "domain verified" with "authentication passing": A domain can show as verified/connected in a platform's UI while still failing DMARC alignment in production sends, if the underlying DNS records are incomplete or a duplicate DMARC record exists elsewhere.

    SPF, DKIM and DMARC FAQ

    Do I need a separate DMARC record for Shopify and for Klaviyo?

    No. DMARC is published once, at your root domain (_dmarc.yourdomain.com), and it applies to every system sending as that domain simultaneously. What you need is two separate, correctly configured SPF/DKIM setups — one for Shopify, one for Klaviyo — both aligning to that single DMARC policy.

    What DMARC policy should I actually use — none, quarantine, or reject?

    Start at p=none. It satisfies Google's and Yahoo's bulk sender requirements on its own and gives you visibility into every sending source before you enforce anything. Move to p=quarantine, then eventually p=reject, only after your DMARC aggregate reports show every legitimate source passing consistently.

    Is DMARC actually required, or just recommended?

    For any domain sending 5,000 or more emails per day to Gmail addresses, Google requires SPF, DKIM, and a published DMARC record (policy can be p=none). Most Shopify brands in the $50k–$300k/mo range cross that volume once Shopify transactional mail and Klaviyo campaigns are combined, even if neither system alone looks like a "bulk sender."

    My Klaviyo domain shows as verified — why are my emails still landing in spam?

    Domain verification in Klaviyo's UI confirms the CNAME records resolve correctly; it doesn't confirm DMARC alignment is passing, that Shopify's separate transactional domain is also authenticated, or that inbox placement is otherwise healthy. Check actual message headers (Gmail's "Show original") rather than the platform's status indicator, and if authentication is confirmed passing and deliverability is still poor, that's an inbox-placement issue, not an authentication one — covered in Inbox Placement Testing for Shopify Email Programs.

    Does connecting a branded sending domain in Klaviyo affect my Shopify transactional emails?

    No, they're independent. Klaviyo's branded domain setup only authenticates mail sent through Klaviyo. Shopify's own notification emails are authenticated separately, under Settings > Domains in Shopify, and need their own CNAME records verified regardless of what you've done in Klaviyo.

    How long does it take for these DNS changes to take effect?

    DNS propagation is typically fast — often under an hour — but can take up to 48 hours depending on your registrar and existing TTL settings. Klaviyo and Shopify will both show a pending/unverified state in their respective domain settings until propagation completes and the records are detected.

    Next Step

    This guide supports our Shopify email deliverability and Shopify email marketing agency pages, which cover the full methodology. Related reading: Sunset Flow and List Hygiene for Shopify Klaviyo. To have this diagnosed on your own store, apply for the $997 Retention Assessment.

    DA

    About the Author

    Daniel Herovic — Lead Strategist & Founder

    Spent over two decades building ecommerce infrastructure — from custom carts and checkouts before Shopify existed to founding OPTIUM, closing the gap between installing Klaviyo and actually building it.

    Know Exactly What's Capping Your Growth

    A real audit of your Klaviyo setup or technical SEO — credited back in full if you move forward. Apply in 5 minutes.

    Apply for the $997 Assessment

    Credited back in full if you continue • Timeline confirmed at scheduling • Refund terms confirmed in writing