Blog

How to Check DMARC, SPF, and DKIM from the Terminal

Quick checks from macOS/Linux — no dashboard, no cache confusion if you query authoritative NS.

dig TXT _dmarc.example.com +short
dig TXT example.com +short | grep spf
dig TXT google._domainkey.example.com +short

For recursive-only checks, specify @1.1.1.1 or @8.8.8.8.

FAQ

Which record for DMARC?

TXT at _dmarc.domain — dig TXT _dmarc.example.com +short

SPF?

TXT at apex or sending domain — often dig TXT example.com +short | grep spf

DKIM without knowing selector?

You must know selector — or use DNS Preflight’s probe — dig TXT selector._domainkey.example.com

Why two answers?

Split TXT strings — DNS concatenates; both are normal.

Faster than dig?

DNS Preflight does it in the browser — <a href="https://domainpreflight.dev/">open tool</a>.