The DNS part of DKIM is usually boring until a 2048-bit key meets a DNS control panel that says the value is too long.
Then the guessing starts:
This is the part that matters: splitting a long DKIM TXT value into 255-character chunks is normal DNS behavior, not a DKIM hack.
Per RFC 1035 Section 3.3.14, TXT RDATA is made of one or more character-strings. And each character-string is limited to 255 octets of content, which is why long DKIM keys often need multiple chunks in practice.
Per RFC 6376 Section 3.6, DKIM public keys are published in DNS under selector._domainkey.<domain>, and verifiers retrieve that published value from DNS when checking the signature.
So if the provider asks for chunking, the goal is not to change the DKIM key. The goal is to publish the same DKIM key in DNS syntax the provider accepts.
If the shorter version is enough, keep these rules in mind:
dkim=passThe long part of a DKIM record is the p= tag, which contains the public key material.
With 2048-bit RSA keys especially, that value is often long enough that a provider UI will reject it as a single literal input, silently wrap it, or require manual splitting. That does not mean the key is too large for DKIM. It usually means the provider is exposing the DNS TXT string limit in a clumsy way.
If key size choice is still being debated, DKIM key length and algorithms: 1024 vs 2048, RSA vs Ed25519 covers the operational tradeoffs. If the immediate problem is just the DNS length error, stay focused on publication format first.
This is the easiest place to break an otherwise valid setup.
There is a real difference between these two ideas:
The first is normal. The second is where admins accidentally publish fragments as if each fragment were its own record.
Correct concept:
selector1._domainkey.example.com. IN TXT (
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApart1"
"part2"
"part3"
)Broken concept:
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApart1"
selector1._domainkey.example.com. IN TXT "part2"
selector1._domainkey.example.com. IN TXT "part3"In the valid form, DNS serves one logical TXT value composed of adjacent strings. In the broken form, the selector has multiple TXT answers that are not the same thing as one DKIM key.
If a provider UI has multiple boxes for one TXT value, those boxes usually represent chunks of the same record. If it has multiple rows that each create a separate TXT record, do not paste one DKIM key fragment per row.
If a simpler walkthrough is what you need, DKIM record too long for DNS? How to split 2048-bit DKIM keys correctly covers the shorter version of the fix.
This is where people get tripped up because different DNS interfaces expose different layers of DNS syntax.
In zone-file style syntax, individual TXT strings are commonly shown as quoted strings:
"v=DKIM1; k=rsa; p=AAA..." "BBB..." "CCC..."That is a perfectly normal way to express a TXT record made of multiple strings.
But many web DNS panels do one of these instead:
So the practical quoting rule is not "always type quote characters manually".
The practical rule is:
Three common mistakes show up over and over:
p=v=DKIM1; k=rsa; p= prefix or one chunk in the middleThe key idea is simple even if the UI is not: publish the exact same DKIM record content your mail platform generated, only reformatted into TXT chunks when necessary.
The safest approach is mechanical, not creative.
v=DKIM1;, k=rsa; when present, and p=.In practice, splitting inside the base64 key material is fine. The DNS TXT representation is allowed to use multiple strings, and the receiver reconstructs the full value from them.
What is not fine is changing the characters themselves.
Broken examples:
v=DKIM1; k=rsa; p=MIIB... part2
v=DKIM1; k=rsa; p=MIIB...
part2
"v=DKIM1; k=rsa; p=MIIB..." " part2"That third example is especially nasty because the leading space in the second chunk becomes part of the value.
This is the most useful habit in the whole process.
After saving the record, query the selector directly:
dig TXT selector1._domainkey.example.com +shortDepending on the resolver and tool output, you might see:
All three can still be correct.
What should be checked in the answer:
_domainkeyv=DKIM1;p= value is complete and in the right orderIf the provider gave the original expected value, compare the DNS answer against that original source, not against memory and not against a screenshot.
For a deeper live check, send a real message through the platform that uses that selector and inspect the headers:
DKIM-Signature should show the expected s= selector and d= signing domainAuthentication-Results should show dkim=passThat second test matters because a selector can exist in DNS and still be wrong in small ways that only show up during real verification. DMARC troubleshooting with Authentication-Results headers is a good companion when the DNS answer looks right but delivered mail still fails.
selector.example.com instead of selector._domainkey.example.comIf selector changes are happening at the same time, DKIM selectors and key rotation playbook is worth reading before changing anything else.
Long DKIM TXT values do not need invention. They need careful publication.
Split the record into valid TXT chunks when required, respect the provider's quoting model, query DNS to confirm the exact published value, and then verify on a real message with dkim=pass.
That sequence prevents most of the annoying DKIM DNS mistakes before they turn into a vague "signature did not verify" problem later.