Guides
How to add a DKIM record at your DNS host
2 November 2026
To add a DKIM record, copy the record your email provider gives you into your DNS host as a new TXT or CNAME record. The name is the selector followed by ._domainkey, such as google._domainkey. Enter only that part in the Name field, because the host adds your domain for you. Then wait for the provider to see it and turn signing on. Most mistakes happen in that Name field.
This guide covers the DNS step: what to type, where, and how to check it worked. For what DKIM is and how each provider generates its keys, see how to set up DKIM. If you would rather have someone confirm the result, a $129 Snapshot reads the DKIM selectors your domain publishes and flags the ones that are missing or broken.
What you need before you start
- The record from your email provider. Google Workspace, Microsoft 365, and newsletter platforms each generate it. You do not write a DKIM key yourself.
- Access to the DNS host. That is wherever your domain’s nameservers point. It may be your registrar (GoDaddy, Namecheap), a DNS service (Cloudflare), or your website platform. If you are not sure, look up the domain’s NS records or check where you pay for the domain.
- The record type. Your provider will say TXT or CNAME. Use what it says.
TXT or CNAME: which one you get
A DKIM record holds a public key. Receiving servers look it up at selector._domainkey.yourdomain.com, the naming pattern set out in RFC 6376 section 3.6.2.1. Providers publish that key in one of two ways:
- TXT record. You paste the key itself. Google Workspace works this way. Its DKIM setup page says the record type is TXT and the value looks like
v=DKIM1; k=rsa; p=followed by the key. - CNAME record. You point a name at a record the provider hosts, so the provider can change the key without asking you. Microsoft 365 and most newsletter platforms work this way. Microsoft’s DKIM configuration page asks for two CNAMEs,
selector1._domainkeyandselector2._domainkey.
Do not convert one into the other. If the provider gives you a CNAME, a TXT record with the same name will not work, and the reverse is also true.
The Name field
Most DNS hosts want the name relative to your domain. GoDaddy’s help page on adding a TXT record describes the Name as the host name or prefix without the domain name. So for a Google key on example.com:
Type: TXT
Name: google._domainkey
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqh...
If you type google._domainkey.example.com into a host that adds the domain itself, the record ends up at google._domainkey.example.com.example.com, and no receiver will find it. Google’s DKIM troubleshooting page says the same thing: do not add the domain again to the record name in your DNS settings.
A few hosts want the full name instead. If the form shows your domain as a suffix next to the box, or if existing records in the list show only the prefix, use the prefix. If existing records show the full name ending in a dot, follow that pattern.
Step by step at common hosts
GoDaddy
- Open your Domain Portfolio, select the domain, and open the DNS tab.
- Choose Add New Record and pick TXT or CNAME, whichever your provider gave you.
- Name: the selector part only, such as
google._domainkey. - Value: the key, or the CNAME target, exactly as given. GoDaddy’s TXT page says values can be up to 1,024 ASCII characters.
- Leave TTL at the default of one hour and save.
GoDaddy’s page on adding a CNAME record says changes usually apply within an hour but can take up to 48 hours.
Cloudflare
- Open the DNS Records page for the domain and choose Add record, as described in Cloudflare’s guide to creating DNS records.
- Pick the type, enter the selector part as the Name, and paste the value.
- For a CNAME, set proxy status to DNS only.
- Save.
Cloudflare’s docs note that proxy status is a choice you make on A, AAAA, and CNAME records. A proxied CNAME answers with Cloudflare’s own addresses instead of pointing to the provider’s record, so a mail server looking up the key does not reach it. DKIM CNAMEs should be DNS only.
Other hosts
The fields are the same everywhere: type, name, value, and TTL. Look for a DNS, Zone, or Advanced DNS page. If your website platform manages DNS for you, the setting is usually under Domains.
Long keys and the 255-character limit
A 2048-bit key is longer than 255 characters, and many DNS hosts limit each TXT string to 255. Google’s troubleshooting page says that if your host has this limit, you cannot enter a 2048-bit key as one string. Its advice:
- Split the key into several strings.
- Put each string inside quotes.
- Enter the strings one after another in the Value field.
The result looks like this:
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
"...rest of the key...IDAQAB"
This is safe because RFC 6376 section 3.6.2.2 says the strings in a TXT record must be joined with no space between them before use. Many hosts split long values for you, so try pasting the whole key first and check the result. If your host will not take a long value at all, Google says you can use a 1024-bit key instead, or ask the host whether it supports longer records. Google’s setup page recommends 2048-bit where the host supports it.
CNAME records do not have this problem. The long key lives at the provider.
Turn signing on, in the right order
Publishing the record does not start DKIM by itself. The provider has to start signing, and most will not let you until they can see the record.
- Google Workspace: after the TXT record is in place, go to Apps, Google Workspace, Gmail, Authenticate email, and click Start authentication. Google says not to click it before the DNS record exists, and that it can take up to 48 hours to start working. When it is working, the status reads Authenticating email with DKIM. The Google Workspace guide has the full sequence.
- Microsoft 365: in the Defender portal’s Email authentication settings, the DKIM tab shows the status
CnameMissinguntil Microsoft finds both CNAMEs. Microsoft says detection takes a few minutes or longer. Once found, turn on Sign messages for this domain with DKIM signatures, and the status becomes Signing DKIM signatures for this domain. See the Microsoft 365 guide. - Newsletter platforms: most have a Verify or Authenticate button on the domain settings page. Mailchimp and Klaviyo specifics are in our Mailchimp and Klaviyo guide.
Check that it published
From a terminal, ask DNS directly. For a TXT key:
dig TXT google._domainkey.example.com +short
You should see the v=DKIM1 value, possibly as several quoted strings. For a CNAME:
dig CNAME selector1._domainkey.example.com +short
You should see the provider’s target. Google’s troubleshooting page suggests its Admin Toolbox Dig tool if you do not have a terminal, and reminds you to add a period and your domain to the selector when you look it up there.
Then send a message to a Gmail address you control, open it, and choose Show original. The DKIM line should say PASS, and the signing domain should be your domain, not the provider’s.
Common mistakes
- Domain added twice to the name. The record exists, but at the wrong place.
- Key pasted with a missing piece. Google’s troubleshooting page warns that a key can be truncated or have its parts out of order. Compare the published value with what the provider shows, character for character, at the start and end.
- Extra quotes or spaces. Some hosts add quotes for you. Pasting your own on top can leave literal quote marks in the key.
- Proxied CNAME at Cloudflare. Switch it to DNS only.
- Wrong selector. Each provider picks its own. Copy it, do not guess it.
- Old records left behind. If you leave a provider, remove its DKIM records. An unused key is one more thing to keep track of.
Next: DMARC
DKIM on your own domain is what lets most third-party mail pass DMARC, since SPF often checks the provider’s domain instead of yours. Once DKIM passes for every tool that sends as you, publish a DMARC record and read the reports. Our guide to why DMARC fails explains alignment if the reports show failures anyway.
Sources
- Google Workspace: Set up DKIM (TXT record, key length, Start authentication, 48 hours)
- Google Workspace: Troubleshoot DKIM issues (255-character strings, record name, truncated keys)
- Microsoft Learn: Set up DKIM for a custom domain (two CNAMEs, CnameMissing status)
- GoDaddy: Add a TXT record and Add a CNAME record
- Cloudflare: Create DNS records
- RFC 6376: DKIM: sections 3.6.1, 3.6.2.1, 3.6.2.2