Guides / DKIM key length for cold email: 1024 vs 2048 bits

DKIM key length for cold email: 1024 vs 2048 bits

Updated December 3, 2026

Your DKIM key length is the size of the RSA key your sending server signs with, and the public half of it sits in your DNS record. Most cold email domains use 1024-bit or 2048-bit keys. A 1024-bit key still meets the minimum, but the DKIM standard says signers should use 2048. Anything shorter than 1024 doesn't count at all. This guide explains what the standard says, what Google Workspace and Microsoft 365 give you, how to check your own key, and how to move to 2048 bits without breaking signing.

Check your domain nowFree SPF, DKIM, DMARC, MX and blacklist check. No signup.

What the key length is

DKIM signs each message with a private key on the sending server. Receivers look up the matching public key in a TXT record at selector._domainkey.yourdomain.com and check the signature with it. The long p= value in that record is the public key. For RSA keys, the number of bits (1024, 2048 and so on) is the size of the key. Longer keys are harder to break.

You don't choose the length in DNS. You choose it where the key is generated, which is usually your mailbox provider's admin console or your sending tool's domain setup page. DNS just publishes the result.

The free checker at the top of this page looks up DKIM on common selectors (or the one you enter) and now tells you how long each RSA key it finds is, along with SPF, DMARC, MX and blocklists.

What the DKIM standard says

RFC 8301, which updated DKIM's crypto rules in 2018, says in section 3.2: "Signers MUST use RSA keys of at least 1024 bits for all keys. Signers SHOULD use RSA keys of at least 2048 bits." It also says "Verifiers MUST NOT consider signatures using RSA keys of less than 1024 bits as valid signatures", and that such signatures "have permanently failed evaluation".

So there are three cases:

  • Under 1024 bits (for example 512 or 768): receivers that follow the standard treat the signature as failed. For DMARC that is the same as having no DKIM, so your mail depends on SPF alone.
  • 1024 bits: allowed, and still common. RFC 8301 notes that "while 1024-bit signatures are common, stronger signatures are not", and that receivers "can use the length of the signing key as one metric for determining whether a signature is acceptable".
  • 2048 bits: what the standard recommends. Receivers must be able to check keys from 1024 to 4096 bits.

We haven't seen Gmail, Outlook or Yahoo publish a rule that rejects or junks mail because a valid key is 1024 bits rather than 2048, so we won't claim a 2048-bit key will lift your inbox rate. It is the recommended setting, it costs nothing, and it removes one thing a receiver could hold against you.

What Google Workspace and Microsoft 365 give you

  • Google Workspace: when you generate a DKIM record (Apps, Google Workspace, Gmail, Authenticate email), Google's Set up DKIM help page offers 2048 or 1024 bits and says to pick 2048 if your domain provider supports 2048-bit keys, since "longer keys are more secure than shorter keys". It also says you can switch from a 1024-bit key to 2048. The default selector is google.
  • Microsoft 365: custom-domain DKIM uses two CNAME records, selector1 and selector2, that point to keys Microsoft hosts. Microsoft's DKIM setup article lists 1024 as the default KeySize for New-DkimSigningConfig in Exchange Online PowerShell, with 2048 as the other option, and shows Rotate-DkimSigningConfig -Identity contoso.com -KeySize 2048 to rotate to a 2048-bit key. See DKIM in Microsoft 365 for the full setup.
  • Sending tools: cold email platforms that sign with your domain generate the key on their DNS setup page. Many don't let you pick a length. If yours shows a short key, ask its support whether it can issue a 2048-bit one.

How to check your key length

  1. Run the free checker on your sending domain. If it finds a DKIM key it shows the selector and, for RSA keys, the length in bits. If your provider uses a custom selector, enter it (the part before ._domainkey).
  2. Or look at the record yourself: dig +short TXT google._domainkey.yourdomain.com (swap in your selector). A rough guide from the length of the p= value: about 216 characters is a 1024-bit key and about 392 characters is a 2048-bit key.
  3. For an exact answer, copy the p= value (without quotes or spaces) and run echo 'PASTE_P_VALUE' | base64 -d | openssl rsa -pubin -inform DER -noout -text | head -1. It prints a line like Public-Key: (2048 bit).
  4. Check the selector you actually sign with. Open a sent message's original headers and find DKIM-Signature: s= is the selector and d= is the domain. An old 1024-bit key on a selector you no longer use doesn't matter.

How to move to 2048 bits without breaking DKIM

  1. Generate a 2048-bit key in your provider or sending tool. Use a new selector if it lets you, so the old key keeps working while you switch.
  2. Publish the new TXT record. A 2048-bit key is longer than 255 characters, and a single TXT string can't be longer than that. Some DNS panels split it for you. Others need the value split into several quoted strings in one record. RFC 6376 section 3.6.2.2 says receivers join those strings back together "with no intervening whitespace", so splitting is fine as long as you don't add or drop characters. RFC 8301 notes that some DNS software only handles a single 256-octet string, which is why some panels still can't take 2048-bit keys.
  3. Don't publish two TXT records at the same selector. RFC 6376 says the records for one selector "MUST be unique" and that the result is undefined if there are several. Use a new selector or replace the old record.
  4. Run the free checker with the new selector and make sure the key is found and shows 2048 bits.
  5. Switch signing to the new key (in Google Workspace, Start authentication; in Microsoft 365, the rotation switches by itself, and Microsoft says it takes four days (96 hours) for the new key to start signing).
  6. Send a test to an outside inbox and confirm dkim=pass for your domain with the new selector. Leave the old record in place for a few days so messages already in transit can still be checked, then remove it.

What about Ed25519 keys?

RFC 8463 added a second DKIM algorithm, Ed25519, marked with k=ed25519 in the key record. Its keys are short (44 characters in base64), so they fit in one TXT string. RFC 8463 says signers can add both an RSA and an Ed25519 signature, on different selectors, for backward compatibility. For cold email, an RSA key of at least 2048 bits is still the one that matters, because not every receiver checks Ed25519 signatures. The checker finds Ed25519 keys too, but it only reports a length for RSA keys.

Keep an eye on it

Key changes are easy to get wrong: a pasted key with a missing character, a doubled host name, or an old selector deleted too early all switch DKIM off without any warning in your sending tool. OutboxWatch checks SPF, DKIM, DMARC, MX and blocklists on your sending domains every day and emails you when something changes. If DKIM passes but DMARC still fails, see SPF and DKIM pass but DMARC fails.

Frequently asked questions

Is a 1024-bit DKIM key still OK?

It is valid. RFC 8301 requires at least 1024 bits and recommends 2048, and receivers must accept keys from 1024 bits up. Moving to 2048 is the recommended setting, but a valid 1024-bit key is not the same as having no DKIM.

Will a 2048-bit key improve my cold email deliverability?

We can't promise that. We haven't seen a major mailbox provider publish a rule that penalizes valid 1024-bit keys. A 2048-bit key follows the standard's recommendation and removes one weak point, but volume, list quality, complaints and authentication alignment matter far more.

What happens with a 512 or 768-bit DKIM key?

Receivers that follow RFC 8301 must not treat the signature as valid, so it counts as a failed DKIM check. DMARC then has to pass on aligned SPF alone. Generate a new key of at least 2048 bits.

Why won't my DNS provider accept the 2048-bit DKIM record?

The value is longer than 255 characters, the limit for one TXT string. Check whether your provider splits long values automatically or wants several quoted strings in one record. If it can't do either, Google says to use a 1024-bit key instead.

Should I use 4096-bit DKIM keys?

RFC 8301 only requires receivers to check keys up to 4096 bits, and Google and Microsoft 365 offer 1024 and 2048. A 2048-bit key is the recommended and widely supported choice; a 4096-bit key is harder to publish and gives cold email nothing extra.

Find out what is wrong with your domainRun the free checker, or let OutboxWatch watch your domains daily and alert you when something changes.
Free weekly report for your domainOne email every Monday with your SPF, DKIM, DMARC, MX and blacklist status and what changed since last week. No card.
See the free weekly report

Related guides