Xpoudy

How to Fix Multiple SPF Records in Cloudflare

Short answer

If public DNS returns two TXT records beginning v=spf1 at the same hostname, combine the necessary mechanisms into one SPF record. Preserve authorized services and use a single ending policy. Verify the change publicly and check that the result stays within SPF’s DNS lookup limit.

By Xpoudy ·

Check the exact hostname returning the error

Find the envelope sender in the failing message’s headers. Check TXT at that hostname. A policy on the root and a policy on a separate subdomain can both be valid. Two SPF policies at the same queried name cause a permanent error. Other TXT records, such as site verification, may stay alongside the one SPF record.

Rebuild the record from actual senders

Write down the providers in both records. Look up each provider’s documented SPF mechanism, check that the service sends using this hostname and remove entries you can verify are obsolete. Use a single v=spf1 prefix and one final all mechanism with the chosen policy.

For a business that actually uses both Google and Microsoft with that SPF hostname, an example is v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all. Your policy can require other mechanisms. Count DNS lookups through nested includes and redirects. The SPF limit is 10 terms that cause DNS queries during evaluation.

Check DNS and the message separately

In Cloudflare, update the retained record and remove the superseded SPF record. Use the Xpoudy SPF Checker to confirm one record remains and review lookup use. If a resolver caches the old answer, compare across resolvers and test again after its TTL. Send a new test from each affected provider and check the receiving header for the SPF result and domain alignment.