Resolving the "Incorrect format" error Text string too long
Written by
Updated at November 27, 2023
Issue description
When entering a text string, you see this error:
Incorrect format. Text string too long
Solution
In TXT records, strings longer than 255 characters are prohibited. According to RFC 4408, a longer SPF/DKIM string is split into several consecutive strings, and the reading side combines them into one, for example, as in this article
You can split such a long record into two using the YC CLI command:
yc dns zone add-records <...> --record '<name>  TXT "v=DKIM1; k=rsa; p=..." "..."'
Such a TXT record will be added successfully.