When you add a sending domain to an email service, the setup page often asks for CNAME records such as s1._domainkey.example.com pointing to a name at the vendor, where you might have expected a long TXT record containing a public key. This is delegation: your DNS says "the DKIM key for this selector is whatever is published at that other name", and the vendor controls what is published there. The arrangement saves you from copying keys, lets the vendor rotate keys without asking you to edit DNS and makes the setup easier to get right. It also changes who controls the key and adds new ways for the check to fail. This guide explains how a DKIM lookup follows the CNAME, why vendors prefer it, what you should verify after publishing, the typical mistakes with registrars and DNS proxies and the trust you place in the vendor when you delegate. It assumes you are familiar with the basics in DKIM records and DKIM selectors.
How the lookup works
A receiver verifying a message reads the d= (domain) and s= (selector) from the signature and queries the TXT record at s._domainkey.d. If that name is a CNAME, the DNS resolver follows it to the target and returns the TXT record found there. The receiver sees only the final TXT result. From its perspective, the key is published for your domain, which is what matters for alignment. See DMARC alignment.
; In your zone
s1._domainkey.example.com. 3600 IN CNAME s1.domainkey.u1234.vendor.example.
s2._domainkey.example.com. 3600 IN CNAME s2.domainkey.u1234.vendor.example.
; In the vendor's zone (you do not manage this)
s1.domainkey.u1234.vendor.example. 300 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."Two selectors are common. The vendor signs with one at a time and switches to the other during rotation, so that the key at the other selector can be replaced without breaking messages in flight. Both CNAMEs must be present from the start.
Why vendors prefer CNAME
- Rotation without your involvement. Good practice is to replace DKIM keys periodically; see DKIM key rotation. With delegation, the vendor publishes the new key at the target name and the change is live for your domain at once.
- Fewer copy errors. Long keys split across two TXT strings are error-prone in many DNS interfaces. A short CNAME is easier. See TXT length and registrar quirks.
- Support. If the key is wrong, the vendor can fix it without waiting for you.
- Consistency across customers. The vendor can handle thousands of domains with one process.
What delegation means for trust
Delegating is a statement of trust. Whoever controls the target record controls which public key is accepted for your selector, and so which messages are accepted as validly signed by your domain. If the vendor is compromised, or if the target name is abandoned and later registered by someone else, signatures made with a key they control would verify as yours. Keep in mind the following:
- Delegate only to vendors you trust with your sending identity, and review the vendor's security practices. See provider security and compliance review.
- Remove the CNAMEs when you stop using the vendor. A dangling CNAME pointing to a name in a zone that might later be claimed by someone else is a known takeover risk.
- Keep an inventory of all selectors under
_domainkeyand who owns each one. - Pair delegation with DMARC reporting, so that signatures from unexpected sources show up. See DMARC report tools.
- Prefer vendors that sign with your own domain over those that only use their domain, because the former builds your domain reputation. See domain vs IP reputation.
Verifying the setup
# The CNAME itself
dig s1._domainkey.example.com CNAME +short
# s1.domainkey.u1234.vendor.example.
# What a receiver sees after following it
dig s1._domainkey.example.com TXT +short
# "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
# Check both selectors
for s in s1 s2; do dig $s._domainkey.example.com TXT +short; doneThe second query must return a TXT record that starts with v=DKIM1 and contains a p= value. If it returns nothing, the CNAME target is wrong or not yet published by the vendor. Then send a test message and read the Authentication-Results header for dkim=pass header.d=example.com. The checker can look up your selectors, and the guide to reading headers shows what to look for.
Common mistakes
| Mistake | Symptom | Fix |
|---|---|---|
| Domain name appended twice by the DNS panel | Record is at s1._domainkey.example.com.example.com | Enter only the selector label in the host field, or use the fully qualified name with a trailing dot, according to the panel |
| Value copied with extra spaces or missing dot | Target not found | Paste exactly; check with dig |
| Proxy enabled on Cloudflare (orange cloud) | CNAME flattened or hidden; lookup fails or returns the wrong data | DKIM CNAME records must be "DNS only" |
| Existing TXT record at the same name | Conflict: a name with a CNAME cannot hold other records | Delete the old TXT first |
| Only one of two CNAMEs created | Works until the vendor rotates, then fails | Create both selectors |
| Record created at the wrong domain level | Mail is sent from a subdomain whose selector is not published | Publish at the signing domain (d=) used by the vendor, see sending subdomain strategy |
| TTL too high before changes | Slow propagation | Lower the TTL before migrating |
| Verification button fails but mail passes | Vendor check lags DNS | Wait for TTL, then retry; confirm with dig |
Registrars and DNS providers
Interfaces differ in whether they want the host field relative to the zone (s1._domainkey) or as a full name. Some providers do not allow underscores in host names in the simplified editor, or restrict CNAME records to certain forms. If your panel refuses, look for an advanced mode or contact support. Make sure no automatic "CNAME flattening" is applied to these records; flattening replaces the CNAME with the final answer, which breaks delegation because the vendor's later changes will not be followed. See adding DNS records at GoDaddy, Namecheap and Cloudflare.
When delegation and rotation meet
A rotation by the vendor can be invisible or can cause a short failure, depending on how it is done. A careful vendor publishes the new key under the inactive selector first, waits for DNS caches to expire, and only then switches signing. If your TTL for the CNAME is very long, receivers may cache the old target for a while, but since the target changes at the vendor and not in your zone, the cache of the final TXT record follows the vendor's own TTL. Ask your vendor how often it rotates and how it announces changes. Watch your DMARC reports around rotation dates; a sudden dip in DKIM pass rate is the first sign that something went wrong.
What if I want to control the key myself?
You can usually choose to publish your own TXT record if the vendor supports "bring your own key" or if you operate your own signer. The trade-off is more work for you in exchange for complete control. For managed services, delegation is the standard and is acceptable if you trust the vendor and keep your records tidy. Whichever you choose, record where each selector lives, and review the list when you add or remove a service.
A DKIM CNAME is a small record with a large meaning. Publish both selectors, verify the chain with dig, keep proxies away from it and remove it when the vendor relationship ends.
Authenticate your domain in minutes Add your sending domain and publish the records we show you.
References and further reading
Frequently asked questions
Why does my email vendor ask for a DKIM CNAME instead of a TXT record?
So that the vendor can publish and rotate the key at its own name while your DNS simply points to it.
How do receivers verify DKIM with a CNAME?
The resolver follows the CNAME to the target TXT record, and the receiver uses that key as if it were published at your selector.
Why does my DKIM CNAME fail on Cloudflare?
The record may be proxied. DKIM CNAME records must be set to DNS only.
Is DKIM delegation safe?
It is safe if you trust the vendor. Remove the CNAMEs when you stop using the service to avoid takeover risk.
Do I need both selector CNAMEs?
Yes. Vendors rotate between two selectors, and a missing one breaks signing after rotation.