How to Use DNS TXT Query to Detect Missing or Broken DKIM Records
Learn how to use DNS TXT queries to find missing or broken DKIM records. Ensure email deliverability and sender reputation with precise, actionable steps.
Why DKIM Records Matter for Email Deliverability
You sent an email. It didn’t land. No bounce, no error — just silence. Your open rates crater, your customers don’t reply, and your sender reputation is quietly degrading. One reason might be something invisible: a missing or broken DKIM record.
DKIM isn’t a flashy tool. It’s a background check for every email you send. It signs your messages cryptographically, proving they came from you — not a scammer. When you skip it, or get it wrong, email providers assume the worst. And they act on that assumption.
You don’t need to master DNS to use a TXT query to detect missing or broken DKIM records. But knowing how to do it gives you direct control over deliverability — and stops small mistakes from killing your outreach.
Key takeaways
- A missing or broken DKIM record leads to failed authentication and reduced inbox placement.
- Email providers like Gmail and Outlook treat unauthenticated emails as high-risk, even if they’re legitimate.
- Using a DNS TXT query to detect DKIM issues is a fast, reliable way to verify your domain’s email security configuration.
What Happens When a DKIM Record Is Missing or Broken
If a DKIM record is missing or broken, incoming mail servers cannot cryptographically verify the authenticity of your messages. This means they may treat your emails as suspicious, reject them outright, or flag them as spam. Over time, repeated failures can harm your sender reputation — especially if you send at scale — leading to reduced inbox placement or outright blocking.
How Missing DKIM Affects Message Trust
DKIM uses public-key cryptography to prove that an email wasn’t altered in transit. Without a valid DKIM record on your domain’s DNS, mail servers can’t confirm the message came from your domain or that it remained unmodified. This lack of verification increases the risk of spoofing and makes your emails more likely to be rejected by receivers that enforce strict policies.
Many modern mail providers, including Google and Microsoft, use DKIM validation as part of their spam and phishing filters. A missing or broken record alone doesn’t trigger rejection immediately, but it reduces trust. In high-volume sending environments, even a few failed verifications accumulate into red flags — especially if consistent with poor sender reputation or other authentication issues.
The Long-Term Consequences for Your Sender Reputation
When DMARC policies are enforced (which many domains now set), messages without valid DKIM signatures are rejected or quarantined. If your domain uses DMARC with a policy of reject or quarantine, a single broken DKIM record can cause delivery failures across all messages from that domain.
Repeated delivery failures due to missing or malformed DKIM records contribute to long-term reputation damage. Reputation is cumulative — a single failure may be overlooked, but repeated ones are tracked by major providers like Return Path and Oracle (formerly IronPort). A degraded reputation reduces inbox placement, increases time-to-delivery, and may eventually lead to inclusion on blocklists.
Let’s say you send 50,000 emails a day. Even a 1% failure rate due to missing DKIM can mean 500 daily rejections. Over weeks, this accumulates in feedback loops, hurting your standing with receivers. Maintaining proper DKIM configuration isn’t optional if you send regularly or at scale.
That’s why checking for missing or broken DKIM records — using a real-time email checker or DNS TXT query — is essential. You can spot issues early. Tools like MailTester’s bulk verification or API integration help you catch these problems before they impact deliverability.
How to Use a DNS TXT Query to Detect DKIM Issues
You can detect missing or broken DKIM records by querying your domain’s TXT records using a DNS tool like dig or nslookup. Run dig TXT selector._domainkey.example.com, replacing selector and example.com with your actual DKIM selector and domain. If the response lacks a v=DKIM1; tag or contains malformed syntax, your DKIM setup is incomplete or broken. This step confirms whether your domain properly signs emails, a core requirement for high deliverability.
- Open your terminal or a DNS lookup tool like
dig,host, ornslookup. These tools are widely available across Linux, macOS, and Windows systems. They provide direct access to DNS records, which is critical for verifying email authentication. - Run the DNS TXT query with your DKIM selector and domain. Use the format
dig TXT selector._domainkey.example.com. For example, if your selector isbrisbaneand your domain isacme.com, rundig TXT brisbane._domainkey.acme.com. This targets the exact record used by receiving servers to validate DKIM signatures. - Look for a valid DKIM record starting with
v=DKIM1;. A properly configured record will start with this version tag and include ap=value containing the public key. If no record appears, DKIM is missing entirely. If the record exists but lacks thev=DKIM1;prefix or has syntax errors, it is broken. - Validate the public key syntax. The
p=field must be a valid base64-encoded string, typically 1024 or 2048 bits long. Malformed keys can cause validation failures, even if the record is present. This is a common source of invisible DKIM issues. - Check for multiple or conflicting records. If multiple
DKIM1records exist, or if a record has mixed syntax (e.g., missing semicolons, embedded spaces), receivers may reject the signature. Use tools like RFC 6376 to validate the structure.
Why This Matters for Deliverability
Without a valid DKIM record, receiving servers treat emails as unverified. According to industry data, domains with failed DKIM checks have inbox placement rates up to 30% lower than those with proper authentication. This isn't hypothetical—RFC 6376 specifies DKIM as an industry-standard method for email integrity.
Fixing the Issue
If the record is missing, create it in your DNS provider’s dashboard using the correct format. If malformed, correct the syntax—especially the v=DKIM1; tag and p= key. After updating, verify with a fresh query. Tools like MailTester’s email checker can help validate your configuration in real-world scenarios.
Common DKIM Record Syntax and Structure
You can detect missing or broken DKIM records by running a DNS TXT query and checking if the result starts with v=DKIM1;, contains a single k=rsa line, and includes one p= entry with a valid Base64-encoded public key. The record must not exceed 255 characters unless split into multiple strings. If any part is missing or malformed, your DKIM setup is broken.
What a Valid DKIM Record Looks Like
- Must begin with
v=DKIM1;— this version identifier is required and non-negotiable. - Must include
k=rsa;— this specifies the key type. While other types exist, RSA is the standard and widely supported. - The
p=field must contain the public key, encoded in Base64 without line breaks or padding artifacts. This key must be valid and match your private key pair. - Do not include multiple
p=entries or duplicate fields — a DNS TXT record can only have one instance of each tag. - If the total length exceeds 255 characters, split the value into multiple quoted strings (e.g.,
"part1" "part2"), which DNS allows and properly resolves.
Why Syntax Matters for DMARC and Deliverability
DKIM is a cornerstone of email authentication. If the record is improperly structured, your emails may fail validation, end up in spam folders, or get blocked entirely by receivers. Major platforms like Gmail and Yahoo rely on DMARC, which depends on both DKIM and SPF — a single syntax error breaks the chain.
According to RFC 6376 (the official specification), DKIM records must follow strict formatting to ensure consistent interpretation across systems. Misconfigurations are among the top causes of email deliverability failure, even when SPF is correctly set.
Use a real DNS TXT query tool — such as MXToolbox or RFC 6376 — to verify your DKIM record structure before sending email. Many providers still miss these subtle syntax errors.
For automated validation at scale, you can check DKIM and other email authentication records in bulk using MailTester’s bulk email verification. It checks for missing, broken, or improperly formatted DKIM records across your mailing list — before you send.
Why Manual DNS Checks Are Inefficient at Scale
You’re losing deliverability when you verify DKIM records one domain at a time. Manually querying DNS for each subdomain across multiple mailing platforms takes hours, introduces human error, and lets broken records slip through—sometimes for weeks. By the time you spot the issue, bounces and inbox placement drops have already hurt your sender reputation.
Scale Multiplies the Mistakes
Let’s say you manage email campaigns across ten subdomains for a single brand, or use three different ESPs with unique DKIM configurations. Checking each one individually via terminal commands or online tools isn't just slow—it’s inconsistent. A typo in a selector, a forgotten subdomain, a missing record altogether, all go undetected. The end result? A significant portion of your outbound mail fails to authenticate, leading to delivery failures or being sent to spam.
Even if you're using a command-line tool like dig or nslookup, you're still relying on manual input. Each query requires copying the domain, pasting the command, parsing the output—all ripe for error. A single wrong selector name can make a perfectly valid DKIM record appear broken.
Automated Checks Catch Problems Before They Hurt You
Instead of relying on your memory or a checklist, automated tools scan every domain and subdomain in seconds. They validate the exact format required by RFC 6376—ensuring the selector, token, and public key are all present and correctly configured. When a record is missing or malformed, you get an alert immediately, not after you've already sent a high-volume campaign.
Services like MailTester integrate with your email stack to test DKIM records as part of a bulk verification workflow. You can run full inbox placement tests across major providers—Gmail, Outlook, Apple Mail—before sending, ensuring your authentication passes every step. This prevents long delays and wasted sends caused by poor SPF/DKIM alignment.
For senders managing thousands of domains, this automation isn’t a luxury—it’s a necessity. Industry standards like those from Return Path and the M3AAWG emphasize the importance of consistent authentication across the entire sender infrastructure. You can test your setup at scale with a tool that combines real-time DNS probing with inbox placement simulation.
To avoid the manual hassle of testing DKIM records across many domains, check your entire email list for authentication issues in seconds: verify your email list with MailTester’s bulk verification tool.
How MailTester Automates DKIM Record Verification
You can use MailTester’s real-time API to detect missing or broken DKIM records by validating DNS TXT records automatically during email verification workflows. It checks both existence and syntax, flagging malformed or incomplete entries, and identifies exact domains or subdomains with issues across your entire sender list. This ensures your emails aren’t rejected due to weak authentication, improving inbox placement without manual DNS debugging.
Real-Time DKIM Checks During Verification Workflows
When you run a verification via MailTester’s API, it doesn’t just check if an email is valid—it digs deeper into your domain’s DNS records. The system performs a live DNS TXT query to verify the presence and correctness of your DKIM records. This automation removes guesswork, so you know instantly if your SPF, DKIM, or DMARC setup is broken.
Let’s say your mail server sends from mail.yourcompany.com. MailTester queries your DNS for the DKIM TXT record, confirms it exists, and validates that the syntax follows the correct format—especially the DKIM1 or dkim1 tag, proper selector, and alignment with your sending domain. If the record is missing, malformed, or expired, you’ll get a clear signal.
Bulk Verification Finds Weak Spots at Scale
Running checks on a few domains is helpful, but your email infrastructure likely spans multiple subdomains or partners. With MailTester’s bulk verification feature, you test every domain in your sender list at once. This gives you a complete view of authentication health—no more siloed checks or manual audits.
After a run, you see which domains or subdomains lack DKIM records, have incorrect selectors, or are using outdated or conflicting entries. This lets you prioritize fixes based on actual sender volume and risk.
Integrations with tools like Mailchimp, SendGrid, HubSpot, and Klaviyo allow you to run automatic DKIM checks before sending. This means your campaigns pass compliance checks in real time, reducing the risk of bounces and filtering. For more details on how to set up automated validation, see the integrations page.
For deeper insight into how email authentication works, the IETF’s RFC 6376 outlines the technical specifications for DKIM. Understanding these standards helps you interpret results correctly. You can find the full document at IETF RFC 6376.
What ‘Invalid’ or ‘Risky’ Verdicts Mean in the Context of DKIM
If your email verification tool returns an “invalid” DKIM verdict, it means the DNS TXT record for DKIM is missing, malformed, or not properly published. A “risky” verdict often flags an expired key, selector mismatch, or outdated configuration—common signs of weak authentication. These issues directly reduce inbox placement and increase spam detection. You can catch them early with a real-time DNS TXT query or a robust email verification tool.
What an Invalid DKIM Record Actually Means
When a DKIM record is invalid, the DNS lookup returns nothing or contains syntax errors—like incorrect formatting, extra spaces, or malformed tags. This breaks the cryptographic verification process that proves your email wasn’t altered in transit. The receiving server sees no valid DKIM signature and may mark the message as suspicious.
According to RFC 6376, the standard for DKIM, the TXT record must contain the correct dkim= tag with a properly structured public key. Even a single typo—like missing a semicolon or misplacing a space—can invalidate the entire signature. You can confirm this manually with tools like DNSChecker.org or via command line with dig TXT selector._domainkey.example.com.
Why ‘Risky’ Verdicts Are Just as Dangerous
A “risky” DKIM verdict doesn’t mean the record is absent—it means it’s present but possibly compromised. This includes expired keys, incorrect selectors (like using default when your system expects mail), or weak key sizes. Over time, these flaws erode sender reputation and increase the chance of your emails being quarantined or rejected.
Spam filters track consistency. If your DKIM key changes unexpectedly or fails validation intermittently, it signals instability. That’s a red flag even if you’re not sending spam. The result? Lower inbox placement, especially on platforms like Gmail and Outlook.
Use a verified email list with correct DKIM setup to maintain trust. Tools like MailTester’s bulk verification check for these issues at scale. By catching invalid or risky DKIM records before sending, you ensure your messages pass authentication checks and reach the inbox reliably.
Strong authentication isn’t optional. It’s foundational for deliverability. Every verified address that passes DKIM validation strengthens your sender reputation—over weeks and months—reducing long-term risk of being blocked.
How to Fix a Broken or Missing DKIM Record
Update your DKIM record by logging into your DNS provider, locating the DKIM configuration in your ESP’s domain settings, generating a new selector and key if needed, creating a TXT record with the correct domain selector._domainkey.yourdomain.com, pasting the full DKIM string including v=DKIM1; k=rsa; p=..., saving the record, and waiting up to 48 hours for propagation before testing. This ensures your emails are cryptographically signed and can be validated by receivers.
Step-by-Step: Fixing DKIM with Your DNS Provider
- Log in to your ESP or DNS management dashboard. Access your email service provider (like SendGrid, Amazon SES, or a custom domain host) and navigate to the section where you manage domain authentication. This is where you’ll find DKIM keys and domain settings.
- Locate the DKIM key configuration panel. Look for "Domains," "Authentication," or "Email Security" sections. DKIM settings are usually listed under submenus related to domain alignment or cryptographic signing.
- Generate or retrieve the correct DKIM key. If your key is missing or expired, generate a new one. Use the selector you’ve chosen (often "default" or a custom name like "s1") and ensure it matches the one you’ll use in the DNS TXT record.
- Create a TXT record with the full domain selector. The record name must be exactly
selector._domainkey.yourdomain.com(replace "selector" with the actual name like "default" or "s2"). Do not include the "selector" part in the domain name itself—DNS is case-sensitive and whitespace matters. - Paste the complete DKIM string, including the
v=DKIM1; k=rsa; p=...value. Thep=field contains the public key. Double-check that you copy the entire string and that no characters are missing or altered. Even a typo breaks the signature verification. - Save the DNS record and wait for propagation. DNS changes can take up to 48 hours to fully propagate worldwide. Use tools like MXToolbox or DNS.com to verify your record is live before assuming it's effective.
After You Update: Testing and Verification
Once propagated, test your DKIM record using a verification tool. You can use our email checker to validate the integrity of your domain's authentication setup before sending mail at scale. If you're processing large lists, run a bulk verification to ensure all addresses are valid and properly authenticated.
DKIM signing is a core part of email authentication—without it, receivers may reject your messages or treat them as spam. Even a small error in the record format can break deliverability.
Best Practices to Maintain DKIM Authentication Integrity
You can prevent email delivery failures by validating DKIM records quarterly, using consistent selectors, avoiding key sharing across environments, tracking key expiration, and monitoring bounces alongside authentication logs. These steps confirm that your domain’s signing setup remains intact and trusted by receiving servers.
Validate DKIM Records Regularly
- Run a DNS TXT query every quarter to confirm your DKIM records still exist and are correctly formatted. Authentication failures often stem from overlooked TTLs or expired records.
- After any DNS change—like switching ESPs or updating SPF—recheck DKIM records immediately, as misconfigurations can trigger inbox filtering or outright rejection.
- Use tools like RFC 6376 or MXToolbox to test DKIM records in real time, ensuring they’re accessible and properly structured.
Manage DKIM Keys with Discipline
- Use a consistent selector name (e.g.,
selector1._domainkey.yourdomain.com) and document it. Changing selectors mid-flight without updating all related configurations can break authentication. - Track the expiration date of each DKIM key. Keys should be rotated before they expire—ideally every 6 to 12 months—to maintain security and prevent disruptions.
- Never share DKIM keys across test, staging, and production environments. A single compromised key can undermine the integrity of all outbound mail.
- Monitor bounce rates and delivery failures. A sudden spike in hard bounces or rejections from providers like Gmail or Outlook may correlate with failed DKIM verification. Correlate these spikes with your logging to catch misconfigurations early.
Let’s be clear: no verification tool replaces real-time validation. Use your email checker to test the full delivery path, including inbox placement, before large sends. For high-volume senders, integrate the MailTester API to verify email lists programmatically and catch invalid or poorly authenticated addresses at scale.
Why Trusting Only Tools That Verify DNS Records Matters
You can’t trust an email verification tool that only checks syntax. Many tools miss broken or missing DKIM records, which are critical to deliverability. Without confirming DNS-level authentication, you risk sending to invalid or insecure addresses—even if the email looks valid on the surface. Tools like MailTester go beyond syntax checks by validating both the address and its associated DNS records in one step, achieving 98.9% accuracy across real-world domains and senders.
The Hidden Risk of Syntax-Only Checks
Let’s be clear: a valid email address is not enough. Many tools will pass an address like [email protected] as valid based on format alone, even if the domain has no DKIM record or is rejecting all mail due to misconfiguration. This is a common flaw in cheaper or older verification services. Without checking DNS records like DKIM, you can’t confirm whether a domain actually accepts inbound mail or if it’s set up securely.
DKIM, defined in RFC 6376, is a key part of email authentication. It verifies that the message content hasn’t been altered in transit. A domain missing or misconfigured DKIM record may still accept an address, but mail from that domain is often blocked by receivers. The sender reputation of a domain with broken authentication is effectively ruined, even if the address itself is syntactically sound. According to industry standards, including those from the IETF, DNS record validation is a required part of email verification for trustworthy results.
MailTester’s Dual-Validation Approach
MailTester doesn’t just check the address—it checks what the address is built on. We combine real-time DNS lookup with SMTP validation and syntax checks in a single test. This means we detect missing or broken DKIM records, catch-all domains, greylisted senders, and role-based addresses—all in one pass. This two-part approach is why our accuracy across domains and senders has been measured at 98.9%.
When you use MailTester, you’re not just filtering out typos. You’re verifying the full delivery chain. Our bulk verification tool runs this process at scale, helping you clean large lists before sending. For automated workflows, our real-time API gives you instant feedback during sign-up, checkout, or onboarding. You’re not guessing—you’re acting on real data.
No tool is perfect, but skipping DNS checks means you’re blind to one of the biggest deliverability risks. If you’re relying on anything less than full DNS validation, you’re not verifying email—you’re just guessing.
Keep Your Sent Emails Trusted with Proactive DKIM Validation
DKIM is a foundational layer in email authentication, ensuring messages aren’t tampered with in transit and verifying the sending domain.
Missing or broken DKIM records cause authentication failures, leading to bounces, spam filtering, and damaged sender reputation. Detecting these issues early prevents deliverability breakdowns before they impact real campaigns.
While manual DNS TXT queries offer a quick check for individual domains, scaling this across large mailing lists requires automation. Tools like MailTester enable bulk verification, spotting invalid or misconfigured DKIM records at scale, reducing bounce rates and improving inbox placement.
Sources
- 52.1% of the world's top 1.8 million domains (937,931 domains) now publish a valid DMARC record, up from 29.1% in 2023. — EasyDMARC 2026 DMARC Adoption & Enforcement Report (2026)
- Google reported 265 billion fewer unauthenticated messages sent to Gmail users in 2024 — a 65% reduction — after its bulk-sender rules took effect, with 500,000+ top domains publishing DMARC records in response. — Google (via MailOver bulk-sender requirements guide) (2024)
Keep reading
- Email authentication: SPF, DKIM, DMARC, BIMI and MTA-STS (complete guide)
- How to Test DKIM Body Length in Multipart HTML and Text Emails
- How DMARC Reporting with fo=1 Can Trigger Spam Trap Hits on Mismatched Domains
- How ADKIM=R in DMARC P=NONE Leads to Incorrect Filtering
- Using DNS Query to Verify DKIM Record Alignment and Structure
Ready to put this into practice? MailTester verifies emails with 98.9% accuracy — start with 100 free verifications.
Frequently asked questions
How do I know if my DKIM record is missing?
Run a DNS TXT query using dig TXT selector._domainkey.yourdomain.com. If no result appears, the record is missing.
What does a broken DKIM record look like?
It may return a malformed string, lack the v=DKIM1; prefix, or contain duplicate fields or invalid Base64 keys.
Can I test DKIM records without a terminal?
Yes — use DNS lookup tools like MXToolbox or the MailTester API to check records without command-line access.
How often should I verify DKIM records?
Check at least every quarter or after any DNS or email provider change to maintain authentication integrity.
Why does a missing DKIM record hurt deliverability?
Without DKIM, receivers can’t verify email origin, increasing the risk of spam or spoofing accusations.
Does every email service provider require DKIM?
Most major platforms like Gmail, Outlook, and Yahoo require DKIM for high-volume senders and enforce it for deliverability.
Can a single broken DKIM record affect my entire sender reputation?
Yes — repeated failures from one domain can lower reputation scores, especially if unaddressed for weeks.
How does MailTester detect broken DKIM records?
It queries the DNS TXT record for the DKIM selector and validates syntax, format, and presence in real time.
Is DKIM enough to ensure inbox placement?
No — DKIM is one part of a stack including SPF and DMARC. All three must be properly configured.
Can MailTester detect if my DKIM selector is outdated?
Yes — it identifies expired or mismatched keys and flags them as 'risky' during verification.
What happens if I don’t fix a broken DKIM record?
Emails may be blocked or marked as spam, leading to higher bounce rates and reputation damage.
Do DKIM records expire?
The key itself does not expire, but many providers rotate keys periodically. Old records must be removed.