How to fix missing spf on WooCommerce REST API
Add a DNS TXT record containing a valid SPF policy to your domain so email servers can verify that messages sent from your domain are legitimate.
Steps for WooCommerce REST API
- This is a headless WooCommerce setup; email is still sent by the WordPress/WooCommerce backend via your SMTP configuration.
- Identify your SMTP provider in your SMTP plugin settings (e.g. WP Mail SMTP → Settings) and add its SPF include: tag to a TXT record at '@' in your DNS provider.
- Verify propagation.
; DNS TXT record to add at your domain apex (e.g. yourstore.com)
; Replace the include: values with the ones published by YOUR sending services.
@ 3600 IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net include:shops.shopify.com ~all"
; Key parts:
; v=spf1 → SPF version (required, always this value)
; include:… → Delegate to another provider's SPF list (add one per sending service)
; ip4:203.0.113.5 → Authorize a specific server IP directly (use only if needed)
; -all → Hard fail: reject mail from any unlisted sender (most secure)
; ~all → Soft fail: accept but mark unlisted senders (use during rollout)What is missing spf?
SPF (Sender Policy Framework) is a DNS record — a single line of text published at your domain's root — that tells the world's email servers which mail-sending services are officially allowed to send email on behalf of your domain. Without it, there is no published list of authorized senders, so receiving mail servers have no way to confirm whether an email claiming to be "from yourstore.com" actually came from you or from an attacker. It is one of the three foundational email-authentication standards (SPF, DKIM, and DMARC) that major inbox providers now require.
Without an SPF record, cybercriminals can send convincing phishing and spoofing emails that appear to come from your store's domain — targeting your customers, suppliers, and staff. Beyond fraud risk, inbox providers like Google and Microsoft use SPF as a key trust signal: missing or broken SPF causes your legitimate order confirmations, shipping updates, and marketing emails to land in spam or be rejected outright, directly harming customer experience and revenue. Google and Yahoo's 2024 bulk-sender requirements made SPF mandatory for deliverability. Failing to publish one is classified as a Security Misconfiguration (OWASP A05:2021) because it leaves your domain's identity unprotected and exploitable.
See the complete Missing spf guide for every platform and the full background.
Not sure if your WooCommerce REST API store has this?
Run a free SEOLZ audit — we’ll find missing spf and every other issue across your whole site.
Scan my site free