Overview
Some e-mail providers such as, Google or Office 365 will require you to add DKIM records for validation. Sometimes these records are very long, and cause the following error when you attempt to add them:
This error is occurring because the value of the DKIM record is above 255 characters. In the below section, we'll show you how to split the record to allow each record to be below the character limit.
Splitting Long DKIM Records
The simple solution is to break up the value into smaller chunks. See example below:
Original DKIM Value
"v=DKIM1;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5KJk2W2eZPpm1wtdJz/yrkAU1KNd/HW1BwTCU/TgCgGIn5trSDA6cCdNXyHgYdNMF4tK0oPma+aBOCDfs4LBEkFhNTPlxClEpaXbCQqhDUj4eEFI/ySeusYxH6/Fy8u/ym1kTrZcWVM0eFyaepej3/Bl/CVUtc0dohgsUGwgNLY/ZpvFUFV11G9B57F0wpfjaXx/cg3C9zmC8Rzx5YmgF1yZr05DgKHUlicbAHaNO67bpWb+i2z7vsrn/DcnWPrTHK27ORFRB3d5sz2Pw4PEI/RpapCZH6xTdAoRFF1tkhmww1sj+QKfmiJMKmaOsLtimwSUgnuju559FTPwAjtQhwIDAQAB"
The above DKIM value is over 400 characters. To break this up, you can split it into multiple records like in the following example:
New DKIM Value
"v=DKIM1;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5KJk2W2eZPpm1wtdJz/yrkAU1KNd/HW1BwTCU/TgCgGIn5trSDA6cCdNXyHgYdNM"
"F4tK0oPma+aBOCDfs4LBEkFhNTPlxClEpaXbCQqhDUj4eEFI/ySeusYxH6/Fy8u/ym1kTrZcWVM0eFyaepej3/Bl/CVUtc0dohgsUGwgNLY/Z"
"pvFUFV11G9B57F0wpfjaXx/cg3C9zmC8Rzx5YmgF1yZr05DgKHUlicbAHaNO67bpWb+i2z7vsrn/DcnWPrTHK27ORFRB3d5sz2Pw4PEI/RpapCZH6xTdAoRFF1tkhmww1sj+QKfmiJMKmaOsLtimwSUgnuju559FTPwAjtQhwIDAQAB"
You should now be able to add the entire DKIM value above into the "Value" section successfully.
Further Reading
For more information on splitting TXT records, such as splitting SPF records, see our article on resolving TXT record size limits.