How to set up SPF, DKIM and DMARC for a .co.ke domain
If emails from your Kenyan business land in spam, missing or broken SPF, DKIM and DMARC records are the usual reason. This guide explains the three records in plain English and shows where to add them for a .co.ke, .ac.ke, .or.ke or .com domain.
The three records in one minute
| Record | Lives at | What it says |
|---|---|---|
| SPF | TXT on the domain itself | Which servers may send mail using this domain in the return address. |
| DKIM | TXT or CNAME at selector._domainkey | A public key. Each email carries a signature made with the matching private key; receivers check it. |
| DMARC | TXT at _dmarc | Your policy: what receivers should do with mail that fails SPF and DKIM alignment, and where to send reports. |
Gmail, Outlook and Yahoo now expect anyone sending real volume to have SPF or DKIM and a DMARC record. Without them, even honest receipts can be filtered.
Step 1: find where your DNS is managed
For a .co.ke domain this is usually one of: the cPanel of your web host (Zone Editor), Cloudflare (if your name servers point there), or your registrar's DNS panel. Look up your name servers with a WHOIS tool or nslookup -type=ns yourdomain.co.ke; that tells you where to add records.
Step 2: SPF, one record only
A domain must have one SPF record. If you use a mailbox host (your web host's email, or an office suite), it will already have given you an SPF line such as v=spf1 include:… ~all. Keep it. If you need to allow another service, add its include: to the same record instead of creating a second one; two SPF records make both invalid.
JMSURF Mail does not need a change to your SPF record. Its emails pass DMARC through a DKIM signature on your own domain, so your existing SPF for normal mailboxes stays untouched.
Step 3: DKIM
DKIM records come from the service that sends your email. In JMSURF Mail, add your domain under Domains and you get two DKIM records (CNAME) plus an ownership TXT, with full host names already worked out for your domain. In cPanel's Zone Editor choose Add Record, pick the type shown, paste the name and value exactly. In Cloudflare choose DNS → Add record and, for CNAMEs, set the proxy to DNS only (grey cloud); proxied CNAMEs break DKIM.
Step 4: DMARC
If your domain has no DMARC record, start with monitoring only:
v=DMARC1; p=none; rua=mailto:[email protected]p=none changes nothing for delivery but tells receivers you are watching. After a few weeks of clean reports, move to p=quarantine and later p=reject to stop others from faking your domain. JMSURF Mail shows a DMARC record to add when your domain has none.
Step 5: check
- In JMSURF Mail, each record shows Found when it is live. We check every 10 minutes and text you when the domain is verified.
- From a terminal:
nslookup -type=txt _dmarc.yourdomain.co.keandnslookup -type=txt yourdomain.co.ke. - Send a test email to a Gmail address, open it, choose Show original and look for
SPF: PASS,DKIM: PASSandDMARC: PASS.
Common mistakes on Kenyan domains
- Two SPF records after adding a new service. Merge them into one.
- The domain repeated in the host name, for example
_dmarc.yourdomain.co.ke.yourdomain.co.ke. Some panels add the domain for you; enter only_dmarcthere. - Cloudflare proxy on DKIM CNAMEs. Set them to DNS only.
- Records on the wrong level: for a subdomain like
notify.yourdomain.co.kethe DKIM names includenotify. JMSURF Mail shows them in full to avoid this. - Waiting on the wrong DNS: if the name servers point to Cloudflare, records added in cPanel do nothing.
Once the records are in, emails from your domain carry proof of who sent them. Read more in domain verification or start free and add your domain.
Questions
- Do I need SPF if I have DKIM?
- DMARC passes if either SPF or DKIM passes and lines up with your domain. Keep a correct SPF for your normal mailboxes and use DKIM for services like JMSURF Mail.
- How long do DNS changes take in Kenya?
- Usually minutes, sometimes a few hours, depending on your DNS host and the record's TTL.
- Does this work for .ac.ke, .or.ke, .go.ke and .sc.ke?
- Yes. The records are the same for any domain; only the panel you add them in differs.
Send your first email today
Free plan with 100 emails a month, no card needed. Questions? WhatsApp or call +254 712 504 593, or email [email protected].