Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

Trending KB Articles


#2921: Can a TXT or SPF record be longer than 255 characters?


SPF record does not support more than 255 characters in a single string. So if we attempt create an SPF record with more than 255 characters in single string, NIOS will return an error "Invalid text string".



Following are two workarounds with examples.

  1. Using double quoted (" ") strings in an SPF record to split the long string to multiple short strings.

Example :

Let's say the SPF string you are not able to update is : (Using some random IP addresses in the example)

@ IN TXT "v=spf1 ip4: ip4: ip4: ip4: ip4: a mx ?all"

This can be modified by splitting the string in to two, each string less than 255 characters like this :

@ IN TXT "v=spf1 ip4: ip4:" " ip4: ip4:" " ip4: a mx ?all"

The reading application omits the double quotes and concatenates all of the string into one record.

  1. Create multiple sub SPF records and concatenate them into one string using the "Include" statement.

If the actual long SPF record is the same as the above example, we can split the record to two SPF records as shown below:

@ IN TXT _spf1 IN TXT "v=spf1 ip4: ip4: a mx ?all"

@ IN TXT _spf2 IN TXT "v=spf1 ip4: ip4: ip4: a mx ?all"

Then create a third SPF record with the include statement as below to concatenate both the SPF records in to one.

@ IN TXT "v=spf1 a mx ?all"

Showing results for 
Search instead for 
Did you mean: