Merging multiple SPF records into one
If we flagged multiple SPF records on your domain, that's RFC 7208 §3.2 territory: 'A domain name MUST NOT have multiple records that would cause an authorization check to select more than one record.' Receivers respond with permerror, which means every sender, your legitimate ones included, fails the check. Here's how it usually happens and the safe merge path.
Why multiple records exist (it's almost always accidental)
Most of the time, multiple SPF records show up because two different teams or tools each published their own version without checking what was already there. Common culprits:
- You added a new sender via your DNS provider's UI and it created a NEW TXT record instead of editing the existing one.
- An ESP automation (the "click here to set up SPF" button in a marketing platform) published its own record without merging.
- You migrated DNS providers and the export/import duplicated the SPF entry instead of replacing it.
What a single merged record looks like
Suppose you currently have these two records at the apex:
v=spf1 include:_spf.google.com -all v=spf1 include:mailgun.org -all
The merged version concatenates the mechanism lists into a single record:
v=spf1 include:_spf.google.com include:mailgun.org -all
Then delete the second record entirely. Only the merged one stays.
Merging safely, step by step
- List every existing SPF record. Open your DNS provider's dashboard and find every TXT record at the apex of your domain that starts with
v=spf1. - Catalog the unique mechanisms. Walk each record's mechanisms (the
include:,ip4:,a:,mxbits) and write down each unique one. Don't include duplicates. If both records haveinclude:_spf.google.com, you only need it once. - Pick a single qualifier on
all. Each existing record probably ends with-allor~all. Pick whichever is more conservative (default to-allif you're confident your sender list is complete;~allif you want a softer fallback). - Build the merged record. Combine:
v=spf1+ space-separated unique mechanisms + space + your chosenallqualifier. - Watch the lookup count. Every
include:,a,mx,ptr,existsandredirect=counts toward the 10-lookup cap (ip4,ip6andalldo not). Merging records doesn't reduce lookups. If the combined list crosses 10, you'll trip a different warning. See the lookup-counting article for how to come back under. - Update one record, then delete the other. Most DNS providers let you edit a record in place. Update record #1 with the merged value, save, THEN delete record #2. (Doing it in this order means you're never without SPF coverage, because the original record is still there until the last second.)
- Verify. Open the SPF tab and use Scan now. The multi-record warning should clear, and the lookup count and final qualifier should reflect your merged record.
If the warning does not clear
Three things account for almost every case, in order of likelihood:
- A resolver is still serving the old pair. Your records carry a TTL, and caches honor it. Wait out the TTL on the records you edited, then scan again.
- The delete did not apply. Some panels save an edit and silently drop a delete. Count the records yourself with
dig +short TXT yourdomain.com | grep spf1, which should return exactly one line. - The second record is somewhere else. SPF only applies at the exact name it is published on, so a leftover at a subdomain does not trip an apex warning, but a stale zone at a previous DNS host that is still authoritative will. Re-check which nameservers actually answer for the domain with
dig +short NS yourdomain.com.
Why we don't auto-fix this
Merging two SPF records means deleting one, and our one-click fixes add a record or change one; they never delete. We could add it, but deleting is higher-stakes than creating or updating, because getting it wrong means accidentally dropping a verification token or other unrelated TXT. For now, merging stays manual.
Fix DNS issues with one click. See the exact change before it goes live.
Click the fix. We email you the exact record, wait five minutes, write it to Cloudflare or AWS Route 53, and read it back from public DNS. On any other DNS host, you get the record and a link to the right page. Included on every plan.
Was this page helpful?
Keep reading.
- Counting your SPF lookups (and why you might be at 11)What counts toward the 10, what does not, and how to come back under.
- Why 1024-bit DKIM keys are being phased outWhy 2048-bit keys, and the selector rotation that breaks no mail.
- Removing a revoked DKIM selectorAn empty p= means revoked: delete the stub or republish the key.