> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DKIM Key Length

> Choosing between 1024-bit and 2048-bit DKIM keys and handling DNS 255-character limits.

# 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:

```text theme={null}
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx9...(first 250 chars)..." " ...(remaining chars)...
```

Modern DNS hosts like **Cloudflare, AWS Route 53, Vercel, and Namecheap** automatically handle long strings without requiring manual splitting.


## Related topics

- [Tags](/sending/tags.md)
- [Live Resources](/mcp-server/resources.md)
- [Delete your Mailofly Account](/guides/account/delete-account.md)
- [Avoid Gmail's Spam Folder](/guides/deliverability/avoid-gmail-spam.md)
- [Add domain](/getting-started/add-domain.md)
