Merge multiple SPF records into one

Two SPF records is a permanent failure — combine them.

10 min

why this matters

The specification allows one SPF record per domain. When receivers find two, the check returns permerror and your authentication fails completely, which is worse than having no record at all.

Step by step

  1. 1

    List every SPF record currently published

    Query your TXT records and note each value that starts with v=spf1.

    dig +short TXT example.com | grep spf1
  2. 2

    Build one combined record

    Keep a single v=spf1 at the start, copy across every include, ip4 and ip6 mechanism from all records, remove duplicates, and end with one all mechanism.

    v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.10 -all
  3. 3

    Delete the old records

    Remove every other SPF TXT record so only the merged one remains. Leave your other TXT records — DKIM, DMARC, verification strings — untouched.

how to check it worked

  • Only one v=spf1 record is returned
  • An SPF validator reports pass with no permerror
Re-scan my site

related guides