DKIM (DomainKeys Identified Mail) is an email authentication method that adds a digital signature to outgoing emails. This cryptographic signature allows receiving mail servers to verify that the email was actually sent by the domain it claims to be from and that the message content has not been altered during transit.
DKIM is essential for email deliverability and brand protection. Without DKIM, attackers can forge emails that appear to come from your domain, damaging your reputation and potentially defrauding your customers. DKIM also helps your legitimate emails reach the inbox instead of spam folders. Major email providers like Gmail, Yahoo, and Microsoft use DKIM verification as a key factor in determining whether to trust incoming messages. Since February 2024, Google and Yahoo require DKIM authentication for all bulk email senders.
DKIM works through public-key cryptography. When you send an email, your mail server creates a unique digital signature using a private key stored on your server. This signature is added to the email header as a DKIM-Signature field. When the receiving server gets your email, it retrieves your public key from your domain's DNS records (stored as a TXT record) and uses it to decrypt and verify the signature. If the signature matches, it proves two things: the email genuinely came from your domain, and the message body and key headers were not modified after signing.
A DKIM selector is a name that identifies a specific DKIM key in your DNS records. It allows you to have multiple DKIM keys for different email services. For example, you might use 'google' as a selector for Google Workspace and 'sendgrid' for SendGrid. The selector appears in both the DNS record name (selector._domainkey.yourdomain.com) and the DKIM-Signature header.
SPF verifies that an email was sent from an authorized IP address, while DKIM verifies that the email content has not been tampered with and that it was signed by the claimed domain. SPF checks the sending server; DKIM checks the message integrity. Both are essential and work together with DMARC for complete email authentication.
Setting up DKIM involves three steps: 1) Generate a public/private key pair through your email service provider or mail server, 2) Publish the public key as a TXT record in your domain's DNS, 3) Configure your mail server to sign outgoing emails with the private key. Most email service providers like Google Workspace, Microsoft 365, and SendGrid provide step-by-step instructions for their specific setup.
Common causes of DKIM failure include: incorrect DNS record formatting, mismatched selectors between your mail server and DNS, the message being modified by a forwarding server or mailing list, expired or rotated keys that haven't been updated in DNS, or DNS propagation delays after making changes. Use DMARC reports to identify the specific failure reason.
Start using EmailVerify today. Verify emails with 99.9% accuracy.