Blog article

Merge SPF records overview:
A domain can only have one SPF TXT record. Publishing more than one causes an immediate authentication failure. This page explains how to merge SPF records into a single valid record – and keep it within the DNS lookup limit.
Sendmarc gives you visibility into SPF misconfigurations and centralized control over SPF records. Learn more.
Most companies don’t set out to publish multiple SPF records. They accumulate over time as the sender environment grows and changes.
Each time a new email platform is added – a CRM, marketing tool, or HR system – a new SPF entry may be published as a separate TXT record instead of being added to the current one. Decentralized IT means business units publish SPF records independently, without visibility into what already exists. The result is multiple SPF TXT records on the same domain.
Acquisitions and mergers compound the problem. The acquired entity’s email infrastructure often includes its own SPF records, which may conflict with those already published on the acquiring organization’s domain.
RFC 7208 states that a domain shouldn’t publish more than one SPF TXT record. When multiple records exist, the receiving server gets confused. It returns a PermError – a permanent error that causes SPF to fail.
A PermError means DMARC can’t use SPF to pass authentication. DMARC requires either SPF or DKIM to pass and align – so when SPF fails, DKIM must carry the full load. If DKIM isn’t correctly configured, DMARC fails.
Duplicate records are a common cause of DMARC failures that are difficult to diagnose because the error isn’t always obvious from DMARC aggregate reports.
The correct way to merge SPF records starts with a structured approach. Rushing consolidation without a complete sender inventory risks excluding legitimate senders and creating delivery failures.
ip4:, ip6:, include:, a, mx, ptr, exists, and redirect mechanism from all published TXT records. Identify duplicates – any mechanism that appears in more than one existing record only needs to appear once in the merged record.v=spf1 and end with a single qualifier.include:, a, mx, ptr, exists, and redirect mechanism, including nested lookups.The 10 DNS lookup limit applies to recursive lookups, not just the mechanisms visible in the record itself. Nested include: chains count toward the limit.
SPF flattening resolves include: mechanisms into their underlying IP addresses, replacing DNS lookups with static entries. This reduces lookup count but requires active maintenance.
Sendmarc’s SPF Flattening automates this process, keeping the record within the lookup limit without requiring manual updates.
Every new sending platform added to the environment must be evaluated against the current lookup count before it’s authorized in the SPF record. Adding a new include: to a record already at nine lookups triggers a PermError. Maintaining a lookup budget – tracking the count – prevents this failure.
SPF failures are slow to detect and harder to trace without a clear view of every sending domain.
Sendmarc’s DMARC Management Platform identifies them across all domains, flags unauthorized sending sources, and tracks SPF alignment status. SPF Flattening keeps records within the DNS lookup limit automatically, reducing the operational burden on DNS and IT teams managing complex or distributed sender environments.
After you merge SPF records, a valid record doesn’t maintain itself. Sendmarc keeps it that way as your sender environment grows.