DEV Community

Leadcanal
Leadcanal

Posted on

How to Check SPF, DKIM and DMARC Before Sending Email

If your emails are landing in spam, the problem may not be your code or your copy.

It may be your DNS and email authentication setup.

Before sending transactional, marketing, or cold email, check these three records first:

  1. Check SPF

SPF tells receiving servers which systems are allowed to send email for your domain.

You can check it from the terminal:

dig TXT example.com

Look for a record beginning with:

v=spf1

Make sure all legitimate sending services are included and avoid publishing multiple SPF records.

  1. Check DKIM

DKIM verifies outgoing email using a cryptographic signature.

The public key is normally published under a selector such as:

dig TXT selector1._domainkey.example.com

If DKIM is missing, using the wrong selector, or publishing an invalid key, authentication may fail.

  1. Check DMARC

DMARC connects SPF and DKIM with the visible From domain and defines how authentication failures should be handled.

Check it with:

dig TXT _dmarc.example.com

A DMARC record may include policies such as:

p=none
p=quarantine
p=reject
Common Problems to Look For

Some of the most common issues are duplicate SPF records, missing DKIM selectors, invalid DMARC syntax, old sending services still listed in DNS, and SPF exceeding its DNS lookup limit. Recent DEV.to technical guides focus heavily on these same troubleshooting areas.

Check Everything in One Place

If you don't want to inspect every DNS record manually, you can use the LeadCanal Domain Scanner to review SPF, DKIM, DMARC and other email-authentication records from one place. LeadCanal currently provides a Domain Scanner alongside dedicated SPF, DKIM and DMARC tools.

Why This Matters

Correct authentication does not guarantee inbox placement, but it gives your domain the technical foundation required for reliable email delivery.

LeadCanal's Email Deliverability Guide 2026 also covers sender reputation, spam rates, authentication and other factors that affect inbox placement.

Final Takeaway

If your emails are failing or landing in spam, check the infrastructure before rewriting the message.

Start with:

SPF → DKIM → DMARC → sender reputation → list quality

A few DNS checks can reveal problems that are otherwise difficult to spot.

Top comments (0)