How to Check IP Against DNSBL with dig in 2026
Learn how to check IP against DNSBL using dig — including DNSBL query reversed IP, return codes 127.0.0.x, and how to build a DNSBL check script.
Why checking your IP against DNSBL matters for email list hygiene
You send a campaign. It goes out. Nothing happens. No opens. No clicks. Just silence. Not because your content is bad—but because your IP address is blocked. Check your IP against DNSBL with dig, and you’ll see exactly why: if your IP is listed on a DNSBL, your emails are likely dumped straight to spam or rejected outright.
Think of DNSBLs like a shared blacklist maintained by email gateways. If your IP appears on one—say, Zen.Spaamhaus.org—it’s treated as a known spam source. Inbox placement drops to near zero. Even a single misstep in your sending setup can get you listed, and recovery isn’t automatic.
This isn’t about guesswork. It’s about catching problems before they cost you. Proactive IP checks during email list hygiene reveal blacklisted senders early—before your campaign launches and your reputation tanks.
Key takeaways
- IPs listed on DNSBLs like Zen.Spaamhaus.org face near-zero inbox placement.
- Using dig to check your IP against DNSBLs identifies blacklist status before sending.
- Integrating DNSBL checks into your list hygiene routine prevents deliverability failure.
What does 'DNSBL query reversed IP' mean in practice?
When you query a DNSBL using dig, the system reverses your IP address—so 1.2.3.4 becomes 4.3.2.1—then appends the DNSBL’s domain, like 4.3.2.1.b.b.b.b.dnsbl.example.com. If the IP is blacklisted, the query returns a response starting with 127.0.0.x, a standard signal indicating a block. This method is how most real-time spam filters check sender reputation at scale.
How the lookup works step by step
Take an IP like 192.0.2.1. To check it against a DNSBL like zen.spamhaus.org, you reverse the octets: 1.2.0.192. Then append the DNSBL domain: 1.2.0.192.zen.spamhaus.org. Now, using dig, you send a DNS query to that full name.
If the IP is listed, the DNS server responds with an A record that starts with 127.0.0. The last octet—like 127.0.0.2 or 127.0.0.5—often tells you why it’s blocked. For example, 127.0.0.2 from Spamhaus means the IP is listed for sending spam.
Why 127.0.0.x matters
The 127.0.0.x range is reserved for loopback, so any real IP returning that result is explicitly signaling “this IP is on a block list.” It’s universal across DNSBLs, meaning tools like dig or nslookup can parse the result without extra logic.
According to the IETF's RFC 1918, 127.0.0.0/8 is reserved for loopback, making these responses unambiguous. If you get a 127.0.0.x result, you know the IP is being actively blocked by the service.
Let’s be clear: checking an IP against a DNSBL is not about finding emails—it’s about checking the sender’s reputation. If your IP is blacklisted, even well-crafted emails won’t reach inboxes. This is why you need to validate both your domain and the IP you send from. Services like bulk email verification now include IP reputation checks, so you can prevent blocklist issues before sending.
How to check your IP against DNSBL using dig — a step-by-step guide
You can check if your IP address is listed on a DNS-based blackhole list (DNSBL) by using the dig command with a specially formatted query. Run dig 4.3.2.1.zen.spamhaus.org IN A — if the response returns 127.0.0.3 or 127.0.0.5, your IP is on the Spamhaus ZEN list. This method works across multiple DNSBLs by swapping the domain in the query. For accurate results, use the -t A flag to force A record resolution and avoid IPv6 AAAA lookups.
Step-by-step process
- Open your terminal or command-line interface. This is available on macOS, Linux, and Windows with WSL or PowerShell.
- Run the command:
dig 4.3.2.1.zen.spamhaus.org IN A. Replace4.3.2.1with your IP address, reversed and separated by dots. This query checks if your IP is on Spamhaus ZEN, one of the most widely used DNSBLs. - Wait for the response. If the answer returns
127.0.0.3or127.0.0.5, your IP is on the list.127.0.0.3means it's listed for spam, while127.0.0.5indicates it's linked to open relays or other vulnerabilities. - To check against other blacklists, replace the domain. For example:
dig 4.3.2.1.bl.spamcop.net IN Achecks SpamCop, ordig 4.3.2.1.sbl.spamhaus.org IN Achecks Spamhaus’ SBL list. - Always use
-t Ato ensure you get an IPv4 A record. Without it, the command may default to AAAA (IPv6) records, which can mask the actual result.
Understanding the results
The IP range 127.0.0.0/8 is reserved for loopback use. DNSBLs use this space to return a specific address indicating the nature of the listing. A response of 127.0.0.2 means the IP is on their list, but the exact reason depends on the specific DNSBL. You can cross-check your IP against a broader set of blacklists at platforms like Spamhaus ZEN or SpamCop for up-to-date status.
If you're managing sender reputation or email deliverability, these checks are practical. You can automate the process in scripts or integrate real-time validation into your email workflows. For high-volume email campaigns, ensuring your IP is clean is critical — even one DNSBL listing can trigger filtering by providers like Gmail or Outlook. Use tools like bulk email verification to proactively identify and clean invalid or high-risk email addresses and IPs.
Common DNSBL return codes: what 127.0.0.x means for your sender reputation
When your IP returns a 127.0.0.x response from a DNSBL, it means your address is blacklisted—usually because of spam behavior, misconfiguration, or being on a shared network. The third octet (e.g., 127.0.0.2) tells you which blocklist flagged your IP: 2 for Spamhaus SBL/XBL, 3 for Spamhaus ZEN, and 4 for policy-based blocklists like the PBL. Any 127.0.0.x result means your sender reputation is at risk.
Decoding the 127.0.0.x codes
Let’s break down what these codes actually mean. A response of 127.0.0.2 typically indicates your IP is listed in the Spamhaus SBL (Spamhaus Blocklist) or XBL (Exploits Blocklist), meaning it’s been tied to spam activity or compromised systems. This often results from sending unsolicited messages or infected devices relaying emails through your network.
127.0.0.3 is specific to Spamhaus ZEN, a combined list merging SBL, XBL, and PBL data. It’s one of the most widely used DNSBLs, so a hit here is serious. It signals that your IP appears on one or more of the three underlying lists—often due to spam, open relays, or hosting services using residential IPs.
127.0.0.4 shows up only on the Spamhaus PBL (Policy Blocklist). This list targets dynamic IPs and residential networks that shouldn’t be sending email directly. If you’re running a mail server from a residential IP, or your infrastructure isn’t designed for sending, this is a common reason for a PBL hit.
Why it matters for deliverability
Even a single DNSBL listing can lead to rejection by major email providers. According to Spamhaus, a single blacklisting can prevent 80% or more of your messages from reaching inboxes. The impact isn’t limited to one sender; it can affect all messages sent from that IP block.
You might assume your IP is clean, especially if you’re not sending spam. But if you’re using a shared hosting plan, cloud server with public IPs, or reselling bandwidth, you’re vulnerable to third parties compromising your infrastructure. This is why regular verification and monitoring matter.
That’s where tools like bulk verification come in—not just for email addresses, but for validating sender infrastructure health at scale. You can spot compromised IPs before they hit a DNSBL.
For real-time checking, our API can integrate DNSBL checks into your workflow, automatically flagging IPs before they cause deliverability issues. While you can’t remove a listing from Spamhaus yourself, knowing about it early lets you respond before your reputation takes a real hit.
Building a DNSBL check script with shell and grep — a practical example
You can check an IP against DNSBLs using dig and a simple Bash script. Read IPs from a file, query zen.spamhaus.org via reverse DNS, and match responses starting with 127.0.0. to detect blacklisting. This approach works because DNSBLs return specific IP addresses when an IP is listed, and dig +short makes it easy to parse.
Step-by-step: Build your script
- Start with a shebang to ensure your script runs in Bash:
#!/bin/bash. This tells your system to use the Bash interpreter when executing the file. - Use a
whileloop to read each IP from a file, one line at a time:while IFS= read -r ip; do. TheIFS=preserves whitespace, andread -rprevents backslash interpretation, which is critical for valid IP handling. - Query a DNSBL using
dig +shortwith the IP in reverse form, followed by the DNSBL domain:response=$(dig +short $ip.zen.spamhaus.org IN A). Spamhaus’szen.spamhaus.orgis one of the most widely used DNSBLs, and returning127.0.0.2or similar indicates a listing. You can cross-check with Spamhaus’s official site for full context. - Test the response: if it starts with
127.0.0., the IP is blacklisted. Use a simple conditional:if [[ $response == "127.0.0." ]]; then. The127.0.0.xrange is reserved for DNSBLs — a standard behavior confirmed in RFC 1101 and commonly observed in real-time blocklist checks. - Print a clear message:
echo "IP $ip is listed". This output is clean, minimal, and focused only on blacklisted results, helping you quickly identify problematic IPs. - Close the loop and read input:
done < ips.txt. Ensure your input file (ips.txt) contains one IP per line, without extra formatting.
Run your script safely
Save the script as check_dnsbl.sh, make it executable with chmod +x check_dnsbl.sh, and run it: ./check_dnsbl.sh. You’ll see only IPs that are flagged on the listed DNSBLs. For larger-scale checks across multiple lists or higher accuracy, consider using tools like bulk verification or a custom API integration with our verification API. That way, you’re not just checking for blacklisting — you’re validating deliverability health at scale.
DNSBL checks are only one part of list hygiene — here’s how to integrate them
You can check an IP against DNSBLs using dig, but that’s just step one. The real power comes from layering it with email validation, catch-all detection, and disposable email filtering—especially before sending. A single DNSBL match doesn't mean an IP is bad, but when combined with other signals, it flags risk early. Let’s walk through how to integrate it meaningfully. Using DNSBL checks as a pre-screening step helps you avoid wasting sends on IPs with a history of abuse. Many spam-heavy networks use known bad IP ranges, and catching those before validation saves time and protects sender reputation. According to Spamhaus, over 80% of spam originates from IPs listed in their DNSBLs—so checking is a baseline defense. But an IP can be clean on DNSBLs and still send to invalid or disposable addresses. That's why you need more than just a dig command. Combine DNSBL checks with domain-level validation, catch-all detection, and disposable email filtering. Catch-alls—domains that accept emails for any address—can inflate list size but hurt deliverability. Disposable domains (like Mailinator or GuerrillaMail) are often used for signups but fail to convert and can trigger spam filters. Role accounts (e.g., admin@, info@) are high-risk for engagement; they rarely open emails and can harm sender reputation. Tools like Emaillistchecker.io automate this entire stack. You can run bulk verification on your list with a single upload, and the system checks sender IPs against DNSBLs, verifies each email’s syntax and domain validity, identifies catch-alls, weeds out disposable domains, and flag role accounts—all in one pass. The result is a clean, high-potential list ready for sending.
The value of automation in layered verification
Manual checks with dig or third-party tools don’t scale. Each step—dig, MX lookup, SMTP handshakes, domain hygiene—adds friction. The real gain comes from bundling these checks into a single workflow. Emaillistchecker.io’s bulk verification service handles it all, using over 50 signals including DNSBL status, SPF alignment, and engagement signals. It also offers an API for devs who want to integrate verification into workflows. You can test inbox placement with real-world send testing via the inbox placement feature, ensuring your messages land where they should—right in the inbox. This isn't about replacing dig—it's about using the right tool at the right time. Dig gives you a single data point. Real hygiene is built on layers. Use the integrations with Mailchimp, HubSpot, or SendGrid to automate validation before every campaign. Your deliverability rate improves when you don’t just check IPs—you check the whole sender ecosystem.
Why manual DNSBL checks aren’t enough for large or dynamic email operations
Running dig on individual IPs works for one-off checks, but it fails at scale. If you're managing thousands of IPs across cloud environments or shifting infrastructure daily, manually checking each one is impractical, error-prone, and too slow. You need automation that keeps pace with real-time changes and consolidates data across multiple DNSBLs.
Scale and velocity kill manual workflows
You can’t monitor 10,000 IPs with dig commands before your next email campaign launches. Manual checks take minutes per IP, and even with scripts, you’re still limited to static snapshots. When your infrastructure auto-scales or IPs rotate frequently — common in AWS, Azure, or Kubernetes environments — your DNSBL data becomes outdated before you finish the first test.
The reality? IP reputations change hourly. A fresh server might be listed on one DNSBL within 15 minutes of deployment. Static checks miss those shifts. You’ll send emails from a newly listed IP and hit rejection rates, especially with providers like Gmail and Yahoo that depend on up-to-the-minute feed data. Even a brief listing can tank deliverability across 20,000+ messages in a campaign.
Automated tools see what you can’t
Real-time email verification platforms don’t just check one DNSBL — they query dozens simultaneously, including Spamhaus, SORBS, and SpamRats, and aggregate results. This gives you a consolidated risk score, flags trends, and tracks historical performance, which is crucial for spotting emerging issues like IP blocks in a data center.
With automation, you get more than just a binary “listed” or “not listed.” You get context: how long the IP has been flagged, whether it’s part of a shared hosting network, and whether similar IPs show patterns of spam activity. This insight turns reactive checks into proactive risk management.
For example, tools like the bulk verification at EmailListChecker.io scan large IP pools against multiple DNSBLs and integrate with your email stack to prevent sends to risky sources. This isn’t just faster — it’s fundamentally more accurate.
For dynamic environments, relying only on dig is like checking your car’s tire pressure once a month in a race. You need continuous, intelligent monitoring — not static commands. The RFC 5321 specification for SMTP clearly defines how MTAs should evaluate sender reputations, but enforcement depends on real-time, aggregated data you can’t collect manually. RFC 5321 outlines the standards; real-world performance demands automation.
How Emaillistchecker.io goes beyond manual DNSBL checks
You can check an IP against DNSBLs with dig, but it only tells you if the IP is listed—no context, no automation. Emaillistchecker.io does more: it scans your sending IP and domain against real-time DNSBLs, then assigns clear verdicts like valid, catch-all, or risky, with sender reputation signals built in. No manual tools or scripts needed—just verify your entire list in seconds.
Automated DNSBL & Sender Reputation Analysis
Manual DNSBL checks with dig miss a lot: they don’t account for domain reputation, message content, or whether the mailbox actually accepts mail. Emaillistchecker.io checks both the IP and domain across multiple DNS-based blocklists, including those maintained by Spamhaus and Barracuda. These are the same systems email providers use to assess sender trustworthiness.
It’s not just about listing status. The tool evaluates whether the IP or domain has a history of being flagged, abused, or associated with spam campaigns. This helps you catch problems early—like a server with a poor reputation that might lead to your emails being quarantined or rejected outright.
Seamless Integration & Automated List Hygiene
Let’s say you're managing a 10,000-email list in Mailchimp. Rather than manually running dig checks on every IP, Emaillistchecker.io integrates directly with Mailchimp, HubSpot, and SendGrid. After verification, the tool syncs only the valid addresses back to your platform—no bad data sent.
It does this with real-time API calls and bulk processing. You can run a verification job in minutes, get detailed feedback on each email, and see which entries are risky—not just invalid, but potentially harmful to your sender reputation. For example, a catch-all response means the server accepts all emails, which often indicates a low-quality or disposable domain.
Once you know what’s risky, you can act. Integrate with your platform and keep your list clean before every send. That’s how you maintain inbox placement and avoid delivery penalties.
Unlike standalone tools or basic email validators, Emaillistchecker.io builds sender reputation insight directly into the verification process. It’s not just a gatekeeper—it’s a deliverability partner. You can get started with 100 free verifications at no risk.
You can’t rely solely on dig — here’s where your tools should take over
dig tells you if an IP is listed on a DNSBL, but it doesn’t tell you whether that listing is a false alarm, outdated, or actually harmful. You get raw data — no context, no judgment. Let’s be honest: a single DNSBL hit doesn’t mean your email will be blocked. The real risk comes from cumulative signals, not one isolated check.
The limits of raw DNSBL checks
dig returns results based on the DNSBL you query, but it can’t assess the quality of that list. Some DNSBLs flag entire ranges unfairly; others lag behind real-time spam trends. A high bounce rate from IPs you’ve never sent to? That’s not just a DNSBL — it’s a red flag about your sender reputation. dig won’t tell you that.
Most DNSBLs are not real-time threat feeds. They rely on historical abuse patterns. Some use automated systems with high false-positive rates. Without correlation across multiple sources, you’re making decisions on incomplete evidence. The same IP might be trusted by one list and blacklisted by another. dig gives you both without context.
Why modern tools go beyond dig
A full email verification service like Emaillistchecker.io doesn’t just check DNSBLs — it validates over 98.9% of emails using a layered approach. It combines real-time DNSBL checks with syntax validation, domain existence, mailbox responsiveness, and behavioral analysis of email patterns.
This includes checking against known disposable domains, role-based addresses, and catch-all setups — all of which dig ignores. It also evaluates how your sending behavior affects deliverability over time. You’re not just looking at one IP; you’re checking how it fits into a broader delivery ecosystem.
For example, a domain might pass DNSBL checks but still be a high-risk sender due to poor engagement patterns or a history of unverified lists. Only a full platform can surface those risks. The difference between a clean IP and a deliverability killer often isn’t the DNSBL — it’s the sender’s reputation. Tools like Emaillistchecker.io track that.
Want to verify your list at scale? You can start with 100 free verifications — credits never expire — and see how much cleaner your sends become: bulk verification or test your sending quality with inbox placement. With the right tool, you’re not just checking IPs — you’re building a trusted sending reputation.
How to use Emaillistchecker.io’s in-app AI assistant to analyze DNSBL results
You can upload your list of IPs or email addresses from your send domain to Emaillistchecker.io, and the in-app AI assistant will scan them against DNSBLs, flagging any that appear on multiple blacklists and rank them by risk. It then gives you clear, actionable steps: warm up, reassign, or remove high-risk senders—helping prevent sender reputation damage.
Use the AI assistant to prioritize risk mitigation
- Upload your sender list—paste IPs or email addresses from your send domain into the bulk verification tool. This could be your transactional senders, ESPs, or any IPs associated with outbound mail. You’re only verifying what you own or control.
- Let the AI scan DNSBLs in real time—the system checks each entry against industry-standard blocklists, including those maintained by Spamhaus and Project Honey Pot. These are widely recognized sources, and being listed on more than one increases the odds of spam filtering.
- Review AI-generated risk scores—the assistant flags IPs listed on three or more DNSBLs as “high-risk” and shows a clear breakdown of which blacklists they appear on. This reduces guesswork and highlights patterns.
- Follow AI-driven recommendations—you’ll see tailored actions: “Warm up” for IPs with recent listings but no long-term history, “Reassign” if the sender can be replaced with a clean IP, or “Remove” if the risk is too high for continued use. These decisions protect your sender reputation.
- Export and act—download the results or integrate the findings with your mailing platform via our SendGrid, Mailchimp, or HubSpot integrations. This allows automatic deduplication and blocking of risky IPs before they send.
Why this matters for deliverability
High-risk IPs or sender domains are more likely to end up in spam folders or be outright blocked. According to Spamhaus, being listed on multiple DNSBLs correlates directly with higher bounce and drop rates. The AI assistant surfaces this early, so you don’t wait for complaints or ISP notifications. With 98.9% accuracy, the system doesn’t just detect issues—it helps you fix them proactively.
Final word: DNSBLs are not a one-time test — they’re part of ongoing list hygiene
Even if your IP passes today, it can be listed tomorrow. Spam patterns shift fast, and new campaigns can trigger listings within hours.
Treat DNSBL checks as part of a recurring, automated hygiene cycle. Regular monitoring prevents surprises and keeps your sender reputation intact.
Use tools that run checks continuously — not just when you’re about to send. Automation ensures you catch issues before they affect deliverability.
Sources
- Deliverability experts classify a bounce rate under 1% as excellent, 1–2% as acceptable, 2–5% as concerning, and anything over 5% as dangerous for sender reputation. — Verified.email bounce rate benchmark (2025)
- Catch-all addresses made up 9% of all emails checked in 2025 — over 1 billion addresses that can look valid but still bounce and damage sender reputation. — ZeroBounce Email List Decay Report (2025)
Keep reading
- Deliverability, blocklists and sender reputation (complete guide)
- Googlemail.com vs Gmail.com Deduplication: What You Need to Know
- Gmail Promotions Tab vs Spam: What You Need to Know
- Outlook and Microsoft 365 Alias Behaviour for Normalization
- Outlook and Hotmail Alias Domains for Email Deduplication
Ready to put this into practice? Emaillistchecker.io verifies emails with 98.9% accuracy — start with 100 free verifications.
Frequently asked questions
What is a DNSBL and why should I check my IP against it?
DNSBLs (Real-time Blackhole Lists) track known spam sources. Checking your IP against them ensures you’re not blacklisted, which would block your emails from reaching inboxes.
How do I check if my IP is on Spamhaus ZEN using dig?
Run `dig 4.3.2.1.zen.spamhaus.org IN A` in your terminal. If it returns 127.0.0.x, your IP is listed.
What do DNSBL return codes like 127.0.0.2 or 127.0.0.3 mean?
They indicate the IP is listed on a specific DNSBL. 127.0.0.2 is often SBL; 127.0.0.3 is ZEN (Spamhaus combined list). All point to being blocked.
Can I automate DNSBL checks across thousands of IPs?
Yes, with shell scripts using dig and grep, but automated tools like Emaillistchecker.io scale more reliably and integrate with email platforms.
Is dig accurate enough for sender reputation checks?
Dig gives raw DNS responses but lacks context, history, or multi-source correlation. It’s useful for quick tests but not for production hygiene.
How can Emaillistchecker.io help with DNSBL and list hygiene?
It checks IP reputation, validates email addresses, identifies risky senders, and integrates with SendGrid, Mailchimp, and HubSpot to automate clean lists.
Do DNSBL checks prevent email blocking?
Yes — by catching blacklisted IPs before sending, you avoid deliverability failures and reduce spam complaints.
Is a DNSBL check enough to prevent spam complaints?
No — DNSBLs address known spammers, but spam traps, role accounts, and poor content also trigger blocks. Use full list hygiene tools.
What’s the difference between a DNSBL and a spam filter?
DNSBLs are databases of known bad IPs used by filters. Filters use multiple signals including DNSBLs, content, sending behavior, and sender reputation.
How often should I run a DNSBL check?
Run it before sending campaigns and periodically — even trusted IPs can be listed due to shared hosting or compromised devices.