Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel 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: