Fix SPF PermError: Multiple SPF Records

Why two TXT records starting with v=spf1 make SPF return permerror under RFC 7208, what does and does not count as a second record, and how to merge them into one record that stays under 10 DNS lookups.

Home › Guides › SPF multiple records

Last updated 18 November 2026

Quick answer

A domain may publish only one SPF record. RFC 7208 section 4.5 tells the receiver to take every TXT record at the name, discard the ones that don't begin with exactly v=spf1, and then: "If the resultant record set includes more than one record, check_host() produces the "permerror" result." Section 3.2 puts it as a rule for the domain owner: a domain name MUST NOT have multiple records that would cause an authorization check to select more than one record.

The fix is to merge the records into a single TXT record that starts with v=spf1, lists every sender, and ends with one all. Deleting the newer record instead silently de-authorizes whatever service it was added for.

What receivers do with it

Step 1: Count the SPF records

List every TXT record at the exact name the error mentions (the root domain, or the subdomain used as the envelope sender):

dig +short TXT example.com
Resolve-DnsName example.com -Type TXT

Count the answers that begin with v=spf1. Other TXT records (site verification tokens and the like) don't count. The SPF Record Checker does this for you and flags multiple SPF records, along with lookup counts and void lookups.

What counts as a second SPF record?

What is publishedResult under RFC 7208
Two TXT records that both start with v=spf1permerror (section 4.5). This is the classic case.
One v=spf1 record plus a record starting v=spf10 or any other textOnly records whose version section is exactly v=spf1 are kept; RFC 7208 gives v=spf10 as an example of one that is discarded. One SPF record remains, so no permerror from this rule.
One TXT record made of several quoted strings, such as "v=spf1 ... first" "second string..."Still one record. The strings are concatenated without adding spaces (section 3.3), so put the space inside a string or you will glue two terms together.
A long record split into two separate TXT records, the second not starting with v=spf1The second part is discarded, so only the first half is evaluated. Not a permerror from this rule, but every sender listed in the second half fails SPF. Use multiple strings in one record instead.
A legacy SPF-type (type 99) record next to the TXT recordNot counted. SPF records MUST be published as TXT only (section 3.1), and receivers query type TXT only (section 4.4). The type 99 record is ignored, so delete it to avoid confusion.
One SPF record on example.com and another on mail.example.comFine. Each name is checked separately; Microsoft puts it as one SPF record per domain or subdomain.
Your record is fine, but an include: target publishes two SPF recordsThe included domain returns permerror, and the RFC 7208 section 5.2 table says a recursive permerror makes the include mechanism return permerror. Your SPF fails until that provider fixes its DNS.

Step 2: Merge them into one record

Suppose the domain has these two records, one added for Microsoft 365 and one added later for Google Workspace:

v=spf1 include:spf.protection.outlook.com -all
v=spf1 include:_spf.google.com ~all

Replace both with one record:

v=spf1 include:spf.protection.outlook.com include:_spf.google.com -all
  1. One v=spf1, at the start.
  2. Keep every mechanism from both records: each include:, ip4:, ip6:, a and mx. Duplicates can go.
  3. One all, at the end. RFC 7208 section 5.1: mechanisms after all will never be tested and MUST be ignored, so an all in the middle cuts off everything after it. If the old records disagreed (-all and ~all), choose one on purpose.
  4. Recount DNS lookups. Each record may have been under the limit on its own, but the merged record must keep include, a, mx, ptr, exists and redirect to 10 in total (section 4.6.4), counting nested includes. Over 10 is another permerror; see SPF too many DNS lookups.
  5. Mind the length. A single string can be at most 255 octets, so a long record is published as several strings in one TXT record (section 3.3). RFC 7208 section 3.4 also advises keeping the DNS answer small enough to fit in 512 octets, and says the combined name and TXT text under 450 octets ought to fit in UDP.

Build the merged record with the SPF Record Builder and paste it into the draft box of the SPF Record Checker before you publish it. Publish the merged record and delete the old ones in the same change, so there is never a moment with zero or two records.

Step 3: Verify

  1. dig +short TXT example.com shows exactly one answer starting with v=spf1. Confirm it on public resolvers with the DNS Propagation Checker; resolvers can keep the old answer until its TTL expires.
  2. The SPF Record Checker shows one record, 10 or fewer lookups and no void-lookup errors.
  3. Send a test message and read the headers in the Email Header Analyzer: spf=pass for each service you merged.

Audit hundreds of domains at once

Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).

Related tools and guides

Check and build records with the SPF Record Checker and SPF Record Builder, list every TXT record with DNS Lookup, confirm the change on public resolvers with the DNS Propagation Checker, and check SPF, DKIM and DMARC together with the Email Deliverability Checker. Related guides: SPF too many DNS lookups, SPF include not found and void lookups, SPF for Microsoft 365, Microsoft 365 inbound SPF softfail or permerror and multiple DMARC records or DMARC record not found.

FAQ

Can a domain have two SPF records?

No. RFC 7208 says that if more than one TXT record starting with v=spf1 is found, SPF returns permerror, and that a domain MUST NOT publish records that cause more than one to be selected. Merge them into a single record.

How do I combine two SPF records?

Keep one v=spf1 at the start, copy every include, ip4, ip6, a and mx mechanism from both records into it, and end with a single -all or ~all. Then check that the merged record still needs 10 or fewer DNS lookups.

Does a long SPF record split into two strings count as two records?

No. Several quoted strings inside one TXT record are one record, joined without spaces. Two separate TXT records are different: if both start with v=spf1 that is a permerror, and if only the first does the second half is ignored.

Do I need to delete the old SPF record type 99?

It does not cause the multiple-records error, because receivers only query TXT records for SPF and RFC 7208 says SPF must be published as TXT only. It does nothing, so removing it avoids confusion.

Will mail bounce because of multiple SPF records?

It depends on the receiver. SPF returns permerror; RFC 7208 says a receiver that rejects for this should use 550 5.5.2, but receivers may also deliver the message. DMARC then depends on aligned DKIM alone.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.