How do I set up SPF, DKIM and DMARC so my D2C emails land in the inbox?

A plain guide to SPF, DKIM and DMARC for D2C brands: what each does, how to set them up for Shopify, Google Workspace, Klaviyo or Amazon SES.

Anadoris Digital · · 4 min read

Envelope
Photo: Joanna Kosinska / Unsplash (CC0)

Order confirmations, shipping updates, password resets and marketing campaigns all depend on reaching the inbox. Major mailbox providers such as Gmail and Yahoo have tightened requirements for senders, and messages from domains without proper authentication are more likely to land in spam or be rejected. Authentication also protects your brand from scammers sending fake emails that appear to come from you.

SPF, DKIM and DMARC are three DNS-based standards that work together. Setting them up takes a few hours of careful work, mostly copying records from each email service into your DNS and checking the results.

What each one does

  • SPF (Sender Policy Framework): a DNS record listing the servers and services allowed to send email for your domain.
  • DKIM (DomainKeys Identified Mail): a digital signature added to each email, checked against a public key in your DNS, proving the message was not altered and came from an authorised sender.
  • DMARC (Domain-based Message Authentication, Reporting and Conformance): a policy telling receiving servers what to do when SPF or DKIM checks fail, and where to send reports.

DMARC also requires alignment: the domain in the visible From address should match the domain verified by SPF or DKIM. This is why sending services ask you to authenticate your own domain rather than sending from theirs.

List everything that sends email as you

Before touching DNS, list every service that sends email using your domain. Missing one is the most common cause of problems once DMARC is enforced.

  • Your email host, such as Google Workspace or Microsoft 365.
  • Shopify notifications and Shopify Email.
  • Marketing platforms such as Klaviyo, Mailchimp or similar.
  • Transactional services such as Amazon SES, SendGrid or Postmark, used by custom apps.
  • Helpdesk tools such as Freshdesk, Zendesk or Gorgias.
  • Invoicing, ERP or CRM tools that email customers or suppliers.

Set up SPF and DKIM for each service

Each service provides the records to add, usually in its domain authentication settings. For DKIM, this is typically one or more CNAME or TXT records. For SPF, you add an include for services that need it to your single SPF record. Keep only one SPF record per domain, combine services into it, and avoid exceeding SPF's lookup limits by removing services you no longer use.

  • Google Workspace: turn on DKIM in the admin console and add its record.
  • Shopify: authenticate your sender domain in Shopify's notification settings.
  • Klaviyo and similar tools: set up a branded sending domain with their DNS records.
  • Amazon SES: verify your domain with Easy DKIM and consider a custom MAIL FROM domain for SPF alignment.
  • Consider sending marketing email from a subdomain such as mail.yourbrand.in, so its reputation is separate from transactional mail.

Roll out DMARC in stages

Start with a DMARC policy of none, which changes nothing about delivery but sends you reports about who is sending as your domain and whether they pass. Use a DMARC reporting tool to read these reports, since raw reports are hard to interpret. Fix any legitimate services that fail. Then move to quarantine, which sends failing mail to spam, and finally to reject, which blocks it. Move gradually, watching reports at each step.

Beyond authentication

Authentication gets you through the door, but reputation decides where you land. Mailbox providers also look at complaint rates, bounces and engagement. Send marketing only to people who opted in, include a clear one-click unsubscribe, remove addresses that bounce, and stop mailing people who never open. Check Google Postmaster Tools for your domain's reputation with Gmail. If reputation drops, slow down marketing sends and focus on your most engaged subscribers until it recovers, so transactional emails are not affected.

Common mistakes to avoid

The most frequent problem is publishing more than one SPF record, which makes SPF fail entirely. Others include forgetting a sending service before moving DMARC to reject, so legitimate emails such as invoices or helpdesk replies start bouncing, and leaving old services in the SPF record long after they were cancelled. Sending marketing from your main domain without warming it up can also damage the reputation your order emails rely on.

Another mistake is treating setup as a one-off task. Every time you add a new tool that emails customers, it needs to be authenticated before it goes live. Make that part of your checklist for adopting any new marketing, support or operations tool, and keep reading DMARC reports occasionally to catch services that someone connected without telling you.

Where to start

List every service that sends email as your domain. Use a free checker to see your current SPF, DKIM and DMARC status. Set up DKIM for each service and tidy your SPF record into one. Publish a DMARC record with a policy of none and a reporting address, read the reports for a few weeks, fix failures, then tighten the policy step by step.

Related service: AWS & Cloud Management · More on this topic: AWS & Cloud Management articles

Common questions

Do I need DMARC if I already have SPF and DKIM?

Yes. SPF and DKIM provide checks, but DMARC tells receiving servers what to do when they fail and sends you reports. Major mailbox providers expect bulk senders to have DMARC, and it is the main protection against others spoofing your domain.

Why are my Shopify emails going to spam?

Common causes are an unauthenticated sender domain, missing DKIM or DMARC, sending from a free email address, or poor list quality on marketing emails. Authenticate your domain in Shopify, set up DMARC and keep marketing lists clean and opted in.

What is a DMARC policy of none, quarantine and reject?

None only monitors and reports without affecting delivery. Quarantine asks receivers to treat failing messages as suspicious, usually sending them to spam. Reject asks receivers to block failing messages. Move from none to reject gradually as reports confirm legitimate senders pass.

Can I use Amazon SES for D2C transactional email?

Yes. Amazon SES is widely used for transactional email from custom apps. Verify your domain with DKIM, set up a custom MAIL FROM domain, handle bounces and complaints, and request production access. Check current AWS pricing and sending limits.

Your next chapter

Let’s build what comes next.

A new website. A better system. A simpler way to work. Tell us where you want to begin.

Discuss your project