Skip to content
warn

SPF record longer than 255 characters — how to split it correctly

DNS TXT records are made of character-strings, each limited to 255 octets. The record as a whole may be longer, but it must be published as several quoted strings that a receiver joins together with no separator.

Some DNS providers split this for you automatically and some do not. When one does not, the record is truncated or rejected, and your SPF silently stops working.

How to fix it

  1. 1Shorten the record first — removing unused includes is almost always possible and is the better fix.
  2. 2If it must stay long, publish it as multiple quoted strings in one TXT record: "v=spf1 include:a.example " "include:b.example ~all".
  3. 3Mind the whitespace at the split point. The strings are concatenated with nothing between them, so a missing space merges two mechanisms into one invalid term.

Check whether your domain has this problem

Free, no signup, about two seconds. You get the exact record to paste.

Related guides