DKIM (DomainKeys Identified Mail) is an email authentication method that uses cryptographic signatures to verify that an email was sent by an authorized server and hasn't been tampered with in transit. The public key used to verify these signatures is published in a DNS TXT record.
Check DKIM records for any domain using our free DNS lookup tool.
Look Up DKIM Records →A DKIM record publishes a public cryptographic key in DNS. When your mail server sends an email, it creates a digital signature using a private key. The receiving server retrieves the public key from your DKIM record to verify the signature.
If the signature is valid, the receiving server knows:
DKIM records are stored at a special subdomain combining the selector and "_domainkey":
selector._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjAN..."
DKIM record components:
| Tag | Required | Description |
|---|---|---|
v=DKIM1 |
Yes | DKIM version (must be "DKIM1") |
k= |
No | Key type (default: rsa, can be ed25519) |
p= |
Yes | Public key (base64 encoded) |
t= |
No | Flags (y=testing, s=strict) |
h= |
No | Hash algorithms (sha256) |
s= |
No | Service type (default: * for all) |
google._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1234..."
This DKIM record uses the selector "google" and contains an RSA public key for email verification.
A selector is an identifier that allows multiple DKIM keys for one domain. This is useful for:
google._domainkey.example.com → Google Workspace
s1._domainkey.example.com → Generic selector 1
selector1._domainkey.example.com → Microsoft 365
k1._domainkey.example.com → Mailchimp
mail._domainkey.example.com → Custom mail server
When you receive a DKIM-signed email, the header looks like:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=example.com; s=google;
h=from:to:subject:date:message-id;
bh=2jUSOH9NhtVGCQW...;
b=dzdVyOfAKCdLXd...
| Tag | Meaning |
|---|---|
v=1 |
DKIM signature version |
a=rsa-sha256 |
Signing algorithm |
c=relaxed/relaxed |
Canonicalization (header/body) |
d=example.com |
Signing domain |
s=google |
Selector (used to find DKIM record) |
h= |
Headers included in signature |
bh= |
Body hash |
b= |
Signature data |
Most email services provide DKIM keys automatically. For custom setups:
# Generate 2048-bit RSA key pair
openssl genrsa -out dkim.private 2048
openssl rsa -in dkim.private -pubout -out dkim.public
Add the public key to DNS:
selector._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjAN..."
Configure your mail server to sign outgoing messages with the private key.
| Key Size | Status | Notes |
|---|---|---|
| 1024-bit | Minimum acceptable | May become insecure; upgrade recommended |
| 2048-bit | Recommended | Good balance of security and compatibility |
| 4096-bit | Maximum security | May not fit in single DNS TXT record |
t=y flag during testing.Common issues and solutions:
Check DKIM selectors, validate public keys, and ensure your email signatures are properly configured.
Start free DNS Explorer trial14-day full-feature trial
Use our DNS Record Finder to look up and validate DKIM records for any domain.
Look Up DKIM Records →