Splitting a long SPF TXT record
  • 16 Jan 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Splitting a long SPF TXT record

  • Dark
    Light
  • PDF

Article summary

When to split your DNS record vs flatten it.

When a DNS TXT exceeds 255 characters, then it must be split into multiple strings.

As defined in [RFC1035] sections 3.3.14 and 3.3, a single text DNS record (either TXT or SPF RR types) can be composed of more than one string. If a published record contains multiple strings, then the record MUST be treated as if those strings are concatenated together without adding spaces. For example: IN TXT "v=spf1 .... first" "second string..."MUST be treated as equivalent to IN TXT "v=spf1 .... first second string..."SPF or TXT records containing multiple strings are useful in constructing records that would exceed the 255-byte maximum length of a string within a single TXT or SPF RR record.

What is SPF record flattening?

This article does not go into all the details of flattening. The purpose of flattening a record is to avoid the dreaded 10 DNS lookup limit perm fail error. Every time you include a 3rd party's SPF record, it counts against your 10-lookup limit. Some 3rd party providers even include other records in their own, so these also count against the limit.

Flattening is the process of converting the included SPF entries into a list of IP addresses and then including them in your record. The downside of doing this is that you must monitor the 3rd party records if they change and then update yours accordingly.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence