How to Set Up DKIM and SPF Records in DirectAdmin

If your emails are landing in spam or junk folders, missing SPF and DKIM records are almost always the cause. This guide walks you through setting both up in DirectAdmin.

For a full explanation of what SPF, DKIM and DMARC do, see our article: Why Are My Emails Going to Spam? SPF, DKIM and DMARC Explained


Setting Up SPF in DirectAdmin

SPF tells receiving mail servers which servers are authorised to send email on behalf of your domain.

Step 1Log into DirectAdmin.

Step 2Under Domain Settings, click DNS Management.

Step 3 — Look for an existing TXT record containing v=spf1. If one already exists, edit it. If not, click Add Record.

Step 4 — Set the record type to TXT.

Step 5 — Set the Name field to @ (this represents your root domain).

Step 6 — Set the Value to:

 
 
v=spf1 a mx include:hostking.host ~all

Step 7 — Click Save.


Setting Up DKIM in DirectAdmin

DKIM adds a digital signature to your outgoing emails so receiving servers can verify they genuinely came from you.

Step 1 — In DirectAdmin, go to Email Manager.

Step 2Look for DKIM Keys or search for "DKIM" in the DirectAdmin search bar.

Step 3 — If DKIM is not already enabled, click Enable DKIM next to your domain. DirectAdmin will generate the key pair and automatically add the DKIM DNS record to your domain.

Step 4 — To verify it worked, go back to DNS Management and look for a TXT record with a name like default._domainkey — if it's there, DKIM is active.


Setting Up DMARC in DirectAdmin

DMARC tells receiving servers what to do if an email fails SPF or DKIM, and sends you reports so you can monitor your domain's email health.

Step 1 — In DirectAdmin, go to DNS Management.

Step 2 — Click Add Record.

Step 3 — Set the type to TXT.

Step 4 — Set the Name to _dmarc.

Step 5 — Set the Value to (replace the email with your own):

 
 
v=DMARC1; p=none; rua=mailto:you@yourdomain.com

Step 6 — Click Save.

The p=none setting means monitor only — no emails will be blocked. Once you've confirmed SPF and DKIM are working correctly (give it 1–2 weeks), you can change this to p=quarantine or p=reject for stronger protection.


How Long Until It Works?

DNS changes take between 15 minutes and 24 hours to propagate. After a few hours, test your email deliverability at mail-tester.com — send a test email to the address shown and you'll get a score out of 10 with specific feedback.


Common Problems

"Multiple SPF records found" warning
You can only have one SPF record per domain. If you already have one, edit the existing record rather than adding a new one — multiple SPF records cause failures.

DKIM option not visible in DirectAdmin
DKIM may need to be enabled at the server level first. Open a support ticket and our team will enable it.

Emails still going to spam after setting up SPF and DKIM
Other factors can affect deliverability — email content, blacklisted IP, or missing DMARC. Run a test at mail-tester.com for a detailed breakdown.


Need Help?

Our support team is available every day from 7am to 10pm via live chat at hostking.host or by opening a ticket at my.hostking.host.


 

Cette réponse était-elle pertinente? 0 Utilisateurs l'ont trouvée utile (0 Votes)