Multiple SPF Records: Why Two v=spf1 Records Break SPF and How to Merge Them

November 20, 2026 # SPF & DKIM
Share this insight:
Multiple SPF records: why two v=spf1 records break SPF and how to merge them

You can't have multiple SPF records on one domain name: if a lookup returns two or more TXT records that start with v=spf1, RFC 7208 says SPF evaluation ends in permerror, so no sender can pass. The fix is to merge all your senders into a single record.

Receivers apply that rule less consistently than the standard reads. Our original study covered 21 mailbox providers. In a follow-up at 20 of them, with DMARC p=reject, we published two records that each listed a real sender, in both orders, next to a merged control. Gmail and Google Workspace delivered all 6 messages when the record listing our sender came first in the DNS answer and refused all 6 when it came second. Microsoft delivered 9 of 10 and 5 of 10, and Yahoo, Apple and GMX refused both orders. Merged into one record, the same senders reached all 44 tracked seeds. A second record can look as if it works, and that's one reason it survives. Here's how to find and merge one, followed by what each provider did.

TL;DR

  • One name, one record. RFC 7208 forbids publishing more than one SPF record at a domain name (§3.2), and a receiver that finds two returns permerror (§4.5). Other TXT records, subdomains and a record split into several strings don't count as a second record.
  • Merge, don't add. Keep one v=spf1, list each sender once, end with one all, and check that the merged record stays within 10 DNS lookups.
  • Receivers don't agree, and neither do their reports. With p=reject and no aligned DKIM signature, many receivers refused the mail in either order, Gmail's answer followed the order of the records, Microsoft's changed from one message to the next, and T-Online, Vodafone and Amazon WorkMail delivered it to the inbox. In DMARC reports the same two records showed up as permerror, fail, softfail or pass, depending on the reporter and the order, so searching for permerror finds only some of the problem.
  • Record order isn't a fix. DNS doesn't promise an order, and the receivers that refused the mail did so either way.

What counts as a second SPF record

 
A receiver looks up the TXT records at the domain in the message's MAIL FROM address, discards everything that doesn't begin with v=spf1, and counts what's left (RFC 7208 §4.5). The version tag must be exactly v=spf1, followed by a space or the end of the record, so v=spf10 is discarded. No records means none. One record gets evaluated. More than one means permerror. For the publisher, §3.2 says a domain name "MUST NOT have multiple records" that would make a check select more than one.

What's publishedA second SPF record?Why
v=spf1 include:_spf.google.com ~all and v=spf1 include:servers.mcsv.net ~all at one nameYesBoth begin with v=spf1. Listing different senders doesn't change that
v=spf1 … and google-site-verification=… at one nameNoReceivers discard TXT records that don't begin with v=spf1
v=spf1 … at example.com and v=spf1 … at news.example.comNoDifferent names. Each name has its own record, and a subdomain doesn't inherit its parent's
"v=spf1 include:_spf.google.com " "include:servers.mcsv.net ~all"NoOne TXT record split into two strings. Receivers join the strings without adding a space (§3.3), so the space has to stay inside a string

The rule also reaches the names your record points to. If an include: target publishes two SPF records, that include returns permerror (§5.2), and so does your record once evaluation gets there, even though your own DNS looks clean. A sender that matches earlier in your record never reaches it.

How to check for a second record

 
Query the domain from outside your DNS panel:

dig +short TXT example.com
"MS=ms12345678" "v=spf1 include:spf.protection.outlook.com -all" "v=spf1 mx include:sendgrid.net ~all"

Two lines begin with v=spf1, so this domain has two SPF records. On Windows, use nslookup -type=TXT example.com. Check the domain your mail uses as its MAIL FROM (Return-Path) as well as the one in your From address, because they can differ. And don't rely on how a panel displays things: Route 53, for example, shows two TXT values as one record set, and a receiver still sees two records.

DMARKOFF's free SPF Checker runs the same lookup, resolves every include, and flags a second record at your domain or behind an include.

How to merge two SPF records

 
Here's the domain from the check above, before and after:

Before: two TXT records at example.com v=spf1 include:spf.protection.outlook.com -all v=spf1 mx include:sendgrid.net ~all After: one TXT record at example.com v=spf1 include:spf.protection.outlook.com include:sendgrid.net -all

The mx term went because this domain's MX hosts only receive mail; keep it if yours also send. The two records ended differently, so one all had to go. Which one to keep is a policy choice: here's how ~all and -all differ. For a sender the record doesn't list, evaluation walks all of it, which at the time of writing takes three lookups: one for Microsoft's include and two for SendGrid's.

The steps:

  1. List what's published, with the query above.
  2. Drop the senders you no longer use. A leftover record often lists a provider you've left, and every include you keep costs lookups. Your DMARC aggregate reports show which sources still send as your domain, so check them before you remove anything.
  3. Write one record. One v=spf1 at the start, each sender once, one all at the end.
  4. Count the lookups. The limit is 10 terms that trigger DNS queries, nested includes included (§4.6.4); the first query for the record itself doesn't count. Count the full path, for a sender the record doesn't list. This guide covers what to do if you go over.
  5. Publish it as one change. Edit one record and delete the others in the same step. If your DNS panel can't do that, edit first and delete straight after: the merged record lists every sender, so the short overlap is no worse than what you had. Resolvers keep the old answer until its TTL runs out, so allow for that.
  6. Check from outside. The query should return one v=spf1 line. Then send a test message through each sender and look for spf=pass in the headers.

Before you touch DNS, you can paste the merged record into the checker as a draft and see its lookup count and any errors.
 

Run SPF Check

 

Mistakes to avoid while merging

  • Pasting one record after the other. In v=spf1 include:spf.protection.outlook.com -all v=spf1 include:sendgrid.net ~all, mechanisms after the first all are never evaluated (§5.1), so SendGrid's include is never reached, although the whole record still has to be valid syntax. The record looks merged, and SendGrid fails SPF.
  • Keeping a redirect. A redirect= modifier is ignored when the record has an all (§6.1). Turn redirect=_spf.example.net into include:_spf.example.net. Our syntax guide explains the difference.
  • Using commas. Terms are separated by spaces. include:a.example,b.example reads as one name, which won't exist.
  • Publishing a second record to get around the lookup limit. It doesn't buy a second budget. Two records that each look fine can go over 10 once merged; if yours do, remove what you can or move a sender to a subdomain.
  • Splitting a long record into two TXT records. A DNS string holds 255 characters, so a long record gets split into several strings inside one TXT record. Many DNS panels do this for you.

Multiple includes and IP addresses in one record

 
One record can authorize as many senders as the lookup limit allows, each as its own term, separated by spaces:

v=spf1 ip4:192.0.2.25 ip4:198.51.100.0/24 ip6:2001:db8::/32 include:_spf.google.com include:servers.mcsv.net include:sendgrid.net ~all

ip4: and ip6: terms cost no lookups, so you can list several, one address or range per term. Record size is their limit: RFC 7208 asks you to keep the DNS response within 512 bytes (§3.4). There's no separate cap on include: terms, but each one costs at least one lookup plus whatever it pulls in, and the costs vary widely. The full path through the example above takes four.

IncludeDNS lookups
_spf.google.com1
spf.protection.outlook.com1
amazonses.com1
sendgrid.net2
_spf.salesforce.com2
mailgun.org5
_spf.yandex.net8

The include term itself plus everything it pulls in, as published on 27 October 2026, from our scan of the Tranco top 100,000. Vendors change their records, so recount when you edit yours.

What the error looks like

 
None of the refusals in our test mentioned a second record. Most cite DMARC, because with p=reject and no aligned DKIM signature, that's the check that decided. Our post on bounce codes covers these replies in more detail.

ReceiverSMTP reply (abridged)
Gmail, Google Workspace550 5.7.26 Unauthenticated email from … is not accepted due to domain's DMARC policy
Outlook.com, Hotmail, Microsoft 365550 5.7.509 Access denied, sending domain … does not pass DMARC verification and has a DMARC policy of reject
Yahoo, AOL, AT&T554 5.7.9 This mail has been blocked because it failed authentication checks against the sending domains DMARC policy
Apple iCloud554 5.7.1 Your message was rejected due to …'s DMARC policy
Interia550 5.7.1 … Recipient address rejected: Rejected due to SPF, and in a later run 451 4.4.0 … Recipient address rejected: Deferred due to SPF unsafe
Onet554 5.7.1 Rejected

In the mail that got through, two records produced a range of verdicts:

ukr.net Authentication-Results: ukr.net; spf=permerror (multiple SPF records provided by …) …; dmarc=fail (p=reject sp=) … Libero Received-SPF: permerror Proton Authentication-Results: mail.protonmail.ch; spf=fail smtp.mailfrom=… Yandex Authentication-Results: …; spf=softfail (…: transitioning domain of … does not designate …) Outlook Authentication-Results: mx.microsoft.com …; spf=pass (sender IP is …) smtp.mailfrom=…; … dmarc=pass … Gmail Authentication-Results: mx.google.com; …; spf=pass (google.com: domain of … designates … as permitted sender) …; dmarc=pass (p=REJECT sp=REJECT dis=NONE) …

ukr.net was the one receiver that named the cause. So spf=permerror in a header is the textbook sign, but two SPF records can also appear as spf=fail or spf=softfail, or as a clean pass on some or all of your messages.

What mailbox providers actually do

 
A typical second record lists another real sender, so that's the pair we tested:

v=spf1 include:_spf.mailgun.org ~all v=spf1 include:_spf.google.com ~all

We sent through Mailgun, so on its own the first record returns pass for our mail and the second returns softfail. A receiver that follows RFC 7208 gets permerror, and one that merges the two gets pass.

On 6 November 2026 we published this pair on two test subdomains, one in each order, and the merged version on a third, each with DMARC p=reject and no aligned DKIM signature, so SPF alone decided DMARC. Our DNS server's log shows it answered every query in the order we set. We then sent one message from each subdomain to each of 44 tracked seeds, test mailboxes at real providers plus a few spam-filter seeds, all within three minutes. The seeds came from GlockApps, which is made by the same team as DMARKOFF.

Receiver (messages per case)Merged recordOur sender's record firstOur sender's record second
Gmail, Google Workspace (6)inboxall 6 delivered, spf=pass, dmarc=passall 6 refused
Outlook.com, Hotmail (6)spamall 6 delivered to spam, spf=pass3 delivered to spam, 3 refused
Microsoft 365¹ (4)delivered3 delivered, 1 bounced2 delivered, 2 bounced
Yahoo, AOL, AT&T (5)spamrefusedrefused
Apple iCloud (1)spamrefusedrefused
GMX, WEB.DE, mail.com (4)inboxrefusedrefused
Mail.ru, La Poste, Zoho, mailo, Onet (5)inboxrefusedrefused
Barracuda filter (1)deliveredrefuseddelivered
Interia (1)tabdeferred with 451, not delivereddeferred with 451, not delivered
Seznam, Naver (2)inboxaccepted, never deliveredaccepted, never delivered
Yandex (1)spamspam, spf=softfailspam, spf=pass
ukr.net (1)inboxspam, spf=permerrorspam, spf=permerror
Libero, Virgilio (2)inboxspamspam
freenet (1)inboxspamspam
Amazon WorkMail (1)inboxinbox, spf=permerror, dmarc=temperrorinbox, spf=permerror, dmarc=temperror
T-Online, Vodafone (2)inboxinboxinbox

Compare within a row: the merged record went to spam at some receivers too, so spam there isn't down to the second record. Refused: rejected during the SMTP session. Bounced: accepted, then returned as undeliverable. Accepted, never delivered: no bounce, and the message hadn't appeared in the seed mailbox when we last checked, on 8 November; Seznam's DMARC reports list both as rejected. Delivered: filter seeds show no folder. One more seed, a GlockApps test mailbox, accepted all three cases and isn't shown.

¹ Seed mailboxes that receive through Microsoft 365 and appear together in its aggregate reports: two plain Microsoft 365 seeds, an EOP filter seed and a Proofpoint filter seed. The October runs below had one plain seed.

Gmail and Google Workspace followed the order. With our sender's record first, every message was delivered, with spf=pass and dmarc=pass under p=reject. With it second, every message was refused with 5.7.26. Google's DMARC reports say why: pass for the first order and softfail for the second, which is the ~all of the record listing Google, first in that answer. A receiver that merged the two records would have reported pass for both orders, and one that followed the standard permerror for both. In all 12 messages, Google's result was that of the first record our DNS server returned. We can't see inside its SPF code, but reading only the first record fits every result we have, the earlier pair below included.

Mailgun log for three Gmail seed mailboxes: messages from c03 are delivered, messages from c04 fail with 5.7.26

Mailgun's log for the Gmail seed mailboxes, with addresses hidden and times in UTC+3. c03 has our sender's record first and c04 has it second: the same two records, in opposite order.

Many receivers refused both orders. Yahoo, AOL, AT&T, Apple, GMX, WEB.DE, mail.com, Mail.ru, La Poste, Zoho, mailo and Onet all took the merged record and refused both orders of the pair. For them, the order made no difference, which is what the standard predicts, and the DMARC reports from Yahoo, GMX, WEB.DE, mail.com and Zoho say permerror for both orders.

Some receivers delivered it anyway. ukr.net, Libero, Virgilio and freenet put the merged record in the inbox and both orders in spam. Amazon WorkMail kept both in the inbox, with spf=permerror and dmarc=temperror in its headers. T-Online and Vodafone delivered everything to the inbox.

Yandex and Barracuda went the other way. Yandex wrote softfail with our sender's record first and pass with it second, the results of the second record in our server's answer, and filed all three messages in spam, including the merged one. The Barracuda filter refused the first order and delivered the second. Each of those is one message per case, so read them as hints at most.

What it means for you: a delivered test message doesn't clear a second record. Mail to Gmail can pass while Yahoo, Apple and GMX refuse the same message. And putting your main record first isn't a fix. RFC 1034 says the order of records in a set isn't significant and doesn't have to be preserved, and when we queried five public resolvers ten times each, one kept our server's order, one always returned the same record first, and three mixed them. Merged, the same senders reached every tracked seed.

An earlier pair: one record that authorizes nobody

 
Two weeks earlier, on 22 and 23 October 2026, we tested a harsher pair: v=spf1 -all next to v=spf1 include:_spf.mailgun.org -all. Our DNS snapshots list v=spf1 -all first. We sent it three times: twice from our own server, with ip4: in place of the include, to about 110 seed mailboxes, and once through Mailgun, to 44. Many large receivers refused our own server's blocklisted IP before reading SPF, so these numbers come from the Mailgun run.

Google refused every message in the Mailgun run and reported fail, which is what v=spf1 -all, first in the answer, returns on its own. Yahoo, GMX, Mail.ru, La Poste and Zoho refused and reported permerror. Microsoft delivered 3 of 9. Yandex wrote spf=pass in both direct runs and refused the one Mailgun message. The study has every receiver and the full method.

You may read that Gmail and Microsoft quietly correct duplicate records. That didn't match what we saw: Gmail refused one order outright, and Microsoft's result depended on the message.

Microsoft 365 and Outlook.com: same DNS, different answers

 
Microsoft delivered 9 of 10 messages with our sender's record first and 5 of 10 with it second, and every refusal and bounce cited 5.7.509. Mailboxes of the same kind didn't agree: with our sender's record second, one Outlook.com seed took the message and another refused it 39 seconds later, while both Hotmail seeds took it. The delivered copies we read had spf=pass and dmarc=pass. Microsoft's DMARC reports had 9 pass and 1 softfail for the first order and 5 pass and 5 softfail for the second, matching the totals delivered and refused or bounced. softfail is what the record listing Google gives our sender, and no row said permerror.

The earlier pair went the same way, at 3 of 9. These are all nine messages that Microsoft's servers handled in that Mailgun run, on 23 October, in the order they were handled:

Time (UTC)Seed mailboxResult
06:32:13Microsoft EOP filter seedaccepted, then bounced 4 seconds later with 5.7.509
06:32:19Hotmailrefused with 5.7.509
06:32:58Outlook.comdelivered to the inbox
06:33:18Outlook.derefused with 5.7.509
06:33:27Microsoft 365 seeddelivered to the inbox
06:33:43Outlook.frrefused with 5.7.509
06:33:49Proofpoint filter seed, delivering into Microsoft 365accepted, then bounced 3 seconds later with 5.7.509
06:34:10Outlook.comrefused with 5.7.509
06:34:15Hotmaildelivered to the inbox

Two SPF records at Outlook.com and Hotmail: one Outlook and one Hotmail mailbox receive the message with spf=pass, the other four show as Missing

The six Outlook and Hotmail seed mailboxes in the GlockApps report. "Missing" doesn't say why; Mailgun's log shows those four refused with 5.7.509.

We didn't change DNS between these messages. The delivered copies read spf=pass and dmarc=pass, and Microsoft's aggregate reports match the delivery totals here too: three pass and six fail, the result of v=spf1 -all on its own, with no permerror. In both runs, Microsoft reported only results that one of the two records gives on its own, in counts that match its deliveries. That's consistent with using one of the records rather than returning permerror, although Microsoft's SPF setup guide says more than one SPF record returns permerror. The aggregate rows don't identify individual messages or show how a record was chosen.

Our DNS server sent the records in the order we set to every resolver that asked, Microsoft's included, so whatever made the results differ happened after our authoritative response. The two orders gave different delivery totals, but this single run doesn't establish whether the order changes the likelihood of a pass, or which step picked a record.

What it means for you: if some Outlook or Microsoft 365 recipients get your mail while others bounce it with 5.7.509, a second SPF record is one possible cause, and it costs one DNS query to rule out.

What a permerror does to DMARC

 
permerror and fail are different results. fail means the record was evaluated and doesn't list the sender. permerror means the published records couldn't be correctly interpreted, which RFC 7208 says needs the DNS operator to step in (§2.6.7).

DMARC doesn't draw that line. It needs an SPF pass on an aligned domain or a DKIM pass on an aligned domain, and neither permerror nor fail provides the first. So a message with an aligned DKIM signature can still pass DMARC while SPF is broken, which is one way a second record goes unnoticed.

Our test shows the other case: no aligned DKIM signature, under p=reject. We didn't test two records with an aligned signature, or under p=none. Keep in mind that Interia refused at the recipient step, citing SPF, before the message body was sent, so it hadn't seen any signature at that point.

Why domains end up with two records

 
In our October 2026 DNS scan of the Tranco top 100,000, 779 of the 71,117 domains with SPF (1.1%) published two or more SPF records. That made it the third most common failed check behind SPF permerror, after the lookup limit and includes that point nowhere. The usual routes:

  • A setup guide says "add this TXT record." Someone connects a new sending service and follows the instructions literally, next to the record that's already there.
  • A migration. The new provider's record goes in "for now", and the old one stays.
  • Two owners. A hosting panel or registrar template publishes a default record, and an admin adds another.

How two records show up in DMARC reports

 
Don't count on permerror to find this. The table lists the raw SPF results for both pairs, which sit under auth_results/spf/result in the report's XML. Don't confuse them with policy_evaluated/spf, which only says whether SPF passed with alignment for DMARC (RFC 9990 §3.1.1).

ReporterEarlier pairOur record firstOur record second
Googlefailpasssoftfail
Microsoft3 pass, 6 fail9 pass, 1 softfail5 pass, 5 softfail
Interiafailfailfail
Yahoo, Seznam, Zohopermerrorpermerrorpermerror
GMX, WEB.DE, mail.compermerrorpermerrorpermerror
Mail.rupermerrorno reportno report
La Postepermerrorno reportno report

Microsoft is Outlook.com and Microsoft 365 together; in every column, its pass count is the number of messages it delivered. The earlier pair has v=spf1 -all first in the DNS answer. Apple, Yandex, Onet, mailo, Naver, ukr.net, Libero, Virgilio, freenet, T-Online, Vodafone and Amazon WorkMail sent no reports in either test, and neither did Proton, which took part only in the earlier one.

Read across, the reports show what each receiver did with the pair. Google's results are those of the first record in our server's answer: fail from v=spf1 -all, pass from our sender's record, softfail from the record listing Google. Microsoft's are a mix of the two records' results, in counts that match its deliveries. Interia wrote fail in both November orders, although neither record can fail our sender, since both end in ~all, so its fail is a label for two records rather than either record's result. The rest reported permerror, as the standard says.

So a fail or softfail from Google or Microsoft, and a fail from Interia, can mean an unauthorized sender or a second record of your own. A pass from Google can hide a second record when yours comes first, and a partial pass at Microsoft can hide it too. After you merge, check that SPF failures for your real senders clear up reporter by reporter, not only in total, and read the domain next to each result to be sure it's your MAIL FROM domain.

DMARKOFF flags a domain with two SPF records, shows both records and the fix

DMARKOFF on the two-record domain from our direct runs. By the standard, SPF can't pass for any sender, although Gmail and Microsoft returned passes in the Mailgun runs.

DMARKOFF collects these reports, shows each source's SPF result by reporter, and flags a domain that publishes two records, with both records and the fix.
 

Start 14-day Free Trial

 

What this test doesn't show

  • The order each receiver saw. Our DNS server answered every query in the order we set, but a resolver along the way can reorder records, so we don't know what reached each receiver's SPF code. Google's results suggest the order survived on its path. At Microsoft, something after our authoritative response changed the result, and we can't see what.
  • Other pairs and paths. Both orders ran once, through Mailgun, with ~all on both records. The earlier pair was never tested in the opposite order.
  • Small samples. Each receiver got one to six messages per case: six at Gmail and Google Workspace, six at Outlook.com and Hotmail, four at Microsoft 365, five in the Yahoo family, and a single message at many others, Yandex and Barracuda included. DMARC reports count messages per day and don't tie a result to a message, so matching them to deliveries is a match of counts.
  • Two reporters missing. Mail.ru sent no report on the November run, even for the merged record, so its silence isn't about two records. La Poste reported on the earlier pair but has sent us no reports since late October, so the November run has none from it.
  • A snapshot. These results describe 22 and 23 October and 6 November 2026, and receivers change their filtering without notice.

The SMTP and Mailgun logs, seed results, report extracts and DNS snapshots from both tests are in dmarcoff/articles on GitHub. The November run is results/g7, where c01 is the merged record, c03 has our sender's record first and c04 has it second. The earlier pair is s11 in the direct runs and m11 in the Mailgun run.

FAQ

No. One domain name can publish one SPF record. RFC 7208 says a lookup that finds more than one returns permerror, so SPF can't pass for any sender. Merge them into a single record.

No. Different providers are the usual reason people add a second record, and it's still two records. Put both in one: v=spf1 include:first.example include:second.example ~all.

By the standard, SPF returns permerror, so no sender can pass. In practice it varies: in our test, with p=reject and no aligned DKIM signature, many receivers refused the mail in either order, Gmail delivered it only when the record listing the sender came first, and Microsoft delivered some messages and refused others. DMARC reports then showed permerror at some receivers and a plain pass, softfail or fail at others.

It shouldn't. RFC 7208 treats any two records as permerror, and DNS doesn't promise an order. In our test it did matter at Gmail, which delivered the mail only when the record listing the sender came first, while Yahoo, Apple and GMX refused both orders. Merge the records instead of relying on the order.

Keep one v=spf1 at the start, list each sender from both records once, and end with a single all. Check that the result stays within 10 DNS lookups, publish it, and delete the other record.

Yes. Separate them with spaces, each with its own include: prefix. There's no separate cap on include terms, but the whole evaluation can't need more than 10 DNS lookups, and one include can cost several.

No. example.com and news.example.com are different names, and each publishes its own record. A subdomain doesn't inherit its parent's.

No. Microsoft's SPF setup guide says to use one record per domain or subdomain. In our test, its handling of two records was inconsistent: across Outlook.com, Hotmail and Microsoft 365, it delivered 9 of 10 messages with the sender's record first and 5 of 10 with it second, and refused or bounced the rest with 5.7.509. Its DMARC reports showed pass and softfail in counts matching those delivery totals, and never permerror.

Not every receiver reports it. In our test, Yahoo, GMX, WEB.DE, mail.com and Seznam reported permerror, but Google reported the result of the first record, Microsoft a mix of pass and softfail, and Interia fail in both orders. If a real sender passes SPF at some reporters and fails at others, check how many SPF records your domain publishes.

They can take away the aligned SPF pass, which leaves DMARC depending on aligned DKIM. A message with an aligned DKIM signature can still pass DMARC. In our test, messages without one were refused by many receivers under p=reject.

Aliaksandr Markau
Aliaksandr Markau Co-founder & CTO

Co-founder & CTO at DMARKOFF and GlockApps, email security specialist with 20+ years of experience, Golang & ClickHouse expert. A happy father of two teenagers.

Related Posts