SPF Record Too Long

SPF record too long: fix the 255-character TXT string limit and the 10-DNS-lookup limit. Split and flatten.

ProblemFix
Record exceeds 255 charactersSplit into multiple TXT strings (quoted segments concatenated by the resolver)
More than 10 DNS lookupsRemove unused include: mechanisms, or flatten to direct IP addresses
Both problems at onceFlatten first (reduces lookups to 0), then check length; split if still over 255 chars

Technical details

A long SPF record is a v=spf1 TXT record that exceeds the 255-character per-string limit of DNS TXT records or contains more than 10 DNS-querying mechanisms.

DNS TXT records are limited to 255 characters per string, but multiple strings can be concatenated by the resolver to form a single logical record.

The 10-DNS-lookup limit in RFC 7208 is a separate constraint from the character limit: flattening resolves the lookup issue but may worsen the character count.

Frequently asked questions

How do I split a long SPF record across multiple TXT strings?+

Break the record at mechanism boundaries into 255-character chunks, each wrapped in double quotes. DNS resolvers automatically concatenate them. Most DNS providers handle this automatically.

Does the 255-character limit apply to the total record?+

No. It applies to each individual character-string within the TXT record. Multiple strings are concatenated. The practical limit is around 450-512 characters for most resolvers.

Is there a tool to check both limits at once?+

Yes: our SPF record checker reports the lookup count and total length together, so you see both limits in one run.

Check your domain with our free tools: SPF checker, DMARC checker, DKIM checker.

Last verified: 2026-10-28