DKIM TXT record value invalid

6,906 views
Skip to first unread message

msaadany

unread,
May 4, 2016, 11:10:49 AM5/4/16
to cloud-dns-discuss
Hi,

When trying to create a DKIM TXT record using the cloud console with the following data:
DNS Name: google._domainkey
TXT Data: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAicoGS0ILA/EOQ+Pr+fTZmaAPdEBXXkfZRoSgVB6hiCBVAFWIFLq2YmGIkpyn5mnkXkGD1Kd8NNkA3jt5I1xRRLMLC7nzdcyIg6cecwDjS7aeLB6qdkO0bxA7diPX9NNpmUM14TPUK2wsCREPjKxJhn7+BahapZbq7A4KHYgP5+BpX/E2unuR08a/zd/9VUooi1IAoecLFfBK8LUz6u+HpTozSEFeU5aHg07PYJV3juxKdaRqi8F9K+7qsomTIreYn9tk+qLI79Ys+c9csK5NYv06P0y6wzcz18J/ExwS3NcHipDtCdgVk2xjlL7FfkbU5pGt9jiR9skVGkeRvzPUcQIDAQAB

I get and error in the TXT Data field > "Invalid record data".

Thank you

Robert Evans

unread,
May 4, 2016, 12:24:52 PM5/4/16
to cloud-dns-discuss, mimicm...@gmail.com
The console tokenizes TXT Data into strings for DNS wire format. Because of that the individual strings cannot exceed 255 characters in length, or "Invalid record data" results.

Your p= tag string is too long (394 characters). DKIM clients concatenate all of the strings in the client before parsing tags, so to workaround the limit all you need to do is add whitespace within the p= tag such that each string fits within the 255 character limit.

For example:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAicoGS0ILA/EOQ+Pr+fTZmaAPdEBXXkfZRoSgVB6hiCBVAFWIFLq2YmGIkpyn5mnkXkGD1Kd8NNkA3jt5I1xRRLMLC7nzdcyIg6cecwDjS7aeLB6qdkO0bxA7diPX9NNpmUM14TPUK2wsCREPjKxJhn7+BahapZbq7A4KHYgP5+BpX/E2unuR08a/zd/9VUooi1IAoecLFfBK8LUz6 u+HpTozSEFeU5aHg07PYJV3juxKdaRqi8F9K+7qsomTIreYn9tk+qLI79Ys+c9csK5NYv06P0y6wzcz18J/ExwS3NcHipDtCdgVk2xjlL7FfkbU5pGt9jiR9skVGkeRvzPUcQIDAQAB

mimicm...@gmail.com

unread,
May 4, 2016, 12:37:41 PM5/4/16
to cloud-dns-discuss, mimicm...@gmail.com

Thank you. That solved the issue.

vincen...@sphonic.com

unread,
May 15, 2017, 10:23:29 AM5/15/17
to cloud-dns-discuss, mimicm...@gmail.com
This fix worked for me; thank you. I filed a bug: https://issuetracker.google.com/issues/38305742

resultf...@gmail.com

unread,
May 24, 2017, 1:24:03 PM5/24/17
to cloud-dns-discuss, mimicm...@gmail.com
same error and fix after read this thread. thankyou.

c...@confidentcounseling.com

unread,
Dec 11, 2017, 12:08:17 PM12/11/17
to cloud-dns-discuss
I'm confused. I don't see any difference between the original post and your example. What do you mean by add whitespace? I add enter after the first line and it submits it. I can't seem to create line separations if that's what you mean by white space.

mhsa...@gmail.com

unread,
Dec 11, 2017, 1:52:20 PM12/11/17
to cloud-dns-discuss
Hi. The fix was to simply use the space character inside the p= tag so that each space separated string does not exceed 255 characters.
Reply all
Reply to author
Forward
0 new messages