DKIM record: what it is and how to set it up
Last updated
The short answer
DKIM adds a digital signature to every email your domain sends. The matching public key sits in a DKIM record in your domain's DNS, so the receiving server can check the message really came from your domain and wasn't changed on the way. Your email provider creates the key and shows you the record to add; you add it, then switch signing on. Do the same for every service that sends email as you. Gmail and Yahoo expect every sender to have SPF or DKIM, and bulk senders to have both.
How DKIM works
- Your email provider holds a private key and uses it to sign each message as it sends it.
- The signature travels in a hidden
DKIM-Signatureheader, which names the signing domain (d=) and a selector (s=). - The receiving server looks up the public key in your DNS and checks the signature. If anything in the signed parts changed on the way, the check fails.
What a passing signature proves, in the words of RFC 6376, is that the signed content "has not changed since it was signed", and which domain signed it. It doesn't, by itself, tell receivers to reject unsigned fakes: that is DMARC's job.
The selector and the DNS record
The selector is a label that lets one domain publish several keys, one per service. The record lives at selector._domainkey.yoursite.com. For Google Workspace the default selector is google, so the record looks like this (the key is much longer):
Name: google._domainkey
Type: TXT
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…v=DKIM1says it is a DKIM record;k=rsais the key type;p=is the public key itself.- Some providers, Microsoft 365 among them, give you CNAME records instead, which point to keys they host for you.
- An empty
p=means the key has been withdrawn.
Key size
RFC 8301, which updated DKIM's rules on keys, says signers must use RSA keys of at least 1024 bits and should use at least 2048. Google's sender guidelines recommend 2048-bit keys where your provider supports them. If your provider offers 2048, choose it; some DNS hosts need the long value split into parts, which their help pages explain.
How to set it up
- In your email provider's admin settings, find DKIM (Google Admin console: Authenticate email; Microsoft 365: the Defender portal's DKIM page) and generate a key or show the records.
- Add the record exactly as shown, wherever your domain's DNS is managed (your registrar, host or Cloudflare).
- Wait for the record to be visible, then go back to the provider and switch signing on. Adding the record alone isn't enough.
The SPF, DKIM and DMARC guide has the exact steps for Google Workspace and Microsoft 365.
Every service that sends as you
Newsletter tools, invoicing and booking systems, and help desks that send email from your address each need DKIM set up in their own settings, usually as one or two records with their own selector. This matters for DMARC: a service that signs with your domain lets DMARC pass even when its return address is its own. See the SPF record explained for the other half.
How to check it passes
- Run the free scan: it reports the DKIM keys and DMARC record it can find in your DNS. A key in DNS doesn't prove your mail is signed, and a service with its own selector name may not be found, so check a real message too.
- Send a message from each service to a personal Gmail address, open it and choose Show original: it shows DKIM as PASS or FAIL, and the domain that signed. The
DKIM-Signatureheader names the domain (d=) and selector (s=). - Check the signing domain is your own, not the service's.
Checklist
- DKIM is switched on with your email provider, with its record in your DNS.
- Every other service that sends as you signs with your domain.
- Keys are 2048-bit where your provider offers it.
- A test message to Gmail shows DKIM: PASS, signed by your domain.
- SPF and DMARC are set up alongside it.
Questions people ask
- Do I create the DKIM key myself?
- Usually not. Your email provider generates the key pair, keeps the private half, and shows you the public half to add to your DNS. You copy what it gives you exactly.
- Can I have more than one DKIM record?
- Yes. Unlike SPF, each sending service uses its own selector, so you can have several DKIM records side by side: one for your email provider, one for your newsletter tool, and so on.
- Is DKIM enough to stop people faking my email?
- No. DKIM proves a signed message came from the signing domain unchanged, but receivers aren't told what to do with unsigned fakes. DMARC is what does that.
- Why does my DKIM record not work after I added it?
- The usual causes: the record went under the wrong name (it must be selector._domainkey on your domain), the long value was cut off or split wrongly, or you didn't switch signing on in your provider's settings afterwards.
What the free scan checks for this
These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.
- SPF record
- DKIM / DMARC
Sources
Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- Google Workspace Admin Help: Email sender guidelines
- Google Workspace Admin Help: Set up DKIM
- Microsoft Learn: Set up DKIM for your Microsoft 365 domain
- RFC 8301: DKIM cryptographic algorithm and key usage update
More guides
- How to get your business recommended by ChatGPT and other AI assistants
- Why can't ChatGPT see my website? 5 reasons and how to fix them
- robots.txt for small businesses: what to allow, what to block
- What is IndexNow, and why does it matter for your website?
- The pages every small-business website needs
- How to turn more website visitors into enquiries
- Why your site is slow, and what to fix first
- How your business shows up in Google: titles, descriptions and headings
- One address for each page: www, https, canonical tags and redirects
- A sitemap for any site, including one built by hand
- Making your site usable by everyone
- Making your site work on a phone
- Security headers for a small business website: what to set, by platform
- Stop people sending email as your business: SPF, DKIM and DMARC
- Cookies and consent: what your site sets and when you need a banner
- How your links look when people share them
- Getting your business details right for Google Maps and AI assistants
- What is GEO (generative engine optimization)? A plain-English guide
- llms.txt: what it is, and does your business need one?
- AI crawler blocked? Fixing 403, 404 and 405 errors for GPTBot, ClaudeBot and PerplexityBot
- How to see if ChatGPT visits your website
- GEO vs SEO: what's the difference for a small business?
- AI SEO for small businesses: where to start
- Answer engine optimization (AEO), explained
- SPF record: what it is and how to set one up
- DMARC record: what it is and how to set one up
- Why do my emails go to spam? How to check SPF, DKIM and DMARC
- Content Security Policy (CSP) for a small business website
- Website caching and CDNs: what they are and do you need one?
- security.txt: what it is and how to add one to your site
- What is DNSSEC, and should you turn it on?
- CAA record: what it is and how to set one up
- Largest Contentful Paint (LCP): why your page feels slow and how to fix it
- Local business schema: structured data for a small business, with a template
- Accessibility statement: what to write, with a template
- Trust badges and testimonials that help a website win customers
- Why isn't my website showing up on Google? How to get it there
- Google Business Profile: a checklist to make it match your website
- Custom 404 page: what a good one does, and the soft 404 trap
- Meta description length: how long should it be?
- Image alt text: what to write, with examples
- Broken links: how to find and fix them on your website
- Website audit checklist: a free check-up for a small business site
- Why does my website say 'Not secure'? How to fix it
- Is my website ADA compliant? An accessibility checklist for US small businesses
- Has my website been hacked? How to check, and what to do next
- Core Web Vitals explained: LCP, INP and CLS in plain English
- Interaction to Next Paint (INP): why your site feels slow to tap, and how to fix it
- Cumulative Layout Shift (CLS): why your page jumps while it loads, and how to stop it
- What should a small business privacy policy include? A checklist
- Contact form emails not arriving? Find where enquiries get lost
- Website monitoring: catch downtime, broken enquiries and expired certificates
- Moving or redesigning your website: a checklist so nothing gets lost
- How to audit a WordPress website: a checklist for owners
- Why isn't my business showing up on Google Maps?
- Does ChatGPT recommend your business? How to check, and how to fix what it gets wrong
- Why isn't my website getting customers? A three-question diagnosis
- How to get more Google reviews without breaking Google's rules
- Google Search Console for a small business: set it up and read the three reports that matter
- Who owns your domain and website? How to check, and how to get them back
- How to show up in Google AI Overviews and AI Mode: what Google's own guide asks for
- What is a good PageSpeed score? What the number means for a small business site
- How much should a small business website cost, and what to check before you pay the final invoice
- Is my website down, or is it just me? What to check, in order
- Is my SEO company actually doing anything? How to check, and how to spot a scam email
- Should I redesign my website or just fix it?
- Does your website still need an FAQ page now that Google's FAQ rich results are gone?