mailampel

← All articles

The DKIM record (_domainkey) explained: structure, example and what each value means

The DKIM record is a TXT record under selector._domainkey.your-domain containing the public key. Example ready to copy, every parameter (v, k, p, t) explained, finding your selector, checking the record.

6 min read · Updated 7 September 2026

A DKIM record is a TXT record in your domain's DNS that publishes the public key for the DKIM signature. It always lives under a name following the pattern selector._domainkey.your-domain.com — "_domainkey" is the fixed part, the selector a freely chosen name set by your sending service. For every email, the recipient reads from the signature which selector is meant, fetches the key under exactly that name and uses it to verify that the message came unaltered from an authorised system.

What a DKIM record looks like

DNS record of type TXT:
Name / host
selector1._domainkey.example.com
Value
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…
The value after p= is the public key — shortened here. The real value is generated by your sending service (Microsoft 365, Google Workspace, newsletter tool); never enter the example value.

The name consists of three parts: the selector (here selector1), the fixed word _domainkey and your domain. In many DNS forms you only enter selector1._domainkey, because the form appends the domain automatically.

What the parameters mean

TXT or CNAME?

Many providers do not have you create a TXT record with the key, but a CNAME pointing to a name at their side — the TXT record with the actual key then lives with the provider, and they can rotate the key without you changing anything. Microsoft 365 works this way:

DNS record of type CNAME:
Name / host
selector1._domainkey.example.com
Value
selector1-example-com._domainkey.examplecorp.onmicrosoft.com
Example Microsoft 365 (two CNAMEs, selector1 and selector2). The exact targets are shown in the admin portal — never copy them from an example.

For the recipient both are the same: it queries the TXT record and follows the CNAME automatically. What matters is that both do not exist under one name — a CNAME may not have any other records alongside it.

Finding your domain's selector

The selector is chosen by the sending service, not by you. You will find it in two places: in the service's portal (where the DNS records are displayed) or in a sent email. Open the headers of an email you sent to yourself and look for the DKIM-Signature line: the value after s= is the selector, the one after d= the signing domain. The mailampel header check reads both for you.

Checking the record

Fastest with the domain check: it probes the common selectors and rates key length and syntax. By hand, use nslookup -type=TXT selector1._domainkey.your-domain.com (Windows) or dig TXT selector1._domainkey.your-domain.com. The record must contain v=DKIM1 or at least p= and must not be empty. How to switch on DKIM at your provider is in Setting up DKIM; what the record achieves together with SPF and DMARC is in SPF, DKIM, DMARC: the difference.

Frequently asked questions

What does _domainkey mean?

_domainkey is the fixed name component under which DKIM keys live in DNS (defined in RFC 6376). The selector comes before _domainkey, the domain after it: selector._domainkey.your-domain.com. The leading underscore is mandatory.

How do I find my domain's DKIM selector?

In the DKIM-Signature header of a sent email: the value after s= is the selector. Alternatively, the portal of your mail or sending service shows the DNS names to enter. There is no way to fully enumerate all selectors of a third-party domain — checking tools try the usual names.

Can a domain have several DKIM records?

Yes, any number — one per selector. Every sending service gets its own selector with its own key, and when rotating keys a new selector is created before the old one disappears.

Why does my provider specify a CNAME instead of a TXT record?

So the provider can rotate the key on their side without you touching your DNS. The CNAME points to the TXT record at the provider; receiving servers follow the reference automatically. Technically they verify the same TXT record in the end.