// how to fix
DKIM with CNAME records: delegated selectors (Microsoft 365, SendGrid…)
Many providers ask for DKIM as CNAME records instead of a TXT key. Here is how they work and the mistakes that break them.
What it means
A DKIM key is normally a long TXT record published at a name like selector._domainkey.yourdomain.com. Many providers, such as Microsoft 365, SendGrid, Mailchimp or Amazon SES, ask you instead to add a CNAME record at that name.
A CNAME is a pointer. It says "the answer is over there, at the provider's domain". The provider then publishes the real key on its side. This is called a delegated selector. Its big advantage: the provider can change (rotate) the key without you touching your DNS.
Typical examples:
selector1._domainkey.yourdomain.com CNAME (value shown in Microsoft 365) selector2._domainkey.yourdomain.com CNAME (value shown in Microsoft 365) s1._domainkey.yourdomain.com CNAME s1.domainkey.u1234.wl.sendgrid.net
Why it matters
- If the CNAME is wrong, receivers find no key and DKIM fails, even though the provider signs correctly.
- Microsoft 365 and other tools refuse to enable DKIM signing until they can see your CNAMEs.
- Without an aligned DKIM signature, DMARC depends only on SPF, which breaks with forwarding.
How to check
Delivmail checks this for you in two ways:
- Send a test email: on the home page (
/), copy your unique test address, send it a normal email from the mailbox or tool you want to check, then open the report. - Use the Domain scanner: type your domain at
/domain-scannerto read your SPF, DMARC and MX records without sending anything.
In the report, the DKIM line shows which domain signed (d=) and whether the key was found.
How to fix it
- Copy the exact values from your provider. Do not guess them: Microsoft 365 values contain your domain and tenant name, SendGrid values contain your account number.
- Create CNAME records, not TXT. If a TXT record already exists at the same name, delete it: a name cannot hold a CNAME and another record at the same time.
- Check the name field. Many DNS panels add your domain automatically. Type
selector1._domainkey, not the full name, or you getselector1._domainkey.yourdomain.com.yourdomain.com. - Turn off proxying. On Cloudflare, set DKIM CNAMEs to "DNS only" (grey cloud). A proxied record does not return the key.
- Add all the records asked. Microsoft 365 uses two selectors and switches between them when it rotates keys. If you add only one, DKIM breaks at the next rotation.
- Activate signing in the provider. In Microsoft 365, DKIM must be enabled for your domain in the Defender portal after the CNAMEs are visible. Other tools have a "Verify" button.
Test the CNAME yourself
On a computer, run:
nslookup -type=TXT selector1._domainkey.yourdomain.com
You should see the CNAME followed by the key (v=DKIM1; k=rsa; p=...). No answer means the CNAME is missing or misspelled.
Check that it is fixed
DNS changes can take from a few minutes to 48 hours. Once the provider confirms the records, send a new email to a fresh Delivmail test address. The report should show DKIM passing with d=yourdomain.com, and DMARC passing.
Official help: Microsoft 365 DKIM guide.
Check that it is fixed
DNS changes can take from a few minutes to a few hours. Then send a new test email or scan your domain again.
Related guides
- No SPF record on your domainYour domain does not say which servers may send email for it. Add one TXT record and receivers can tell your real emails from fakes.
- SPF error: too many DNS lookups (permerror)SPF allows at most 10 DNS lookups. Above that, the whole record breaks and receivers treat it as invalid. Here is how to slim it down.
- Several SPF records on one domainA domain must have only one SPF record. With two or more, SPF breaks for every email. Merge them into a single line.
- SPF fails: the sending server is not authorizedYour domain has an SPF record, but the server that sent your email is not in it. Find which service sent the email and add it.
- No DKIM signature on your emailsDKIM adds a digital signature that proves an email really comes from your domain. Turn it on in your email provider and publish its key in DNS.