If emails from your business address keep landing in your recipients' spam folders, the most common cause is missing or incorrect SPF and DKIM records. These are DNS entries that prove your emails are genuinely coming from your domain and haven't been tampered with in transit. Setting them up correctly usually takes a few minutes and can make a real difference to whether your messages get delivered.
What SPF and DKIM Actually Do
Mail providers like Gmail and Outlook use these records to decide whether to trust an incoming message:
- SPF (Sender Policy Framework): a DNS record listing which mail servers are allowed to send email on behalf of your domain. If a message arrives claiming to be from you but comes from a server not on that list, it looks suspicious.
- DKIM (DomainKeys Identified Mail): adds a digital signature to outgoing mail that receiving servers can verify against a public key published in your DNS. This confirms the message wasn't altered after it left your mail server.
Without either of these in place, your legitimate emails can look identical to spoofed ones, so spam filters err on the side of caution and bury them.
Setting Up SPF and DKIM
Most hosting control panels can generate the correct record values for you automatically, since the exact values depend on your mail server setup. You rarely need to write these records by hand.
In cPanel
- Log in to cPanel and, under the Email section, click Email Deliverability.
- Find your domain in the list. If it shows a status other than Valid, click Manage next to it.
- cPanel will show you the recommended SPF and DKIM records and compare them to what's currently published in your DNS. Click Install the Suggested DNS Records to add any that are missing.
- Wait a few minutes, then refresh the page. The status should update to Valid once the records are in place and detected.
In DirectAdmin
- Log in to DirectAdmin and open DNS Management for the domain you want to fix.
- DirectAdmin usually creates a default SPF TXT record and a DKIM record automatically when the domain is set up. Check the record list for an entry starting with v=spf1 and one under a name like default._domainkey.
- If either is missing, use the Add Record option, set the type to TXT, and enter the value provided by your mail server configuration (DirectAdmin's email pages will display the exact DKIM key to publish if one hasn't been generated yet).
- Save the changes.
DNS changes like these can take a few hours to propagate fully, so don't worry if a mail test tool doesn't show a pass immediately after saving. Give it some time before troubleshooting further.
Checking Your Setup Worked
Once the records are published, send a test email to a free mail account you control (a Gmail address works well) and check the message's original headers, or use an online mail tester that checks SPF and DKIM alignment. A pass on both confirms your setup is correct.
If you're not sure how DNS records work in general, see How to Add or Edit a DNS Record (A, CNAME, MX, TXT) for the basics before making manual changes.