A single TXT record has a limit of 255-bytes or characters in a single string, however, multiple strings can be concatenated together in order to construct a longer TXT record when there is a need to. Usually the strings are separated by quotes but some DNS providers may add another character as well, in any case the strings should be read as if they were one whole string.
In the case of SPF a longer than 255-byte TXT record may be needed when for example many ip4 addresses or other mechanisms are used in a single record.
In the case of DKIM a longer than 255-byte TXT record may be needed when you have to sign emails with 2048 bit key length. This exceeds the 255-byte limit and hence the key must be separated into two strings by using quotes.
NOTE: Please refer to your DNS provider on the byte limit and for the syntax used to separate a TXT record into multiple strings.
Instantly test your SPF and DKIM configuration
OnDMARC’s free tool Investigate lets you verify your SPF and DKIM set up to ensure your emails are correctly configured.