Skip to main content
Email Security 3 min read

What are the best practices to follow for managing DKIM keys?

Brad Slavin
Brad Slavin General Manager
Updated August 25, 2025

Quick Answer

DKIM key management has four rules. First, use 2048-bit RSA keys. 1024-bit is the floor stated in RFC 6376, but 2048-bit is the practical minimum today; anything shorter is increasingly ignored or treated as weak. Second, rotate keys at least once a year, more often if you suspect exposure. Long-lived keys give attackers more time to compromise the private half and forge signatures from your domain. Third, keep the private key on the signing mail server only, with file permissions and access logs that match the sensitivity. If the private key leaks, anyone can sign mail as you. Fourth, if you operate as an MSP or run multiple tenants, generate a unique key per customer and per sending stream rather than sharing one key across accounts; one compromise then stays scoped to one tenant. Pair these with SPF and a DMARC policy at p=quarantine or p=reject so a single signing failure doesn't sink legitimate mail.

What are the best practices to follow for managing DKIM keys?

email authentication

When it comes to validating the authenticity of an email’s contents, DKIM (DomainKeys Identified Mail) is the go-to authentication protocol for most organizations. It does so by adding a digital signature to the email’s header. This signature helps verify that the message is actually coming from a trusted source and that its contents have not been changed during transit

This email authentication protocol relies on two cryptographic keys—public and private — to do its job effectively. 

Since these keys are critical to the security and authenticity of your email communications, and therefore to your overall email security, it is important that you manage them properly. In this article, we will take you through the best practices that you need to follow for effective management of DKIM keys. But before we do so, let’s touch upon the basics.

What are DKIM keys?

As you already know, DKIM keys form an integral part of the DKIM, an email authentication system that determines whether an email message has been compromised or not or if it has originated from a legitimate source. The protocol uses two keys. The private key is securely stored in the sender’s email server, and the public one is published in the sender’s DNS records. When the receiving server receives an email, it cross-checks the digital signature in the email header with the public key published in the DNS. If the signatures match the public key, the email is considered authentic and untampered. 

How to manage DKIM keys effectively?

Managing DKIM Keys

Use long keys for added security

If your DKIM is short and uncomplicated, it would be easier for cyber attackers to decode the key, tamper with the messages, or insert malicious content. This is why it is recommended that you use at least 1024-bit keys. While these keys have a considerable security level, security teams are now steering towards 2048-bit keys as they are much more secure and complex, making it harder for attackers to get through. 

Rotate keys regularly

DKIM keys are not permanent. That is to say, they should be changed or ‘rotated’ from time to time.  If you use the same key for too long, it increases the risk of the key being compromised. It would also give the cybercriminal more time to identify or steal the key to forge DKIM signatures and send malicious emails on behalf of your domain. To avoid this, it is recommended that you rotate your DKIM keys regularly, at least once a year. 

malicious emails

Ensure the private key remains confidential

Another important aspect of managing DKIM keys is to ensure that the private key remains secure. Since the private key is used to sign outgoing emails, if it falls into the wrong hands, they can alter the messages and make them seem like they come from your domain. It could jeopardize your organization’s reputation and security

Final words

It’s no surprise that cyberattacks are only getting more severe each day. So, you need robust mechanisms to protect your emails, and DKIM alone does not suffice. We recommend that you combine these best practices with other email authentication protocols like SPF and DMARC. To get started, contact us today!

Topics

DKIMDMARCemail headeremail securityspf
Brad Slavin
Brad Slavin

General Manager

General Manager at DuoCircle. Product strategy and commercial lead across the email security portfolio.

Secure your email infrastructure

Protect, authenticate, and deliver. Contact our team to find the right solution.