Why Are My Emails Going to Spam? SPF, DKIM and DMARC Explained

If your emails are landing in recipients' spam or junk folders, the most common cause is missing or incorrect SPF, DKIM and DMARC records on your domain. This guide explains what each one does and how to set them up in DirectAdmin.


Why This Happens

Email providers like Gmail, Outlook and Yahoo use SPF, DKIM and DMARC to verify that an email actually came from the domain it claims to be from. If these records are missing or incorrect, your emails look suspicious — and spam filters act accordingly.

This is one of the most common email problems for business owners and is entirely fixable.


What Each Record Does

SPF (Sender Policy Framework)
Tells the world which mail servers are authorised to send email on behalf of your domain. Without it, anyone could send email pretending to be from your domain.

DKIM (DomainKeys Identified Mail)
Adds a digital signature to every email you send. The recipient's mail server checks this signature to confirm the email hasn't been tampered with in transit.

DMARC (Domain-based Message Authentication)
Tells receiving servers what to do if an email fails SPF or DKIM checks — reject it, quarantine it (spam folder) or do nothing. It also sends you reports so you can see if anyone is spoofing your domain.


Step 1: Check Your Current Records

Before making any changes, check what records you already have. Use mxtoolbox.com:

  • For SPF: Go to MXToolbox, select SPF Lookup and enter your domain
  • For DKIM: Select DKIM Lookup, enter default._domainkey.yourdomain.com
  • For DMARC: Select DMARC Lookup and enter your domain

If any return "Not found" or errors, follow the steps below.


Step 2: Set Up SPF in DirectAdmin

  1. Log into DirectAdmin
  2. Click DNS Management
  3. Look for an existing TXT record containing v=spf1 — if one exists, edit it rather than adding a new one
  4. If none exists, click Add Record
  5. Set the type to TXT
  6. Set the name to @ (which represents your root domain)
  7. Enter the following value:
 
 
v=spf1 a mx include:hostking.host ~all
  1. Click Save

This record tells mail servers that Hostking's servers are authorised to send email for your domain.


Step 3: Set Up DKIM in DirectAdmin

DirectAdmin can generate DKIM keys automatically.

  1. Log into DirectAdmin
  2. Go to Email Manager → DKIM Keys (or search for DKIM in DirectAdmin)
  3. If DKIM is not already enabled for your domain, click Enable DKIM
  4. DirectAdmin will generate a public/private key pair and automatically add the DKIM DNS record to your domain

To verify it worked, go back to MXToolbox and do a DKIM lookup for default._domainkey.yourdomain.com.


Step 4: Set Up DMARC in DirectAdmin

  1. In DirectAdmin, go to DNS Management
  2. Click Add Record
  3. Set the type to TXT
  4. Set the name to _dmarc
  5. Enter the following value (replace you@yourdomain.com with your email):
 
 
v=DMARC1; p=none; rua=mailto:you@yourdomain.com
  1. Click Save

This is a "monitor only" DMARC policy — it won't block any emails yet, but will send you reports so you can see if your SPF and DKIM are working correctly. Once you've confirmed everything is working (give it a week or two), you can change p=none to p=quarantine or p=reject for stronger protection.


How Long Does It Take to Work?

DNS changes can take up to 24 hours to propagate globally, though most changes take effect within 30–60 minutes. After making changes, wait a few hours before testing again.


Testing Your Setup

After 1–2 hours, send a test email to a Gmail account and check whether it lands in the inbox. You can also use mail-tester.com — it gives your email a score out of 10 and tells you exactly what's missing or misconfigured.


Common Problems

"SPF record already exists" error in DirectAdmin
You can only have one SPF record per domain. If one already exists, edit it rather than adding a new one. Multiple SPF records will cause failures.

DKIM option not visible in DirectAdmin
Contact our support team — DKIM may need to be enabled at the server level first.

Emails still going to spam after setting up SPF and DKIM
Other factors can also affect deliverability — the content of your emails, whether your IP is on a blacklist, or whether you're sending bulk email. Use mail-tester.com to get a detailed breakdown. If your IP is blacklisted, open a support ticket and we'll investigate.


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.

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)