Signers must use RSA keys of at least 1024 bits and should use 2048. Receivers reject shorter keys. A 2048-bit key is too long for one 255-character TXT string, which is where most publishing mistakes happen.
| Syntax | v=DKIM1; k=rsa; p=<public key> |
| Minimum | 1024 bits (RFC 8301) |
| Recommended | 2048 bits |
| Receivers must verify | 1024 to 4096 bits |
| Also possible | Ed25519 (RFC 8463), usually alongside an RSA key |
| Defined in | RFC 8301 |
What it does
RFC 8301 set the floor in 2018: signers must not use keys under 1024 bits, and should use 2048. Keys of 512 or 768 bits fail at major receivers.
A TXT record’s value is made of strings of at most 255 characters each; a 2048-bit key is about 400. The key goes in one TXT record as several quoted strings, which receivers join without spaces. Most DNS panels do this for you; some need you to paste the parts in quotes.
Examples
google._domainkey IN TXT ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqh…first part…" "…second part…IDAQAB" )
One record, two strings: joined, they are the key.
See what your own DKIM record says
Every term of your published record, read and explained — including this one.
Common mistakes
- Splitting the key into two separate TXT records instead of two strings in one record.
- A space or line break pasted into the middle of the key.
What we recommend
Use 2048-bit keys. If your DNS host cannot hold one, use 1024 until you can move, not less.
Sources
Checked on 25 September 2026 against these official sources: