How to fix common SPF record errors

SPF records break in a handful of predictable ways. Here's how to spot each one and fix it, with examples.

Updated

Error 1: More than one SPF record

Your domain must have exactly one TXT record that starts with v=spf1. A second one usually appears when a new service tells you to "add this SPF record". With two, receivers treat SPF as an error and it stops protecting you.

Before (broken):

v=spf1 include:spf.protection.outlook.com -all
v=spf1 include:servers.mcsv.net ~all

After (one merged record):

v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net -all

Keep one v=spf1 at the start, every include: in the middle, and one all at the end. Then delete the extra record.

Error 2: The wrong ending

  • +all lets anyone send as you. Replace it with -all or ~all.
  • ?all, or no all at all, gives no instruction about unlisted senders. Use -all or ~all.

-all is strictest. ~all is common and works well once DMARC is enforcing, because DMARC makes the final decision.

Error 3: A sender that isn't listed

If a service that sends email as you isn't in your record, its mail can fail SPF and, once DMARC is enforcing, be rejected. Check every tool that sends from your domain (newsletters, invoicing, CRM, website forms, scanners and copiers that email documents) and add the include: each one documents.

Error 4: Too many DNS lookups

SPF allows a maximum of 10 DNS lookups when it's evaluated. Every include:, a, mx, and redirect counts, including the ones nested inside the services you include. Go over 10 and SPF fails for everyone.

  • Remove services you no longer use.
  • Drop a and mx unless your own servers send mail.
  • Move a high-volume tool to a subdomain with its own SPF record.

Where to make the change

SPF is edited wherever your domain's DNS is hosted: your registrar, your web host, or a DNS service like Cloudflare. Look for the TXT record on your root domain (shown as @ in most control panels). Changes usually take effect within an hour.

Nightkeep's report flags missing SPF, multiple records, +all, and weak endings, and re-checks daily with monitoring on. It doesn't count DNS lookups, so check that yourself when you add a new service.

See how your domain does

Create a free account and get a report on your email security (SPF, DKIM, and DMARC), website certificate, domain registration, and website, graded A to F with plain-English fixes. It takes about ten seconds once you're signed up.

First report free. No credit card. Nothing to install.