Support article
How to Configure DKIM on Your Domain (DKIM)
Configure DKIM on your domain to sign your emails and prevent spam: what it is, how to enable it in cPanel and add the DNS record.
Introduction
DKIM (DomainKeys Identified Mail) is a technology that signs your emails with a cryptographic key, so the recipient can verify the email really comes from you and hasn’t been modified in transit. It’s one of three deliverability keys (along with SPF and DMARC).
In this article you’ll see what DKIM is and how to configure it.
What DKIM is
DKIM adds a digital signature to each email you send. The recipient (Gmail, Outlook) checks that signature with a public key that’s in your DNS. If the signature matches, the email is legitimate; if not, it’s suspicious.
How it works
- Your server generates a key pair: a private one (which it keeps) and a public one (which it publishes in DNS).
- When you send an email, the server signs it with the private key.
- The recipient reads the signature and looks for the public key in your DNS.
- If they match, the email is authentic.
DKIM not only prevents spam: it also prevents someone from modifying email content in transit.
How to enable DKIM in cPanel
- Log in to cPanel.
- Find Email → Authentication or Email Deliverability.
- In the DKIM section, click Enable.
cPanel generates the key pair and shows you the DNS record you must add (if it doesn’t add it automatically).
At miHosting, if your domain uses miHosting’s DNS, cPanel adds the DKIM record automatically. If you use external DNS, you’ll have to copy the record and add it yourself.
The DKIM record in DNS
The DKIM record is of type TXT and has a name like:
default._domainkey.yourdomain.com
And a value like:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD...
The p= key is the public key. It’s long and generated by the server.
Don’t delete or modify the DKIM record value. If you change it, the signature stops working.
How to check DKIM works
- Send an email to a Gmail address.
- Open the email in Gmail.
- Click the three dots → Show original.
- Look for the
Authentication-results:line. - It should say
dkim=pass.
If it says
dkim=failor doesn’t appear, DKIM isn’t properly configured.
SPF + DKIM: why you need both
SPF lists authorized servers. DKIM signs the content. They’re complementary:
- SPF verifies the server that sends.
- DKIM verifies the email content.
Gmail and Outlook recommend having both. Without one of the two, your deliverability suffers.
Useful tips
- Don’t delete the DKIM record. If you delete it, emails stop being signed.
- If you switch hosting, regenerate DKIM. Keys change with the server.
- Check DKIM after configuring it. Send an email to Gmail and review the original.
- DKIM doesn’t replace SPF. Configure both.
- Add DMARC afterwards. DMARC unites SPF and DKIM in a joint policy.
Frequently asked questions
Is DKIM mandatory?
Not by law, but Gmail and Outlook practically require it for good deliverability.
Does DKIM cost money?
No, it’s free. Your email server generates it.
Can I have several DKIMs?
Yes, with different selectors. But for most cases, one is enough.
Does DKIM work with Mailchimp or SendGrid?
Each service has its own DKIM. You must configure your hosting’s and each external service’s.
Does my miHosting hosting have DKIM?
Yes, it can be enabled from cPanel. If you don’t have it, open a ticket.
DKIM: sign your emails and gain trust
DKIM is the second piece of email authentication. Together with SPF, it makes Gmail and Outlook trust your emails. Configuring it is free and takes a few minutes.
If you need help configuring DKIM on your miHosting domain, open a ticket from your client panel.