Skip to main content

DKIM Key Length

DomainKeys Identified Mail (DKIM) uses asymmetric cryptographic key pairs (public/private) to digitally sign emails, proving that the message was not modified in transit.

1024-bit vs 2048-bit Keys

  • 1024-bit Keys: Legacy standard. Supported by 100% of DNS providers and mail transfer agents. Suitable for most common transactional sending needs.
  • 2048-bit Keys (Recommended): Modern cryptographic standard. Provides superior resistance against factoring attacks. Required by high-security enterprise environments and government organizations.
Mailofly defaults to generating strong 2048-bit DKIM keys for new sending domains.

Handling the DNS 255-Character TXT Limit

A 2048-bit public key string is approximately 450 characters long. Some older DNS providers (such as legacy GoDaddy or internal BIND configurations) restrict individual TXT record strings to 255 characters.

How to Split Long DKIM Records

If your DNS provider complains that the TXT record is too long, split the RSA public key string into two concatenated quoted strings within the same record:
Modern DNS hosts like Cloudflare, AWS Route 53, Vercel, and Namecheap automatically handle long strings without requiring manual splitting.