DMARC Monitor

WordPress emails going to spam? Check SPF, DKIM and DMARC

By Matt Pritchett · · Updated · 6 min read

If your WordPress emails are going to spam, the usual cause is that nothing proves they came from your domain. Out of the box, WordPress hands its mail to your web server, and that server is rarely listed in your SPF record or signing with your domain's DKIM key. Gmail requires every sender to have SPF or DKIM, so password resets, contact form alerts and WooCommerce receipts start landing in spam or going missing. You can find out which part is broken in about five minutes, with two free checks.

Why WordPress mail is easy to flag

WordPress sends everything through one function, wp_mail(). Plugins use it too: your contact form, WooCommerce, your membership or course plugin. Unless something changes it, the From address is wordpress@ followed by your site's domain, and the mail leaves from whatever server hosts your site.

Receiving servers check three things:

  • SPF: is the server that sent this message listed as allowed to send for the domain?
  • DKIM: is the message signed with a key published in the domain's DNS?
  • DMARC: did SPF or DKIM pass for the same domain as the From address, and what should happen if neither did?

Google's sender guidelines set the bar. All senders need SPF or DKIM. Anyone sending more than 5,000 messages a day to Gmail accounts needs SPF, DKIM and DMARC, and the domain in the From header must be aligned with either the SPF domain or the DKIM domain. A shared web host usually fails all three for your domain, even when the site itself works fine.

One more thing to know before you start: when wp_mail() reports success, that only means WordPress handed the message on. WordPress's own documentation says a true return value does not automatically mean the user received the email.

Minute 1: send yourself a test email

Trigger a real email from your site to a Gmail address you can open. A password reset from the login page works, or a contact form entry.

Open the message in Gmail, click More next to Reply, then Show original. The full header opens in a new window. Look for the Authentication-Results line. It is the standard header field for recording the result of each check, and it reads like this:

spf=pass, dkim=pass, dmarc=pass

If the test email never arrives, check the spam folder first. If it isn't there either, the message may have been rejected outright, which points to the same records.

Minutes 2 and 3: check your domain's records

Run the free email authentication check on your domain. It reads your SPF, DKIM, DMARC, BIMI and MX records in one pass and gives you an A to F grade, a plain-English fix for each problem and the exact record to paste into your DNS. It only reads public DNS records, so there is nothing to install on WordPress and no sign-up.

For DKIM, the check tries the common selectors. If your email provider gave you a different one (the part before ._domainkey), add it in the selector field.

Minutes 4 and 5: match the result to the fix

Put the header and the check side by side. Most WordPress sites land in one of these.

spf=fail or softfail, or no SPF record at all

The server that sent your mail isn't in your SPF record. On WordPress, that server is usually your web host. You have two ways out: add the host's include to your SPF record, if it offers one, or send WordPress mail through a service that already authenticates your domain and add that service's include instead. Our SPF record examples list the include for Google Workspace, Microsoft 365 and other common senders.

Keep it to one SPF record. The SPF standard says a domain must not have multiple records that would cause a check to select more than one, so a second record added by a new tool breaks SPF for everything. Merge them into a single line.

dkim=none or dkim=fail

Your web host isn't signing the message with your domain's key, or the key in DNS doesn't match the one doing the signing. DKIM is set up by whatever sends the mail: it gives you a record to publish under its own selector. A plain web host often has no way to do this, which is the main reason sites move their mail to a sending service.

spf=pass and dkim=pass, but dmarc=fail

This one confuses people. The message passed SPF or DKIM, but for someone else's domain, such as your host's or your newsletter tool's, not the domain in your From address. DMARC needs at least one of them to pass for your own domain. The fix is to set up that sender's custom domain authentication (its SPF include and its DKIM record for your domain), not to add more records.

No DMARC record, or "DMARC policy not enabled"

With no DMARC record, bulk senders don't meet Google's rules. With p=none, mail is delivered but your domain is easy to spoof. Start with p=none and a rua address so you get reports, then follow our steps from p=none to reject. Don't enforce until every service that sends as your domain passes, or your own receipts will be the first mail blocked.

The lasting fix for WordPress

Fixing records on a web host that can't sign for your domain only gets you part way. The fix that holds is to route wp_mail() through a sending service that authenticates your domain, and to send from a real address on that domain rather than wordpress@.

That's what we built SendWP for. Connect it from inside WordPress, and the password resets, contact form alerts and WooCommerce receipts your site sends through wp_mail go out from your own authenticated domain, with a log of every one. If you already use an SMTP plugin with a mail service, the same checks apply: that service needs its SPF include and its DKIM record for your domain.

If every check passes and mail still goes to spam

Authentication gets you a hearing, not a guaranteed inbox. Google's guidelines also ask senders to:

  • keep spam rates reported in Postmaster Tools below 0.3%
  • have valid forward and reverse DNS (PTR) records for the sending server
  • use a TLS connection for transmitting email
  • give marketing messages one-click unsubscribe and a visible unsubscribe link

A sending service handles the PTR and TLS side for you. The spam rate is about what you send and to whom: a contact form that mails autoresponders to bots, or a newsletter sent from the same domain to an old list, can drag down your receipts with it.

For agencies with many client sites

Each client domain needs the same check, and each one can break again later: a client signs up for a new email tool, a host changes servers, a DKIM key gets rotated. Run the check on each domain and send the client the result link, so their developer or host sees exactly what you see. DMARC Monitor's monitoring rechecks every domain daily and emails you only when something newly breaks, so you hear about it before their orders stop arriving.

Check your domain now

Run the free DMARC check on your site's domain. It takes about ten seconds and shows you which of SPF, DKIM and DMARC is letting your WordPress mail down, with the exact record to paste. We only read public DNS records and never change your DNS; our recommendations are advisory, and you decide what to publish.

Written by The DMARC Monitor Team, assisted by Friday.