SPF, DKIM and DMARC setup guide for WooCommerce stores

Every WooCommerce store sending order receipts or newsletters from its own domain needs three DNS records: one SPF TXT record (at most 10 DNS lookups under RFC 7208), one DKIM signing key per active mail service, and one DMARC TXT record at _dmarc.yourdomain.com starting at v=DMARC1; p=none;. Google and Yahoo require full SPF, DKIM and DMARC authentication for bulk senders above 5,000 messages per day.

Updated By THTheme Editorial Team

Key facts

Three DNS records required for WooCommerce email authentication
RecordDNS host / nameTypeWhat it proves
SPF@ (or subdomain)TXTWhich servers/IPs are authorized to send for the Return-Path domain
DKIMselector._domainkeyTXT or CNAMEMessage was cryptographically signed and not altered in transit
DMARC_dmarcTXTHow receivers handle unaligned mail plus where to send XML reports

1. Build a single valid SPF record

Inventory every system that legitimately sends email using your domain: your corporate inbox (Google Workspace or Microsoft 365), your WooCommerce transactional mailer (Amazon SES, Postmark, Brevo or Mailgun), your newsletter platform and your support desk. Combine them into one TXT record at the root (@):

v=spf1 include:_spf.google.com include:amazonses.com ~all

2. Publish DKIM keys for every sender

Unlike SPF, which breaks when messages are forwarded, DKIM signatures travel inside the email header itself. Inside each mail service's domain settings, generate its DKIM DNS records (usually 1 to 3 CNAME or TXT entries under _domainkey) and add them to your DNS host (Cloudflare, Route 53, GoDaddy, etc.).

3. Roll out DMARC in three safe phases

Publishing p=reject immediately before verifying every plugin, billing tool and CRM will block real customer receipts. Move in stages:

  1. Monitor (weeks 1 to 2): v=DMARC1; p=none; rua=mailto:[email protected]; adkim=r; aspf=r; Read aggregate reports to catch forgotten senders (contact forms, accounting tools, shipping apps).
  2. Quarantine (weeks 3 to 4): change to p=quarantine; pct=25;, then raise pct=100 once legitimate pass rate reaches 99%+.
  3. Reject (steady state): set p=reject; to stop spoofed phishing emails using your brand domain.

Test your published records in seconds using the free SPF, DKIM and DMARC checkers at DeliverabilityRecovery (same owner as THTheme). If reports show persistent misalignment or broken DNS flattening, it also runs 24-hour deliverability audits ($1,500).

4. Check header alignment on a real WooCommerce order

Place a test order (or trigger an invoice email from an existing test order) to a Gmail address. Click the three-dot menu and open Show original. Verify that the visible From: domain matches the DKIM d= signing domain (DKIM alignment) and, ideally, the Return-Path domain (SPF alignment). Both relaxed alignment (same organizational domain, such as orders.store.com and store.com) and strict alignment pass standard DMARC checks.

If authentication passes but mail still hits spam, follow our WooCommerce spam troubleshooting guide.

FAQ

What happens if my domain has two SPF records?

Under RFC 7208 section 3.2, receiving mail servers return an SPF PermError when multiple v=spf1 TXT records exist on the same hostname, causing SPF authentication to fail.

Does DMARC require both SPF and DKIM to align?

No. Under RFC 7489, DMARC passes if either SPF passes with alignment or DKIM passes with alignment, though configuring both protects against forwarding failures.

Why do Cloudflare DKIM CNAME records fail verification?

Most often because the Cloudflare proxy (orange cloud) is turned on for the CNAME record. Switch DKIM CNAME records to DNS only (grey cloud) so mail servers can read the public key.

Can I use a subdomain for WooCommerce emails without hurting my root domain?

Yes. Sending transactional emails from a subdomain such as orders.yourdomain.com lets you set dedicated SPF and DKIM records and isolate reputation while inheriting root organizational DMARC alignment.

Sources