DNS TXT records > 255 characters

RichardF

Verified User
Joined
Jul 5, 2005
Messages
59
Location
Netherlands
according to rfc 4408 a TXT records can contain more than 255 characters, it just needs to be split into multiple strings.
rfc...
3.1.3. Multiple Strings in a Single DNS record 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 .... firstsecond 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...

I've noticed that DirectAdmin splits records after 149 characters.
I made some txt records to test

150.soko.nl text =

"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
"0"


Is there a reason why the string is split that short?
Of course this is totally legit. Multple strings in a TXT record is ok. But can't the character count have an higher number, so that strings < 250 characters aren't split?

maybe there is an other reason for splitting the record @ 150 characters, I'd like to know it.
 
Hello,

My wild guess is it is done because of a need to show records correct in the Enhanced skin in WebUI
 
Nah, I don't think so. because the webinterface is showing it as one string. the splitting happens in the background and is inserted into the .db file.
 
Back
Top