SendGrid, a popular email service provider (ESP), often requires users to set up two DKIM (DomainKeys Identified Mail) records for domain authentication, typically labeled as s1._domainkey and s2._domainkey. This approach, while seemingly redundant to some users, is primarily driven by advanced security practices, specifically key rotation. Key rotation is a critical security measure that helps mitigate the risks associated with compromised private keys, ensuring the ongoing integrity and authenticity of email transmissions.
Key findings
Security Enhancement: The primary reason for multiple DKIM keys is to facilitate regular key rotation, which is a fundamental security practice.
Risk Mitigation: By periodically changing the DKIM keys, the window of vulnerability in case of a private key breach is significantly reduced.
Seamless Transition: Two keys allow ESPs to update one key while the other remains active, ensuring uninterrupted email signing and authentication during the rotation process. This concept is similar to how CNAME delegation enables SPF and DKIM authentication for email sending.
Industry Standard: Major ESPs and email security experts recommend or implement key rotation as a best practice for strong email authentication.
Key considerations
DNS Management: Users must correctly configure multiple CNAME records in their DNS to point to the ESP's key servers. This process is detailed in SendGrid's own documentation.
Authentication Integrity: Improper configuration of DKIM records can lead to authentication failures, impacting email deliverability.
Complexity vs. Security: While setting up multiple keys adds a layer of complexity, the security benefits of regular key rotation far outweigh the initial setup effort. This is crucial for maintaining a strong sender reputation and avoiding blocklists.
Multiple ESPs: For domains sending through multiple ESPs, it's essential to understand how to set up email authentication for each to avoid conflicts and ensure proper authentication.
What email marketers say
Email marketers often encounter the requirement for multiple DKIM keys when setting up their domain authentication with ESPs like SendGrid. Their perspectives typically revolve around the practical implications of this setup, balancing security benefits with ease of configuration and potential troubleshooting.
Key opinions
Initial Confusion: Many marketers initially find the need for two DKIM keys puzzling, assuming one should suffice for domain authentication.
Authentication Process: Marketers frequently confirm that selecting Advanced Settings during SendGrid domain authentication often reveals the option to choose a custom DKIM selector, which is necessary for setting up the required records.
DNS Record Management: The process involves adding specific CNAME or TXT records to their DNS, which can sometimes be a source of errors if not done precisely.
Deliverability Impact: Correctly configured DKIM is understood to be vital for email deliverability and ensuring messages don't land in spam folders.
Key considerations
Troubleshooting: Domain authentication issues often stem from incorrect DNS entries or delays in DNS propagation, requiring careful troubleshooting.
Platform Compatibility: Some website builders or DNS providers have specific nuances that can affect how DKIM records are added or recognized, leading to authentication challenges.
Key Bit Length: Concerns can arise regarding the bit length of DKIM keys, as some systems might require longer keys (e.g., 2048-bit) than what an ESP provides, which can impact specific client requirements. A discussion on this can be found on Spiceworks Community.
Marketer view
Marketer from Email Geeks observes that SendGrid requests two domain keys, s1._domainkey.domain and s2._domainkey.domain, and questions the underlying reason since one key seems sufficient and high-availability doesn't appear to be the sole motive. They are seeking clarification on this setup.
08 Apr 2020 - Email Geeks
Marketer view
Marketer from Wix Studio Forum shares a solution to SendGrid domain authentication issues, advising users to select the Advanced settings during the authentication process. This action reveals the option to choose a custom DKIM, which is crucial for configuring domain authentication correctly.
10 Jan 2024 - Wix Studio Forum
What the experts say
Email deliverability experts highlight that SendGrid's requirement for two DKIM keys is a sophisticated approach to enhancing email security and maintaining sender reputation. Their insights delve into the technical rationale behind key rotation and the broader implications for email authentication.
Key opinions
Mandatory Key Rotation: Experts confirm that the two keys (typically CNAMEs) are essential for facilitating continuous key rotation, a practice that's crucial for robust security.
Security Imperative: Any ESP not implementing key rotation, or an equivalent security measure like NS delegation, may not fully grasp the severe security implications of static keys.
Minimizing Risk: Regular key rotation drastically shortens the window during which a compromised private key could be exploited to forge DKIM signatures, protecting against unauthorized email sending.
Engineering Complexity: Implementing a system like SendGrid's, with per-domain separate keys and rotation, is significantly more complex from an engineering standpoint, but it offers superior security compared to a single, shared key model. Despite the complexity possibly leading to other issues, it is generally preferred.
Key considerations
Forged Signatures: Without proper key rotation, a single breach (e.g., old backup tapes, open cloud storage, insider threat) could enable attackers to forge DKIM signatures indefinitely.
Standard Practice: Using multiple DKIM records and selectors is considered a best practice for smooth key updates and robust email authentication, aligning with modern security standards.
Aligning with DMARC: Robust DKIM setup is critical for DMARC (Domain-based Message Authentication, Reporting, and Conformance) alignment, which helps prevent phishing and spoofing. Understanding the relationship between DMARC, SPF, and DKIM is key.
Selector Management: ESPs often use specific DKIM selectors (like s1, s2) to manage different keys. Familiarity with common DKIM selector names can aid setup and troubleshooting.
Expert view
Expert from Email Geeks explains that the presence of multiple DKIM keys, typically CNAMEs pointing to key servers, is for key rotation. They state that any ESP not using this (or NS delegation) indicates a fundamental misunderstanding of email security implications.
08 Apr 2020 - Email Geeks
Expert view
Expert from SpamResource asserts that frequent key rotation is a cornerstone of modern email authentication security. They emphasize that while it adds operational overhead, it is indispensable for protecting against long-term exploitation of potentially compromised private keys.
20 Feb 2024 - SpamResource
What the documentation says
Official documentation from email service providers and security organizations often outlines the technical requirements and best practices for DKIM implementation. These resources typically explain the purpose of multiple DKIM keys in the context of domain authentication, focusing on operational continuity and security resilience.
Key findings
Custom DKIM Selector: Documentation confirms that configuring domain authentication in platforms like SendGrid often requires the use of a custom DKIM selector to enable the necessary DNS records.
Multiple Records for Verification: ESPs generally require multiple DNS records, including DKIM, for full domain ownership verification and to enable sending from that domain, as highlighted by Gravity SMTP Documentation.
Key Update Facilitation: Having multiple DKIM records (e.g., s1 and s2) simplifies the process of updating keys smoothly, allowing a switch to new keys without service disruption, as explained by DuoCircle.
Selector Naming Conventions: Documentation implicitly or explicitly references common DKIM selector name examples and practices for managing multiple keys effectively.
Key considerations
DNS Propagation Times: While documentation guides setup, it's implied that users must account for DNS propagation delays when new records are added or updated, which can affect when the authentication becomes active.
RFC Compliance: The use of multiple keys aligns with the flexibility allowed by DKIM specifications, which permit multiple selectors for a domain to manage different signing practices or keys.
Automated Rotation: Many ESPs automate the key rotation process once the initial dual-key setup is complete, minimizing ongoing manual intervention from the user.
Impact on Deliverability: Documentation consistently emphasizes that correct DKIM setup, including multiple keys where required, is fundamental for robust email authentication, which directly impacts deliverability and trust with receiving mail servers.
Technical article
SendGrid documentation states that when authenticating a domain on a SendGrid account, users must utilize the Custom DKIM Selector option to correctly configure their domain authentication. This ensures that the appropriate DKIM records are generated and linked to their sending domain.
20 Nov 2023 - SendGrid Support
Technical article
DuoCircle documentation explains that the presence of multiple DKIM records simplifies the process of updating keys without interruption. By employing a new selector for each updated key, organizations can transition to a new key seamlessly, thereby preventing downtime in their email service.