Test SPF DKIM DMARC with nslookup and dig in 2026
Verify your email authentication setup using nslookup -type=txt and dig TXT _dmarc. Catch misconfigurations before they hurt deliverability.
Why testing SPF, DKIM, and DMARC in 2026 still matters
You sent an email campaign. It didn’t land in inboxes. No bounce, no error—just silence. You check your sender reputation, your warm-up logs, your content. Everything looks fine. Then you realize: the authentication setup is flawed.
SPF, DKIM, and DMARC aren’t legacy tech. They’re the gatekeepers of inbox placement. A single misconfigured DNS record can be enough to flag your messages as suspicious—even if your content is clean. And while tools exist to scan your setup, nothing beats testing directly with command-line tools like nslookup and dig.
Testing SPF, DKIM, and DMARC with nslookup and dig gives you direct access to how receiving servers see your domain. It’s not about chasing perfect scores. It’s about knowing your configuration is correct before it breaks your deliverability.
Key takeaways
- SPF, DKIM, and DMARC remain critical for inbox placement in 2026, even with advanced filtering.
- Small DNS misconfigurations—like a missing quote in a TXT record or a typo in a selector—can trigger spam filters.
- Manual verification using nslookup and dig is the most reliable method to confirm your records are correctly published and readable by receiving servers.
How to test SPF DKIM DMARC with nslookup and dig
You can verify your SPF, DKIM, and DMARC records by querying your domain’s DNS using nslookup -type=txt and dig txt. Run dig txt yourdomain.com for SPF, dig txt _dmarc.yourdomain.com for DMARC, and dig txt selector._domainkey.yourdomain.com for DKIM. Check each for syntax errors, missing tags, or overly permissive policies. These tools are standard across email infrastructure, and their output reveals how well your domain is configured for authentication.
- Run
nslookup -type=txt yourdomain.comto retrieve your SPF record. This is the first line of defense against spoofing. A missing or malformed SPF record increases the risk of your emails being marked as spam. You're looking for a properly formattedv=spf1entry with valid mechanisms likeinclude:orip4:. - Use
dig txt _dmarc.yourdomain.comto fetch your DMARC policy. This record tells receiving servers how to handle emails that fail SPF or DKIM checks. The output should include ap=rejectorp=quarantinepolicy, notp=none, which allows all failures. A misconfigured policy undermines security. - Query your DKIM public key with
dig txt selector._domainkey.yourdomain.com. Replaceselectorwith the actual selector used in your DKIM setup. A valid key is essential for cryptographic verification. If the result is empty or contains malformed data, your DKIM signature will fail. - Inspect the output for common issues: multiple SPF records (invalid), malformed
include:directives, missing or duplicate tags (likeo=rfc8314for DMARC), or overly permissive policies. Use tools from RFC 7208 (SPF) and RFC 7483 (DMARC) as reference. Even a single syntax error can break authentication.
Why These Steps Matter for Deliverability
Email providers like Gmail, Microsoft, and Apple use SPF, DKIM, and DMARC to validate messages. If any record is incorrect or absent, your outbound emails risk landing in spam, or worse, being rejected entirely. Testing with dig and nslookup gives you real-time, raw access to what mail servers see — no guesswork.
Automate Verification and Prevent Human Error
While manual testing is valid, it's time-consuming at scale. You can automate SPF/DKIM/DMARC checks with tools like our API or validate entire sender lists with bulk verification. These help catch misconfigurations before they impact your sender reputation.
What each record actually does — and how to validate it properly
You can test SPF, DKIM, and DMARC using nslookup or dig to check DNS records directly. SPF authorizes specific mail servers to send emails from your domain. DKIM adds a digital signature to verify message integrity. DMARC defines how receivers handle emails that fail SPF or DKIM checks. Validating these records ensures your emails aren’t marked as spam and reach inboxes reliably. Tools like bulk verification can help spot issues across large lists.
SPF: Authorize sending servers
SPF (Sender Policy Framework) tells receivers which mail servers are allowed to send emails on your domain’s behalf. If a server isn’t in the list, the email may be rejected. You can check your SPF record using dig txt yourdomain.com or nslookup -type=txt yourdomain.com. The result will show the full SPF text record. Make sure the syntax is correct — invalid syntax causes SPF failures even if the list seems right.
DKIM: Verify message authenticity
DKIM signs outbound messages with a private key, and receivers validate this using a public key published in DNS. Use dig TXT selector._domainkey.yourdomain.com to retrieve the DKIM public key. The key must be correctly formatted — it should include a DKIM= tag. You can test if a specific email was signed properly by examining its headers in a tool like Mail-Tester or MXToolbox, both trusted industry resources.
DMARC: Control policy enforcement
DMARC (Domain-based Message Authentication Reporting & Conformance) tells receivers what to do when an email fails SPF or DKIM. It uses a DMARC record published in DNS — check it with dig txt _dmarc.yourdomain.com. The policy can be set to none (monitor only), quarantine (treat as suspicious), or reject (block outright). Most organizations use quarantine initially, then move to reject once authentication is stable. The RFC 7483 standard describes DMARC’s role in email security, and monitoring your DMARC reports helps track alignment and delivery issues.
Proper DNS setup is not optional. Misconfigured SPFs, missing DKIM, or weak DMARC policies all degrade deliverability. You can use inbox placement testing to simulate real-world delivery behavior and catch problems early. Regular checks with dig or nslookup are part of a solid, ongoing email health routine.
Common issues spotted when testing SPF DKIM DMARC
When testing SPF, DKIM, and DMARC with nslookup and dig, you’ll often hit roadblocks like multiple SPF records (only one allowed), mismatched DKIM selectors, DMARC set to p=none (no enforcement), or malformed TXT records. These issues break authentication and hurt deliverability. Let’s go over the most common ones, and how to fix them.
SPF and TXT Record Problems
- You’re using multiple SPF records in DNS — this is invalid. Only one SPF TXT record per domain is allowed. If you have more than one, merge them or remove all but one, using
include:statements for third-party services. - Your SPF record contains syntax errors: missing quotes around strings, incorrect tag order, or using deprecated mechanisms like
expwithout a valid domain. Use RFC 7208 as the standard guide for correct formatting. - SPF is failing because your IP address isn’t in the
ip4:orip6:list, or a requiredinclude:entry is misconfigured. Validate each include with a DNS query, not just a guess.
DKIM and DMARC Misconfigurations
- The DKIM selector in your DNS TXT record doesn’t match the one in the email header’s
h=dkim-signaturefield. Double-check this value — it’s case-sensitive and often buried in the raw header. Tools like MxToolbox can help extract it. - Your DMARC record is missing or set to
p=none. This means no enforcement — emails pass authentication but aren’t blocked or quarantined. Even if you’re monitoring, you’re not protecting yourself. - DMARC syntax errors: incorrect placement of tags (e.g.
rua=mailto:missing quotes), using unknown tags, or misused versions likev=DMARC1instead ofv=DMARC1. Always validate with a DMARC record checker.
These mistakes aren’t just technical — they directly impact inbox placement and sender reputation. Even if your email sends, it may land in spam folders if authentication fails.
“A single malformed SP or DMARC record can cause entire outbound email streams to be flagged or rejected by major providers.”
If you’re managing a large list, verifying SPF/DKIM/DMARC across domains can be tedious. Emaillistchecker.io’s bulk verification tool checks these records at scale, along with email validity and deliverability risks: verify your entire list in minutes.
What the command-line output should look like
When you test SPF, DKIM, and DMARC using nslookup or dig, you’ll see TXT records return specific values. SPF should show a policy like v=spf1 include:spf.protection.outlook.com -all; DKIM will return a public key starting with v=DKIM1; k=rsa; p=...; DMARC will display v=DMARC1; p=quarantine; rua=mailto:[email protected]. These patterns confirm your domain’s authentication setup is correctly published.
SPF: The sender policy framework
SPF tells receiving servers which mail servers are authorized to send on your domain’s behalf. A valid SPF record typically starts with v=spf1, followed by mechanisms like include: to reference third-party providers (e.g., include:spf.protection.outlook.com). It ends with a qualifier like -all (hard fail) or ~all (soft fail). You can verify this via dig TXT yourdomain.com or nslookup -type=TXT yourdomain.com. If you don’t see a valid SPF, emails from your domain may be marked as suspicious.
DKIM: The cryptographic signature
DKIM signs outgoing messages with a private key. The public key lives in DNS as a TXT record. Look for a record starting with v=DKIM1; and a long p= value that begins with MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA.... This key is used by receivers to validate the digital signature. If the key is missing, malformed, or expired, messages may fail checks. Always ensure the selector (the part before .domain.com) matches the one used in your email provider’s setup. For example, default._domainkey.yourdomain.com should return the correct key.
DMARC: The enforcement policy
DMARC governs what happens to emails that fail SPF or DKIM. A correct record starts with v=DMARC1;, sets the policy (p=none, p=quarantine, or p=reject), and includes a reporting address like rua=mailto:[email protected]. This allows you to receive feedback about authentication results. Use dig TXT _dmarc.yourdomain.com to check it directly. Without a DMARC record, your domain remains vulnerable to spoofing and deliverability drops.
Understanding these records helps you diagnose deliverability issues. Misconfigurations are common—especially with multiple includes or overly strict policies. Tools like bulk verification can help catch invalid or poorly structured domains before they hurt your sender reputation. The Internet Society’s RFC 7072 offers the technical foundation for these standards.
The limitations of command-line testing
Running nslookup or dig only confirms DNS records are published correctly — not whether your email actually lands in inboxes. These tools do not test sender reputation, content filtering, blacklists, or server-side delivery logic. You can pass DNS checks and still have emails blocked, marked spam, or delayed.
What DNS tools can’t tell you
- Whether your sending IP has a poor reputation — even with perfect SPF/DKIM/DMAARC setup, spam filters can block you based on historical behavior.
- If your message content triggers spam scoring — subject lines, links, or formatting can harm inbox placement regardless of DNS records.
- Whether a domain is on a blacklist — tools like Spamhaus or MXToolbox must be checked separately.
- If your sending server is misconfigured — for example, a non-compliant HELO/EHLO handshake or incorrect TLS setup — this won’t show up in
digoutput. - Whether an email address is a catch-all or role-based —
nslookupwon’t reveal invalid or non-receiving addresses that appear valid in DNS.
Real-world delivery requires real-world testing
Command-line tools are like checking if a car’s engine starts — helpful, but they don’t tell you if the engine’s running smoothly, if the road is clear, or if the driver follows traffic rules. You need actual message delivery tests to measure inbox placement, spam scores, and bounce behavior.
For example, an email can pass SPF/DKIM but still be marked spam due to high complaint rates or poor historical sending patterns. The RFC 7258 (SPF) and RFC 6376 (DKIM) standards only define technical validation — not content quality, sender trust, or delivery success.
Using a service like inbox placement testing gives you real data from Gmail, Outlook, Yahoo, and others — showing what actually happens to your emails in production. It checks for blacklisting, spam score thresholds, and inbox placement rates, which command-line tools simply cannot do.
For ongoing sender hygiene, combine DNS checks with real email validation. Use tools like bulk verification to filter out invalid, role-based, and disposable emails before sending. This reduces bounces and protects reputation. You can’t fix delivery issues that exist only in the real world with tools that only see DNS.
How Emaillistchecker.io helps beyond command-line testing
You can verify SPF, DKIM, and DMARC records with nslookup or dig, but that only checks DNS configuration—no delivery guarantee. Emaillistchecker.io goes beyond syntax by testing actual inbox placement across Gmail, Outlook, and Apple Mail in real time, checking sender reputation, blocklist status, and deliverability risk before you send. It catches issues those command-line tools miss: invalid or disposable emails, spam traps, and high bounce risk—all while using a 98.9% accurate verification engine.
Real inbox placement tests, not just DNS checks
Running dig on your TXT records tells you nothing about whether your email lands in the inbox—or the spam folder. Emaillistchecker.io sends test emails to major providers and reports back exactly where they land. This simulates real-world delivery, revealing how your domain appears to recipients and filters. It’s not about configuration theory; it’s about what actually happens when your message reaches the user.
Prevent delivery failure with smart pre-send hygiene
Even a perfect SPF setup won’t save your campaign if the email address is invalid, disposable, or associated with a compromised IP. Emaillistchecker.io uses real-time verification to eliminate those risks before they impact your sender reputation. It checks for role accounts (like admin@ or sales@), catch-all domains, and known disposable domains—all common red flags that hurt deliverability. This isn’t just about syntax; it’s about real inbox placement.
Once you’ve verified the addresses, your list is cleaner. You can then use Emaillistchecker.io’s automated integrations with Mailchimp, HubSpot, Klaviyo, and SendGrid to keep your subscriber lists healthy on a recurring basis. No need to re-verify manually—your workflows stay active, and your deliverability stays high.
A well-configured email infrastructure is step one. But the true measure of success is whether your message arrives—trusted, seen, and opened. For that, you need more than dig. You need a tested, real-world delivery signal. Emaillistchecker.io delivers that. You can try 100 verifications for free to see how it performs at scale.
SPF vs DKIM vs DMARC: Their distinct roles and shared risks
You test SPF, DKIM, and DMARC with nslookup and dig because each plays a different role in email authentication: SPF checks if the sending IP is authorized, DKIM verifies the message wasn’t altered, and DMARC enforces policy based on both. A failure in any one can lead to hard bounces, spam filtering, or outright rejection. Running these checks manually helps you confirm your setup is sound before sending.
SPF: The Sender’s Permission Slip
SPF (Sender Policy Framework) is a DNS record that lists which IP addresses are allowed to send email on behalf of your domain. If an email arrives from a server not in that list, the receiving system marks it as unauthorized. This often results in hard bounces or spam placement.
Use nslookup or dig to query the MX or TXT record for your domain, then check if the sending IP appears in the include or ip4 entries. A misconfigured SPF can cause legitimate email to fail — especially common when using third-party services like marketing platforms.
DKIM: Message Integrity at the Core
DKIM (DomainKeys Identified Mail) adds a digital signature to each outgoing email, proving the message hasn’t been tampered with during transit. If the signature doesn’t match the public key in DNS, the email fails authentication.
With dig, you can fetch the DKIM DNS record (typically a TXT entry under a subdomain like default._domainkey.yourdomain.com). The signature is generated based on headers and body content — so even a minor change breaks it. This makes DKIM critical for protecting against malicious alterations.
DMARC: The Enforcement Layer
DMARC (Domain-based Message Authentication, Reporting & Conformance) tells receivers what to do if SPF or DKIM fails. It relies on both SPF and DKIM working correctly, then applies a policy — such as quarantining or rejecting the message.
DMARC also enables feedback reporting. You get data on who sends email for your domain, and whether it passes authentication. If you’ve set ADSP=reject or use p=reject, failing messages are blocked outright. Without proper DMARC alignment, even valid SPF/DKIM setups may still be flagged.
Collectively, SPF, DKIM, and DMARC form the foundation of email trust. Their failure—whether due to misconfiguration, stale records, or lack of monitoring—can severely impact deliverability. Tools like bulk email verification identify list-related risks before they hit your mailbox, while also checking for these authentication records at scale, not just during setup.
For deeper visibility into how your domain performs across real inbox environments, inbox placement testing simulates delivery to Gmail, Outlook, and other major providers. It confirms not just if your authentication works, but if your email lands in the inbox. This is the gold standard for validating a fully functional email stack.
Understanding the individual roles of SPF, DKIM, and DMARC isn’t just technical curiosity — it’s operational necessity. You can check these records manually using dig and nslookup, but real-world validation requires testing under actual recipient conditions. The Internet Society’s documentation on email authentication provides a clear standard: DMARC RFC 7483.
Real-world consequences of untested email authentication
You might think your emails are safely delivered, but untested SPF, DKIM, and DMARC configurations silently increase delivery failures, trigger spam traps, damage domain reputation, and land messages in spam folders—even with clean content. Without verification, you’re sending blind. Test your setup with nslookup and dig to avoid these issues before they impact your outreach.
Common failures that go undetected
- SPF records with incorrect or missing mechanisms fail silently—emails get rejected without clear error codes.
- DKIM signatures with mismatched keys or invalid algorithms break during delivery, triggering rejection by receiving servers.
- DMARC policies that are not properly published or enforced allow spoofing, leading to unauthorized senders harming your domain reputation.
- Missing or misconfigured DNS records mean your domain isn’t verified—some providers treat this as a red flag, even if your content is valid.
How untested configurations hurt your deliverability
Even if your email content is clean, poor authentication causes filtering. The receiving server evaluates the message's integrity before reading the body. If SPF or DKIM fails, the email is often marked low trust—even if you’re a legitimate sender.
- Spam traps are commonly triggered by misconfigured DKIM or SPF, especially if a sender uses a third-party tool with outdated signing keys.
- Repeated delivery failures from misconfigured domains signal poor sending practices, which can result in your IP or domain being added to blocklists.
- Domain reputation damage from unauthorized senders can take months to recover, especially if those senders are associated with spammy behavior.
- Some ISPs now use domain reputation as a primary filter—your email might fail inbox placement even without spam content if your authentication is weak.
The root cause is often a lack of validation. Tools like EmailListChecker’s bulk verification integrate DNS validation to catch faulty SPF, DKIM, and DMARC setups before they cause problems. Use dig or nslookup manually, but automate checks—especially across large lists.
According to RFC 7208, SPF validation is a standard check. Yet real-world implementation often falls short—especially when records are not tested across different domains and email flows. Similarly, RFC 6376 defines DKIM, but signature mismatches remain common.
Let’s be clear: a single misconfigured DMARC policy can expose your domain to abuse. Without regular checks, you’re flying blind. Test early. Test often. Fix before you’re blocked.
Final checklist: Before sending, verify your email authentication
You must confirm SPF, DKIM, and DMARC records are correctly published in DNS and functioning as intended. Use dig txt _dmarc.yourdomain.com to check your DMARC policy, and nslookup -type=txt yourdomain.com to verify SPF and DKIM. Ensure all TXT records are properly quoted and formatted. Test delivery with a real email from your domain to a major inbox, and validate inbox placement across Gmail, Outlook, and Apple Mail using a dedicated tool.
Verify your DNS records step by step
- Run
dig txt _dmarc.yourdomain.comto fetch your DMARC policy. It should return a record likev=DMARC1; p=quarantine;. If missing or malformed, your domain lacks DMARC enforcement. - Use
nslookup -type=txt yourdomain.comto retrieve all TXT records. Look for SPF and DKIM specifically — SPF will start withv=spf1, DKIM usually appears under a selector likeselector._domainkey.yourdomain.com. - Ensure every TXT record is properly enclosed in quotes. Some DNS providers strip quotes or misformat, leading to invalid parsing. Use RFC 7208 as reference for correct SPF syntax.
- Double-check DNS propagation. Records may take up to 48 hours to propagate globally. Verify with tools like MXToolbox or DNSChecker to confirm consistency across locations.
Test real-world delivery and inbox placement
- Send a test email from your verified domain to a known personal inbox (e.g., Gmail, Outlook, Apple Mail). Check the inbox, spam folder, and headers for authentication results.
- Check the email’s raw source. Look for
Received-SPF,DKIM-Signature, andAuthentication-Resultslines to confirm successful validation. A missing or pass result indicates misconfiguration. - Use Emaillistchecker.io’s inbox placement testing to run a full assessment across all major providers. It shows real inbox placement rates, spam filter scores, and recipient-side verification data.
- Before sending bulk messages, verify your full list using bulk verification. This catches invalid addresses, role accounts, and disposable domains that degrade sender reputation.
Your sender reputation depends on consistent email authentication — not just having records, but having them correct.
Automate checks with the verification API for integration into your workflow. It supports real-time validation during list collection or campaign prep.
You’re not done after DNS — deliverability depends on more than authentication
Passing SPF, DKIM, and DMARC checks via nslookup or dig is necessary but not sufficient. Even with perfect DNS alignment, your emails can still land in spam folders or get rejected due to poor sender reputation, low engagement, or high bounce rates.
Deliverability is a continuous process
- Consistent sending patterns and gradual domain warming help build trust with email providers.
- Monitor feedback loops and unsubscribe rates regularly—these signals directly affect your sender score.
- High spam complaints or low open rates trigger red flags, regardless of authentication status.
Authentication confirms identity. Inbox placement confirms relevance. You need both to succeed.
Sources
- By early 2026, 937,931 of 1.8 million analyzed domains had valid DMARC records — up 79% in three years — but about 56% of them still sit at monitoring-only p=none. — DMARC Report (EasyDMARC 2026 data) (2026)
- DMARC adoption among the world's top 1.8 million domains jumped from 27.2% in 2023 to 47.7% in 2025 — a 75% surge driven by Google and Yahoo's sender rules. — EasyDMARC DMARC Adoption Report 2025 (2025)
Keep reading
- Email authentication: SPF, DKIM, DMARC and BIMI (complete guide)
- DMARC Record Syntax Tags Explained in 2026
- DMARC SP Tag Subdomain Policy: What It Means in 2026
- Delegate Subdomain DNS to ESP for Email Authentication
- Validate MX Records and SPF for Email Deliverability via CLI
Ready to put this into practice? Emaillistchecker.io verifies emails with 98.9% accuracy — start with 100 free verifications.
Frequently asked questions
Can I test SPF DKIM DMARC with nslookup only?
Yes, nslookup -type=txt can retrieve DNS TXT records, but it doesn’t always show full output or format it clearly. Use dig for better reliability.
What does dig TXT _dmarc return?
It returns your DMARC policy record, including the version, enforcement actions, and report email addresses.
Why is my DKIM record not showing with dig txt selector._domainkey?
Check the selector name in your email headers and ensure it matches the TXT record name exactly, including case sensitivity.
Do I need to test SPF DKIM DMARC for every sending domain?
Yes. Each domain must have its own valid, correctly formatted records. Shared or reused records can cause delivery failures.
Can I trust command-line results alone?
No. Command-line tools verify DNS, but not delivery, reputation, spam filters, or inbox placement. Combine with real testing.
What happens if my DMARC record is set to p=none?
No enforcement — messages failing authentication will still be delivered. This leaves your domain exposed to impersonation.
How often should I retest SPF DKIM DMARC?
After any DNS change, domain migration, or new email service setup. Quarterly checks help maintain reliability.
Can Emaillistchecker.io test email authentication?
Yes. It includes inbox-placement testing across top providers and evaluates authentication setup, sender reputation, and delivery risk.
Why do I still get blocked after correct SPF DKIM DMARC?
Other factors like poor engagement, content, sending volume, or blacklisting can override authentication success.
How do I fix multiple SPF records?
Combine all authorized IPs and includes into a single SPF record. Use SPF alignment and avoid nesting.
What's the risk of using a catch-all email address?
It can trigger spam traps and harm sender reputation. Use email verification tools to filter out such addresses.
Do disposable domains affect SPF DKIM DMARC?
They don’t directly affect DNS records, but sending to them increases bounce rates and hurts sender reputation. Filter them out.