StarDomain
Tutorials & Guides

Stop Emails Going to Spam: SPF, DKIM, and DMARC Explained

Complete guide to SPF, DKIM, and DMARC email authentication. Stop your emails from going to spam folders.

E
Editorial Team
March 11, 2026
6 min read448 views

Why Do Emails Go to Spam?

You've set up your professional email ([email protected]), but your emails keep landing in spam. The problem is almost always missing or incorrect email authentication records.

The Three Pillars of Email Authentication

SPF (Sender Policy Framework)

SPF tells receiving servers which IP addresses are authorized to send email for your domain.

dns
TXT record:
v=spf1 include:_spf.yourhostprovider.com ~all

What it does: When Gmail receives an email from yourdomain.com, it checks: "Is this server's IP listed in the SPF record?" If not, it's suspicious.

DKIM (DomainKeys Identified Mail)

DKIM adds a cryptographic signature to every email you send. The receiving server verifies this signature against a public key in your DNS.

dns
TXT record (selector._domainkey.yourdomain.com):
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4...

What it does: Proves the email wasn't modified in transit and really came from your domain.

DMARC (Domain-based Message Authentication)

DMARC tells receiving servers what to do when SPF and DKIM checks fail.

dns
TXT record (_dmarc.yourdomain.com):
v=DMARC1; p=quarantine; rua=mailto:[email protected]

Policies:

  • p=none — Monitor only (start here)
  • p=quarantine — Send to spam
  • p=reject — Block entirely

Setting Up on Domain India Hosting

If you use our hosting, SPF and DKIM are automatically configured. Check your DNS records:

  1. Log in to Client Area → My Domains → DNS Management
  2. Verify you have a TXT record starting with v=spf1
  3. Verify you have a DKIM TXT record
  4. Add a DMARC record if missing

Testing Your Setup

Send a test email to mail-tester.com and check your score. Aim for 10/10.

Also check:

  • mxtoolbox.com/spf
  • mxtoolbox.com/dkim
  • mxtoolbox.com/dmarc

Common Issues

Multiple SPF Records

You can only have ONE SPF TXT record per domain. If you use multiple email services, combine them:

v=spf1 include:_spf.google.com include:_spf.yourhost.com ~all

DKIM Key Too Long

Some DNS providers limit TXT record length. Split the key into multiple strings or use a shorter key (1024-bit).

Conclusion

SPF + DKIM + DMARC = emails in inbox, not spam. Set up all three, test with mail-tester.com, and your email deliverability will improve dramatically.

Share this article
E
Written by

Editorial Team

Our editorial team shares expert knowledge and practical insights to help you succeed online with hosting, domains, and web technology.