11 Ways to Bypass a CDN and Find the Real IP Address
IP geolocation displayed across the web with 99.9% accuracy—this open-source offline API library is remarkably powerful!
A CDN can block traffic, but it can't block the origin server
You've got only one domain. Run a dig and four or five IPs come back, located in Zhejiang, Guangdong, and Beijing—look up their ownership and they're all CDN nodes belonging to some cloud provider. Scan the ports and only 80 and 443 are open, and none of the web fingerprints match. Where the actual server is, you have no idea.
This is the most common first wall you hit during reconnaissance. But let's be clear about one thing: a CDN solves the question of "where should external requests to the domain go"—it doesn't change what the server itself looks like. As long as the origin server is still exposed on the public internet, there's always a crack that leaks out: certificates, historical DNS records, sibling subdomains, mail headers, load balancer cookies.
I'll cover this in three layers: first, whether it's actually behind a CDN (this step gets skipped the most, and skipping it means everything after is wasted effort); then, how to infer the origin server from side-channel information; and finally, how to confirm what you found is real.
Step one: First confirm whether it's actually behind a CDN
A lot of people jump straight to checking historical DNS, but a fair number of targets were never on a CDN at all—the extra IPs just come from dual-line routing or DNS round-robin. Spending two minutes to confirm this can save you an hour of guessing later.
Check the CNAME chain
This is the hardest evidence, far more reliable than "there are multiple IPs."
dig +short www.example.com CNAME
dig www.example.com | grep -E "CNAME|A\s"If the resolution result contains a CNAME pointing to a CDN vendor's domain, that basically settles it. Common patterns:
Vendor | CNAME pattern |
|---|---|
Alibaba Cloud |
, |
Tencent Cloud |
, |
Cloudflare |
|
CloudFront |
|
Akamai |
, |
No CNAME and just a string of A records doesn't necessarily mean it's not on a CDN—some vendors support A record integration. So you still need to check step two.
Check IP ownership and multi-region resolution
There are plenty of online tools for multi-region resolution—itdog.cn, ping.chinaz.com, and boce.com can all give you results from dozens of nodes across the country at once.
The logic isn't "multiple IPs means CDN," it's:
• Different provinces resolve to different IPs, and those IPs all belong to the same CDN vendor's address ranges → it's on a CDN
• Everywhere resolves to the same set of IPs, just round-robin within the set → most likely not on a CDN, just DNS round-robin
• Different regions resolve to different IPs, but the ownership is different ISPs' own address ranges → dual-line data center, not a CDN
The trap here is Anycast. Some services use Anycast so the whole world resolves to the same IP range—during measurement it looks like "different everywhere," but it's actually routing-level proximity, which is not the same thing as a CDN. So judge by ownership, not just by the number of IPs.
A quick verification
Take any resolved IP and hit it directly to see what comes back:
curl -k -H "Host: www.example.com" https://<resolved IP>/ -IIf it returns a CDN error page, or the Server header is a CDN vendor's identifier, or it just refuses—that's a node. If it returns the target site's normal response headers, then that IP might be the origin server directly, and you can skip everything else.
Step two: 11 ways to infer the origin server from side channels
Ordered from low cost to high. The first few take seconds to produce results; the later ones take time and compute—don't start with a full internet scan.
1. Historical DNS records
Bare resolutions from before the CDN switch, or records that were misconfigured during some period, often remain in third-party platforms' historical databases.
Common entry points:
• SecurityTrails (securitytrails.com, limited free quota)
• ThreatBook (x.threatbook.cn, DNS history is in the domain intelligence section)
• DNSDumpster (dnsdumpster.com)
• ViewDNS (viewdns.info, has DNS History)
This interface splits records by type into A / AAAA / MX / NS / SOA / TXT tabs. The A records tab lists historical IPs by time period—pair up First Seen and Last Seen and you can see whether the resolution suddenly switched to a new batch at some point. The moment the CDN was switched often hides right at that boundary.
The DNSDB query interface was used a lot a few years back—just domain type:A and it would list subdomains along with their corresponding IPs. But that site has shut down; the image is kept as a reference, and you should use the platforms above for actual lookups.
Key judgment: an IP appearing in historical records doesn't mean it's the origin server. There are three common misjudgments—that record belongs to someone else sharing the IP and has nothing to do with the target; that machine went offline long ago; or it was just a temporary resolution for some subdomain.
There are three verification methods, do them in order: reverse-lookup the domain from the IP (see if it still hosts other subdomains of the target), check whether the IP's open ports look like a web server, and hit it directly with a Host header to see what comes back. Only when all three line up is it worth pursuing.
2. IPs in non-web records
Mail-related DNS records are often forgotten, and they're a high-value path.
dig +short MX example.com
dig +short TXT example.com• MX records: if they point to a self-hosted mail server, that machine is often in the same data center as the web server, or even the same machine. Check its A record.
• SPF records: v=spf1 ip4:1.2.3.4 ip4:1.2.3.0/24 -all—this line directly writes out the sending IP ranges, and if you're lucky they overlap with the web ranges.
• TXT verification records: domain ownership verification, third-party service integration verification—occasionally you can infer which external services are in use, and from there locate assets.
• DKIM: the selector name (selector._domainkey) reveals which mail service is used; if it's self-hosted, you can reverse-lookup the same way.
When this fails: if they use a third-party mail service (Tencent Exmail, Alibaba Cloud Mail, SendGrid, etc.), this path yields nothing useful.
3. Sibling subdomains
CDNs bill by traffic and bandwidth, so the main site being on one doesn't mean all subdomains are. Legacy systems, test environments, ops panels, services exposed through internal network tunneling, historical secondary sites—many are still bare.
And these bare subdomains are often on the same server or in the same /24 as the main site.
Three ways to find subdomains—combining them works best:
# Certificate transparency, most complete and free
curl -s "https://crt.sh/?q=%25.example.com&output=json" | jq -r '.[].name_value' | sort -u
# Passive aggregation (subfinder queries dozens of data sources)
subfinder -d example.com -silent
# Dictionary brute force as a fallback
subfinder -d example.com -all -silentPlus search engine syntax—site:example.com -www can surface a batch of subdomains from the index.
ThreatBook's subdomain lookup is a ready-made entry point with a limited free quota—good for a quick look to get a sense of things before deciding whether to bring out the tools.
Syntax like site:baidu.com -www pulls pages the search engine has already indexed. The upside is zero request cost; the downside is you only get what's been indexed—test environments and ops backends won't show up at all.
Dictionary brute force results come with ports, server types, and site status—that column of information is more useful than the domains themselves. Among the same batch of resolutions, those without a CDN and running older web server versions are often the entry point to sibling sites.
Once you have the subdomain list, resolve each one and pick out those without a CNAME to a CDN—their A records are candidate origin IPs, or they reveal the /24 the origin server sits in.
4. Certificate transparency log reverse lookup
crt.sh is the handiest entry point right now—free, no account needed, and the data is complete.
# Search all certificates ever issued for a domain
curl -s "https://crt.sh/?q=example.com&output=json" | jq -r '.[] | "\(.not_before) \(.name_value)"' | sort -uYou get two things from the results: a complete subdomain list (the certificate's SAN lists them all), and the certificate's issuing organization (the O= field), which helps confirm whether these assets actually belong to the target organization.
Censys can do the same thing, and it can find IPv4 hosts by certificate fingerprint, but it now requires registration and has quota limits—crt.sh is faster for daily use. The search syntax is roughly parsed.names: example.com and tags.raw: trusted; after finding a certificate, look at IPv4 Hosts under Explore and hosts using the same certificate are listed.
What you get is all certificates ever issued for this domain, sorted by issue time. The Issuer statistics in the left column are quite useful—if the target has switched CAs over time, certificates from different periods will be grouped under different issuers, which helps you tell which is current and which is old.
Click any certificate and the basic info shows Subject DN, Issuer DN, validity period, and fingerprint. The real entry point is Explore in the bottom right—expand it and you get What's using this certificate?.
This result is very telling: the same *.rocket-internet.com certificate is shared by a dozen-plus hosts, and hitting port 443 on those IPs returns 403 Forbidden with the domain name in the response. The origin server and the CDN using the same certificate on both sides is the fundamental reason this kind of reverse lookup works.
5. Read the certificate by connecting directly to the IP
The principle isn't complicated: the CDN-to-origin leg is also encrypted, so the origin server itself has to hold the domain certificate. That means you can just initiate a TLS handshake against port 443 of a candidate IP, and the origin will hand over its certificate.
openssl s_client -connect 1.2.3.4:443 -servername www.example.com </dev/null 2>/dev/null \
| openssl x509 -noout -subject -ext subjectAltNameYou must include -servername; that's the SNI. Without it, the origin may return a default certificate that reveals no domain information at all.
If the target domain shows up in the certificate, that IP is almost certainly the origin.
Two failure conditions to watch for: if the origin firewall only allows the CDN's back-to-origin IP ranges, your connection from the public internet will simply time out and this path is dead; and if the origin signs its certificate with an internal CA, the certificate won't contain a public domain and you won't see any connection. So this trick usually isn't the first step—it's used to verify after you already have a candidate IP range.
6. Fingerprint search
The idea behind cyberspace mapping platforms is this: the origin's page characteristics are nearly identical to those on the CDN edge nodes, so you use those characteristics to reverse-lookup indexed IPs.
Here are a few query dimensions, from most reliable to loosest:
# Shodan
http.title:"target site title"
http.html:"that unique string in the page"
http.favicon.hash:-123456789
# FOFA
title="target site title"
body="page-unique string"
icon_hash="-123456789"You can also query the Server header, but CDNs usually rewrite or hide it, so it's not very useful—unless the target runs a self-built CDN or has sloppy configuration.
This image illustrates exactly why that trick doesn't work well: 80.http.get.headers.server: cloudflare instantly hits hundreds of thousands of hosts, all of them Cloudflare's own nodes and other people's proxies—the result set is so large it's meaningless to filter. Header fields only work as one condition in a combined query; using them alone is as good as not searching at all.
favicon hash is the best trick here, and the original article didn't mention it. The hash computed from the same favicon file is fixed and unrelated to the domain, so searching it on a mapping platform often directly hits the machine that isn't behind a CDN. The algorithm is mmh3:
import mmh3, requests, codecs
r = requests.get("https://www.example.com/favicon.ico", verify=False, timeout=10)
print(mmh3.hash(codecs.lookup("base64").encode(r.content)[0]))Put a minus sign in front of the computed value and that's your result—drop it straight into FOFA's icon_hash or Shodan's http.favicon.hash.
Failure conditions: the target switched to the default favicon, or the origin's favicon differs from what the CDN returns (some CDNs cache an old version).
7. Third-party identifiers and leaked files in the page
The page source contains a set of identifiers that have nothing to do with the domain but are bound to "this particular codebase":
• Google Analytics / GTM tracking IDs like UA-XXXX, G-XXXX
• Baidu Analytics hm.js?xxxxx
• Site IDs from customer service or live chat scripts
• reCAPTCHA site keys
Search these on Shodan or FOFA with http.html: / body= and you can pull up every host running the same codebase—some of which may not be behind a CDN.
The query http.html:"UA-32023260-1" returned just 1 record, and that host is one of the deployment locations for this codebase. Tracking IDs are completely decoupled from the domain, which makes them far more precise than collision-prone features like titles and body text—provided the target actually uses GA and doesn't share the same ID with another site.
A few other spots that are easy to miss:
• Probe pages like phpinfo, which contain absolute paths for SERVER_ADDR and DOCUMENT_ROOT
• .git/config, .svn, backup archives
• Stack traces and internal addresses in error pages
• API docs like Swagger / actuator
Note the distinction: an internal IP tells you about architecture, not public reachability. Working backward from 10.x or 192.168.x to a public origin is pointless—it only tells you whether things are on the same machine.
8. Email headers
Trigger a system email: registration verification, password reset, RSS subscription, comment notification. Get the raw email and look at the Received headers.
Received headers are appended hop by hop from sender to recipient, so read them bottom-up. The first entry that isn't the mail provider's record is the sending server. If web and mail are on the same machine, that IP is the origin.
The hostname in Message-ID and X-Mailer can also provide clues, especially with self-hosted mail systems.
Failure conditions: sending through a third-party mail service means the whole chain is the provider's IPs; or strict SPF configuration with mail going out on a separate sending domain breaks this trail.
9. Resolve from overseas nodes
Some CDN vendors' plans only accelerate within the country—overseas routes have no nodes, or only forward without caching. Resolving and accessing directly from an overseas host may reveal the real back-to-origin IP.
# Direct query via overseas DNS
dig @8.8.8.8 www.example.com +short
dig @1.1.1.1 www.example.com +shortEven better, use an overseas VPS to curl it directly and see if you can get the page.
This trick is losing effectiveness: major cloud vendors' CDNs already have fairly complete global nodes, so it now mainly works against smaller vendors, regional CDNs, and low-cost "domestic acceleration" plans. And even if you resolve to a different IP, you still need to confirm it's the origin using the logic from step one—don't mistake an overseas node for the origin.
10. C-block scanning and full-internet scanning
Reaching this step means nothing above has closed the loop, and you need to spend compute and time. The prerequisite is that you already have a candidate IP or candidate C-block—scanning aimlessly is a waste.
Once you have a C-block, the approach is: scan for open 80/443 in that block, then send requests with the Host header one by one and compare the responses.
# Scan ports first
masscan 1.2.3.0/24 -p80,443 --rate 2000 -oG scan.txt
# Then verify each with the Host header, comparing response length and title
while read ip; do
echo -n "$ip "
curl -k -s -H "Host: www.example.com" --max-time 5 "https://$ip/" | head -c 200 | tr -d '\n'
echo
done < iplist.txtIf the response matches what the CDN serves, or redirects straight to the target domain, that's the origin.
Only if you don't even have a candidate block should you consider full-internet scanning: Zmap collects certificates on port 443 and filters by the domain in the certificate. This method is expensive (tens of GB of traffic, requires a dedicated line or cloud host), and the smaller the target, the less it's worth it. In practice, people more often just query a mapping platform by C-block:
# FOFA
ip="1.2.3.0/24"Dozens of times faster than scanning, and you don't have to pay for the bandwidth.
A quick word on boundaries: actively scanning someone else's C-block carries real legal risk outside an authorized scope—don't get yourself scanned into trouble.
11. Decoding F5 LTM cookies
When the target uses F5 BIG-IP for load balancing, a cookie like this appears in the response headers:
Set-Cookie: BIGipServerpool_8.29_8030=487098378.24095.0000; path=/The first decimal number is the encoded address of the backend node, and the decoding rule is fixed:
487098378 → hex 1d08880a
Group every two digits from the end: 0a . 88 . 08 . 1d
Convert each group to decimal: 10 . 136 . 8 . 29
Result: 10.136.8.29Here we need to correct a widely circulated claim: what you decode is usually not the "public real IP" but the internal address of the pool member behind the F5. The value does reflect the real server's address, but it's from an internal perspective—whether it's directly reachable from the public internet depends on whether the F5 exposes it.
The practical value is twofold: first, it confirms the target uses F5 rather than a cloud CDN (architecture judgment); second, if what you decode is a public-range address, that's directly a candidate origin. Look at the cookie name—anything starting with BIGipServer or BIGipServerpool applies, and some vendors' in-house load balancers also put similar backend identifiers in cookies, so it's worth decoding on the side.
Step three: how to confirm what you found is real
Once you have a candidate IP, don't rush to conclusions. Four signals—the more that line up, the more credible it is:
Signal one: accessing with the Host header returns the target page
curl -k -s -H "Host: www.example.com" https://<candidate IP>/ | head -50The returned HTML matches what you get through the CDN (title, logo, key strings all line up)—this is the strongest evidence.
Signal two: the certificate matches
Connect directly to port 443 on that IP, and the certificate's subjectAltName contains the target domain or its subdomains, and the certificate wasn't issued just recently.
Signal three: the machine has other things on it
An origin usually doesn't run just one web service. Scan other ports on that IP—if management services like 22, 3306, 3389, 8080, or 8443 are open, it's a real machine, not a CDN edge node.
Signal four: reverse lookup lines up
Reverse-lookup the IP (PTR, ThreatBook reverse lookup, Shodan's hostname)—if it resolves to the target's own domain, or other assets in the same C-block also point to this organization, credibility goes up.
Negative signals matter just as much: only returning CDN error pages, only 80/443 open, response headers full of CDN vendor identifiers, identical content whether accessed from a foreign IP or a domestic one—these mean you're still circling the edge nodes.
Final thoughts
All these methods come down to one thread: a CDN changes "who the domain resolves to," but it can't change "how the server itself talks." The certificate says which domains it recognizes, the response headers carry server-side fingerprints, the page has tracking IDs bound to the code, the cookie has the load balancer's internal address—these are all traces the origin is forced to expose.
On sequencing, go by cost: do CNAME and ownership confirmation first (two minutes), then historical DNS and subdomains (a few minutes), then certificate reverse lookup and fingerprint search, and only then C-block scanning and full-internet scanning. Full-internet scanning is a closing move—loud and expensive—so don't make it step one.
From the defensive side, if you want to block most of these 11 methods, there are only a few key actions:
• Certificate isolation: sign the origin with an internal CA, or at least don't let the main domain certificate appear on the origin's 443
• Back-to-origin allowlist: the origin firewall only allows the CDN's back-to-origin IP ranges and drops everything else—this one kills more than half the methods
• Mail separation: don't put MX on the same machine as web; use a separate sending domain
• Subdomain consolidation: either put everything behind the CDN or don't resolve it publicly; pay special attention to test environments and ops panels
• Remove fingerprints: swap out the favicon, strip Server and X-Powered-By , and avoid self-hosting third-party analytics unless you really have to
Once these are handled properly, the remaining avenues become costly enough that most people won't bother pursuing them.