Skip to content
Панель Розсилки Mail Cabinet Choose a plan

How to Find a Website IP Address: dig, nslookup, RDAP and What an IP Won’t Tell You

How to Find a Website IP Address: dig, nslookup, RDAP and What an IP Won’t Tell You

A DNS query shows a website’s IP address: on Linux and macOS run dig +short example.com A and dig +short example.com AAAA, on Windows run nslookup example.com, and without a terminal open https://dns.google/resolve?name=example.com&type=A in a browser. To see who owns that address, query RDAP: https://rdap.org/ip/<IP>. Keep in mind that behind a CDN you see a CDN edge, not the site’s server, and on shared hosting one IP serves dozens of sites.

How we tested

  • 25.10.2026, 14:27-14:30 UTC: DNS queries for real websites over DNS-over-HTTPS (dns.google/resolve and cloudflare-dns.com/dns-query with the header accept: application/dns-json), run from a browser. Address owners were checked via RDAP (rdap.org and the ARIN and RIPE NCC registries per the IANA bootstrap list), Cloudflare ranges against the official list at cloudflare.com/ips-v4.
  • Command-line tools were run on the RichHost test bench (isolated container, 2 vCPU / 8 GB, Ubuntu 24.04, BIND 9.18.39, nginx 1.24). The container has no direct internet access, so dig, host and nslookup are shown against a local test zone bench.test, and curl against the bench’s test site. Zone addresses come from the documentation ranges 203.0.113.0/24 and 2001:db8::/32.
  • Windows and macOS commands were not run on the bench; they follow the official documentation.

What DNS returned for real websites

We asked two public resolvers, Google and Cloudflare, and looked up the owner of every address. Six well-known domains already cover all the typical cases: a site behind Cloudflare, several A records, a CNAME to a CDN, and a company’s own network.

Domain DNS answer (25.10.2026) Block owner per RDAP What it means
discord.com 5 A records: 162.159.128.233, 162.159.135.232, 162.159.136.232, 162.159.137.232, 162.159.138.232 Cloudflare, Inc., 162.158.0.0/15 (ARIN) behind Cloudflare, origin hidden
www.npmjs.com A: 104.17.134.117, 104.17.135.117; AAAA: 2606:4700::6811:8675, 2606:4700::6811:8775 Cloudflare, Inc., 104.16.0.0/12 (ARIN) also Cloudflare, IPv4 and IPv6
amazon.com 3 A records: 98.82.161.185, 98.87.170.71, 98.87.170.74 AMAZON-IAD, Amazon Data Services Northern Virginia (ARIN) AWS cloud, load spread across addresses
www.microsoft.com CNAME → www.microsoft.com-c-3.edgekey.net → e13678.dscb.akamaiedge.net → 2.19.217.218 (Google) or 23.197.162.102 (Cloudflare) AKAMAI-PA, 2.19.208.0/20 (RIPE NCC) Akamai CDN, different edges per resolver
wikipedia.org A: 185.15.59.224; AAAA: 2a02:ec80:300:ed1a::1 Wikimedia-esams-infra, 185.15.59.0/24, NL (RIPE NCC) Wikimedia’s own network, Amsterdam site
github.com 140.82.121.3 (Google) or 140.82.121.4 (Cloudflare), no AAAA GitHub, Inc., 140.82.112.0/20 (ARIN) own network, IPv4 only

We explain A, AAAA and CNAME records in our guide to DNS records and domain management; here the point is what you can read from these answers.

A site behind Cloudflare: how to confirm it

Cloudflare DNS answer for discord.com in JSON (shortened):

GET https://cloudflare-dns.com/dns-query?name=discord.com&type=A
accept: application/dns-json

{"Status":0,"TC":false,"RD":true,"RA":true,"AD":true,"CD":false,
 "Question":[{"name":"discord.com","type":1}],
 "Answer":[{"name":"discord.com","type":1,"TTL":61,"data":"162.159.138.232"},
           {"name":"discord.com","type":1,"TTL":61,"data":"162.159.128.233"},
           ...3 more...]}

Next, compare the address with Cloudflare’s official list. On 25.10.2026 https://www.cloudflare.com/ips-v4 listed 15 IPv4 ranges, including 162.158.0.0/15 and 104.16.0.0/13. 162.159.135.232 falls into the first (162.158.0.0-162.159.255.255), 104.17.135.117 into the second (104.16.0.0-104.23.255.255). RDAP confirms both blocks are registered to Cloudflare, Inc. So we are looking at a Cloudflare edge, and the real server sits behind it. What Cloudflare changes for a site owner is covered in our Cloudflare setup guide.

Several A records: round robin

discord.com returned five addresses, amazon.com three. The resolver returns the whole set; a client usually takes the first address and tries the next one on failure. Google and Cloudflare returned them in different order, and the order changes between queries, so two people can connect to different IPs of the same site. Note the TTL too: Google showed 300 seconds for discord.com, Cloudflare 77. That is not a different setting, just the time left in each resolver’s cache.

A CNAME chain to a CDN

www.microsoft.com has no A record of its own: two CNAMEs lead into Akamai’s network. www.apple.com works the same way: www-apple-com.v.aaplimg.com → www.apple.com.edgekey.net → e6858.dsce9.akamaiedge.net, ending at 23.220.112.242 via Google and 23.197.161.53 via Cloudflare. If the chain contains edgekey.net, akamaiedge.net, cloudfront.net or fastly.net, the final IP belongs to a CDN. The TTL of the last link was only 4-20 seconds: the CDN keeps moving visitors between edges.

Different resolvers and EDNS Client Subnet

Google Public DNS lets you pass a client subnet with the edns_client_subnet parameter, and the authoritative server picks the nearest edge. For google.com, four subnets produced four different address sets:

Client subnet (ECS) Owner per RDAP google.com addresses
46.219.0.0/24 o3_kyiv, UA 6 addresses in 74.125.21.0/24
91.198.174.0/24 WIKIMEDIA-EU-NET, NL 6 addresses in 142.250.105.0/24
8.8.8.0/24 GOGL, Google LLC 6 addresses in 192.178.130.0/24
1.1.1.0/24 APNIC-LABS, AU 6 addresses in 172.253.124.0/24
GET https://dns.google/resolve?name=google.com&type=A&edns_client_subnet=46.219.0.0/24

{"Status":0,
 "Answer":[{"name":"google.com.","type":1,"TTL":300,"data":"74.125.21.102"},
           {"name":"google.com.","type":1,"TTL":300,"data":"74.125.21.113"}, ...],
 "edns_client_subnet":"46.219.0.0/24",
 "Comment":"Response from 216.239.36.10."}

For www.microsoft.com, Google returned 2.19.217.218 for every subnet, while Cloudflare DNS returned 23.197.162.102: the edge was chosen by the resolver’s own location. The practical takeaway: a large site has no single “IP”, so when you compare resolvers after a DNS change, allow for the CDN. If the change involved new nameservers, see how to change domain nameservers.

Who owns an IP: RDAP instead of WHOIS

RDAP is the modern replacement for WHOIS for IP addresses and domains: answers come as JSON instead of free text. rdap.org finds the right registry using the IANA bootstrap list (data.iana.org/rdap/ipv4.json). On 25.10.2026 that list sent 98/8, 104/8, 140/8 and 162/8 to ARIN, and 2/8 and 185/8 to RIPE NCC, the registry for Europe including Ukraine. Shortened answer for 162.159.135.232:

GET https://rdap.org/ip/162.159.135.232   (redirected to rdap.arin.net)

{"objectClassName":"ip network",
 "handle":"NET-162-158-0-0-1",
 "startAddress":"162.158.0.0", "endAddress":"162.159.255.255",
 "ipVersion":"v4", "name":"CLOUDFLARENET", "type":"DIRECT ALLOCATION",
 "cidr0_cidrs":[{"v4prefix":"162.158.0.0","length":15}],
 "entities":[{"handle":"CLOUD14","roles":["registrant"],
   "vcardArray":["vcard",[["fn",{},"text","Cloudflare, Inc."], ...]]}, ...],
 "port43":"whois.arin.net"}

For 185.15.59.224 (wikipedia.org) RIPE NCC answered: network Wikimedia-esams-infra, type ASSIGNED PA, country NL. For 150.171.109.34 (microsoft.com) the IANA list points to APNIC, but rdap.org followed the redirects and got the answer from ARIN, owner Microsoft Corporation. European records may list individual contacts under entities; you don’t need them to identify a host, the network name and owning organisation are enough. To look up a domain rather than an address, see our WHOIS domain lookup guide.

What an IP won’t tell you: shared hosting, PTR and CDNs

Comparison of what IP, PTR and RDAP reveal for an own server, shared hosting and a site behind a CDN
What an IP address can tell you depending on where the site runs

One IP can serve many sites. On 25.10.2026 wikipedia.org, wiktionary.org, wikimedia.org, mediawiki.org and wikidata.org all pointed to 185.15.59.224. Shared hosting works the same way: the server tells sites apart by the domain in the request (SNI for HTTPS), so you can’t open such a site “by IP”.

A reverse PTR record also names a server or network node, not the site. Here is what PTR lookups returned for the addresses above:

185.15.59.224    → text-lb.esams.wikimedia.org.                        (load balancer)
140.82.121.3     → lb-140-82-121-3-fra.github.com.                     (load balancer, "fra" = Frankfurt)
2.19.217.218     → a2-19-217-218.deploy.static.akamaitechnologies.com. (Akamai edge)
98.87.170.71     → ec2-98-87-170-71.compute-1.amazonaws.com.           (AWS instance)
162.159.135.232  → Status 3 (NXDOMAIN), no PTR                        (Cloudflare)

None of them contains “wikipedia.org” or “amazon.com”. For a site on shared hosting the PTR usually looks like server17.hosting.example: it tells you the host, but not the neighbours. Behind a CDN you only see the edge; the owner finds the real server address in the CDN or hosting panel. Typical origin leaks: unproxied subdomains (ftp, control panel) on the same IP and an MX record pointing to the same server.

Commands tested on the bench

The first bench finding is worth noting: the container’s system resolver answered NXDOMAIN for every external domain because outbound access is closed. If dig suddenly “can’t find” even google.com, check the SERVER line and your network, not the domain:

$ dig wikipedia.org | grep -E "status|SERVER"
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10542
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)

So we ran BIND on 127.0.0.1, port 5329, with a test zone bench.test: a site and a “neighbour” on one IP, three A records, a CNAME chain “to a CDN” and a hosting server PTR.

dig: full answer and short forms

$ dig @127.0.0.1 -p 5329 bench.test A
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43833
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; ANSWER SECTION:
bench.test.		300	IN	A	203.0.113.10
;; Query time: 0 msec
;; SERVER: 127.0.0.1#5329(127.0.0.1) (UDP)

$ dig @127.0.0.1 -p 5329 +short bench.test AAAA
2001:db8:10::10

$ dig @127.0.0.1 -p 5329 rr.bench.test +noall +answer
rr.bench.test.		60	IN	A	203.0.113.22
rr.bench.test.		60	IN	A	203.0.113.21
rr.bench.test.		60	IN	A	203.0.113.23
$ dig @127.0.0.1 -p 5329 rr.bench.test +noall +answer   # repeated query
rr.bench.test.		60	IN	A	203.0.113.21
rr.bench.test.		60	IN	A	203.0.113.22
rr.bench.test.		60	IN	A	203.0.113.23

$ dig @127.0.0.1 -p 5329 shop.bench.test +noall +answer
shop.bench.test.	300	IN	CNAME	shop.cdn-edge.bench.test.
shop.cdn-edge.bench.test. 300	IN	CNAME	e42.edge.bench.test.
e42.edge.bench.test.	20	IN	A	203.0.113.50

$ dig @127.0.0.1 -p 5329 -x 203.0.113.10 +short
server17.hosting.bench.test.
$ dig @127.0.0.1 -p 5329 +short site2.bench.test
203.0.113.10

The aa flag means the zone’s authoritative server answered, not a cache. The round robin order changed between the two queries. The last two commands mimic shared hosting: bench.test and site2.bench.test on one IP, and that IP’s PTR names the server. In real life replace @127.0.0.1 -p 5329 with @8.8.8.8, @1.1.1.1 or your domain’s nameserver. If the domain has an AAAA record, check it too: some visitors will connect over IPv6.

host, nslookup and getent

$ host -p 5329 bench.test 127.0.0.1
bench.test has address 203.0.113.10
bench.test has IPv6 address 2001:db8:10::10
bench.test mail is handled by 10 mail.bench.test.

$ host -p 5329 203.0.113.10 127.0.0.1
10.113.0.203.in-addr.arpa domain name pointer server17.hosting.bench.test.

$ nslookup -port=5329 shop.bench.test 127.0.0.1
shop.bench.test	canonical name = shop.cdn-edge.bench.test.
shop.cdn-edge.bench.test	canonical name = e42.edge.bench.test.
Name:	e42.edge.bench.test
Address: 203.0.113.50

$ getent ahosts localhost
127.0.0.1       STREAM localhost
$ getent ahosts wikipedia.org; echo "rc=$?"
rc=2

host shows A, AAAA and MX in one call and does a PTR lookup when given an IP. getent ahosts is different: it uses the same path as programs on the server, /etc/hosts first, then DNS. That is why localhost resolved and wikipedia.org did not without working DNS (exit code 2). When PHP or cron on a server “can’t see” a domain, check getent, not dig.

curl -v: which IP the client connected to

$ curl -sv -o /dev/null http://127.0.0.1:8080/
*   Trying 127.0.0.1:8080...
* Connected to 127.0.0.1 (127.0.0.1) port 8080
< HTTP/1.1 200 OK
< Server: nginx/1.24.0 (Ubuntu)

$ curl -sv -o /dev/null --resolve bench.test:8080:127.0.0.1 http://bench.test:8080/
* Added bench.test:8080:127.0.0.1 to DNS cache
* Connected to bench.test (127.0.0.1) port 8080
< HTTP/1.1 200 OK

$ curl -s -o /dev/null -w "%{remote_ip}:%{remote_port} %{http_code}\n" http://localhost:8080/
127.0.0.1:8080 200

$ curl -sv -o /dev/null https://wikipedia.org/
* Uses proxy env variable https_proxy == 'http://127.0.0.1:39929'
* Connected to 127.0.0.1 (127.0.0.1) port 39929
> CONNECT wikipedia.org:443 HTTP/1.1

The Connected to ... (IP) line is the address the connection was actually made to. --resolve lets you test a site on a new server before changing DNS, which is handy during a hosting migration. The last example is a trap: with a proxy set, curl shows the proxy’s address, not the site’s.

ping and traceroute

$ ping -c 3 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
3 packets transmitted, 3 received, 0% packet loss, time 2049ms
rtt min/avg/max/mdev = 0.035/0.036/0.039/0.002 ms

$ ping -c 2 -W 2 203.0.113.10
2 packets transmitted, 0 received, 100% packet loss, time 1022ms

$ ping -c 1 wikipedia.org
ping: wikipedia.org: Name or service not known

$ traceroute -n -m 4 -w 1 -q 1 203.0.113.10
 1  192.0.2.1  0.235 ms
 2  21.4.1.139  0.196 ms
 3  *
 4  *

ping prints the IP in its first line, but 100% loss does not mean the site is down: firewalls often block ICMP while the web server keeps answering. traceroute shows the path to the address; asterisks are hops that don’t reply. Both are secondary for finding an IP; to check a site, curl -v is better.

Windows and macOS (not run on the bench)

  • Windows, cmd: nslookup example.com 8.8.8.8, nslookup -type=AAAA example.com, ping example.com, tracert example.com, flush the cache with ipconfig /flushdns.
  • Windows, PowerShell: Resolve-DnsName example.com -Type A and Test-NetConnection example.com -Port 443 (fields RemoteAddress and TcpTestSucceeded).
  • macOS: dig, host and nslookup ship with the system; dscacheutil -q host -a name example.com shows what the system resolver sees, including cache and /etc/hosts.

Browser: DevTools

Open DevTools (F12), go to the Network tab, reload the page and select the first request. Under Headers, Remote Address shows the IP and port your browser actually connected to, after cache and the hosts file. Through a VPN or proxy you will see the proxy’s address, as in the curl example above.

Decision table: which command to use

You need to Command or service What you will see
Set up DNS and verify a record dig +short domain A and AAAA, then dig @nameserver domain the IP from your hosting panel; if the authoritative NS answers differently, the record wasn’t saved or NS isn’t delegated
Test a migration before changing DNS curl -v --resolve domain:443:NEW_IP https://domain/ or a hosts entry Connected to domain (new IP) and status 200
Check whether propagation is done dig @8.8.8.8, dig @1.1.1.1, DoH dns.google and cloudflare-dns.com the same IP everywhere; the old address lasts until its TTL expires (behind a CDN different IPs are normal)
Find a site’s host dig + rdap.org/ip/IP + PTR (dig -x IP) the block owner and server name; behind a CDN only the CDN
Block or allow an address A and AAAA + RDAP for the range the whole block; don’t block CDN or shared-hosting IPs, you’d hit other sites, use a domain-based rule
See where the browser connected DevTools → Network → Remote Address IP:port of the connection (with a VPN, the proxy’s address)

FAQ

Why do I and a colleague see different IPs for the same site?

The site is behind a CDN or has several A records: in our check google.com returned four different address sets for four client subnets. Without a CDN, DNS was probably just changed and someone still has the old address cached.

Can I find all sites on a server by its IP?

Not reliably. PTR gives one server name, and reverse IP services only list domains they have seen before. For example, at least five Wikimedia projects run on 185.15.59.224, while its PTR names a load balancer.

How do I find the real IP of a site behind Cloudflare?

The owner sees it in Cloudflare’s DNS records or the hosting panel. An outside visitor has no reliable legitimate way, and that is intended: it protects the origin from attacks that bypass the CDN.

Why use RDAP instead of WHOIS for IPs?

RDAP returns structured JSON with the same fields across registries (startAddress, endAddress, name, entities), works over HTTPS and redirects to the right registry by itself.

If you need your own site’s IP on shared hosting, the hosting control panel usually shows it in the domain settings. You can compare options on the RichHost shared hosting plans page: NVMe disks, free Let’s Encrypt SSL and servers in Europe and the USA.

More on this topic

All articles
Domain Expired: What to Do and How to Recover It in Time
Domains and DNS29.11.2026

Domain Expired: What to Do and How to Recover It in Time

How many days you have after a .com or .ua domain expires under ICANN and Hostmaster rules, what breaks first, real RDAP…

.tech Domain Registration: $88 a Year at RichHost
Domains and DNS22.11.2026

.tech Domain Registration: $88 a Year at RichHost

Register a .tech domain at RichHost for $88 a year, renewal at the same price. Registry facts checked with Radix and IANA:…

.cc Domain Registration: $31.90 a Year at RichHost
Domains and DNS22.11.2026

.cc Domain Registration: $31.90 a Year at RichHost

Register a .cc domain at RichHost for $31.90 a year, renewal at the same price, $30.80 transfer. Registry facts checked with Verisign…