trustyourinbox

Why 1024-bit DKIM keys are being phased out

The short version: DKIM still permits 1024-bit RSA, but recommends 2048-bit keys. Check which key sizes your email provider supports, then rotate in the right order to keep existing mail verifiable.

What "1024-bit" actually refers to

DKIM signs each outbound message with a cryptographic key. The receiving mail server fetches your public key from DNS and uses it to verify the signature. The "1024-bit" or "2048-bit" refers to the size of the underlying RSA key.

Bigger keys are mathematically harder to factor. 1024-bit RSA was the standard DKIM default for a long time because key size was constrained by DNS UDP packet limits (large public keys won't fit in a single UDP response). Almost every modern resolver supports DNS-over-TCP fallback now, so the 1024-bit ceiling is a historical artifact rather than a real constraint.

What the standards and providers require

  • NIST ruled out RSA keys under 2048 bits for generating new digital signatures after the end of 2013 (Special Publication 800-131A). A 1024-bit key may still verify old signatures, which NIST files under "legacy use". That's the U.S. government body whose cryptographic guidance most of the industry follows.
  • Google requires a DKIM key of at least 1024 bits for mail to personal Gmail accounts under the sender guidelines in force since February 2024, and recommends 2048 bits if your domain provider supports it. The Workspace admin console offers both lengths and recommends the longer one.
  • RFC 8301 (January 2018) retired the rsa-sha1 signing algorithm and set the floor at 1024 bits: signers must use at least a 1024-bit key and should use 2048, and verifiers must refuse anything shorter than 1024 and accept keys up to 4096. Ed25519 signing (RFC 8463) arrived the same year as a smaller, stronger alternative.

A 1024-bit key still meets DKIM's minimum size. Moving to 2048 bits follows the stronger recommendation in RFC 8301 and Google's sender guidance. Those rules do not set a date when all 1024-bit signatures will stop verifying.

What to rotate to

A broadly supported choice is RSA 2048-bit. DKIM verifiers must support that size under RFC 8301. Check your ESP's settings or documentation: the key sizes it offers and the rotation steps vary by provider.

If you have the option, Ed25519 (RFC 8463) is the modern alternative. It's stronger than 2048-bit RSA at a fraction of the byte count. Your DNS record stays short, signing and verification are faster, and there's no looming "we need to move to 4096-bit eventually" treadmill. The catch: not every receiver verifies Ed25519 signatures yet, so publish an RSA selector alongside it and sign with both.

Don't bother with 4096-bit RSA. The marginal security benefit doesn't justify the DNS payload size; if you want stronger than 2048-bit, jump to Ed25519.

The rotation playbook

You can't "upgrade in place." DKIM keys are tied to a selector, a label like k1 or selector1 in the DNS hostname <selector>._domainkey.example.com. Rotating the key means introducing a new selector, switching your sender to use it, and eventually retiring the old one. Done in the right order, no mail breaks.

Step 1: Generate a new 2048-bit key in your ESP

Almost every ESP has a "Rotate DKIM" or "Add new key" option in the admin UI:

  • Google Workspace: Menu, then Apps, then Google Workspace, then Gmail, then Authenticate email. Click Generate new record and pick 2048 for the key length.
  • Microsoft 365: in the Defender portal, go to Email & collaboration, then Policies & rules, then Threat policies, then Email authentication settings, then the DKIM tab. Open your domain and click Rotate DKIM keys. Microsoft handles the selector dance for you. (Its PowerShell cmdlet still defaults to 1024; pass -KeySize 2048 when creating a new signing config.)
  • Other email providers: check their DKIM documentation for supported key sizes and rotation steps. Some manage the keys for you or require a support request. Confirm that a 2048-bit key is available before changing DNS.

Step 2: Publish the new selector's TXT record in DNS

The ESP gives you a hostname like k2._domainkey.acme.com and a long public-key string. Publish the TXT record. Don't touch the existing record yet. It's still signing live mail.

Step 3: Tell the ESP to start signing with the new selector

Some ESPs do this automatically once they detect the new TXT record. Others require you to manually flip a switch ("activate" or "set as primary"). After this step, all new outbound mail is signed with the 2048-bit key.

Step 4: Wait at least 7-14 days

Mail in flight may still reference the old selector via cached DNS or in-transit signatures. Leave the old selector's TXT record in place for at least one full DMARC aggregate-report cycle (typically 24h, but mail systems can buffer for days). 7-14 days is the conservative window most teams use.

Step 5: Remove the old selector's TXT record

Once you're confident no live mail is being signed with the old selector (you can verify in DMARC reports that the new selector is the only one appearing in DKIM results), delete the old TXT record. You're now fully on 2048-bit.

Things to watch out for

Don't delete the old selector before the rotation completes

If you publish the new TXT but delete the old one before the ESP starts signing with the new selector, all in-flight mail signed with the old selector will fail DKIM verification. Wait for confirmation.

Watch DMARC reports for unsigned mail

Some legacy senders or shadow-IT tools may still be configured against the old selector. If your DMARC reports show "Unknown" senders or DKIM failures from sources you thought were rotated, those senders need their own rotation cycle, not just a DNS flip.

Test mode (t=y) is not the rotation flag

Some ESPs publish new selectors with t=y in the DKIM record, which tells receivers "this domain is testing DKIM": per RFC 6376, a failing signature in test mode is treated like no signature at all. That's fine during the rotation, but remove t=y once the new selector is in production, so a receiver that reads the flag strictly gives your signatures full weight.

Don't have DKIM published yet?

Then rotation isn't your problem. Publishing is. Most modern ESPs walk you through first-time DKIM setup in their authentication UI. Generate the key, publish the TXT record, wait for the ESP to verify, and you're done. Start at 2048-bit so you don't have to do this dance again in two years.

Fix DNS issues with one click. See the exact change before it goes live.

Click the fix. We email you the exact record, wait five minutes, write it to Cloudflare or AWS Route 53, and read it back from public DNS. On any other DNS host, you get the record and a link to the right page. Included on every plan.

Was this page helpful?

Keep reading.

Start with one domain. See it with your own data.

Free for one domain, no card. Add one DNS record and the first reports usually arrive within a day.

  1. Monitoring
  2. Quarantine
  3. Reject