A recursive DNS lookup, one hop at a time
Browser
wants example.com
Resolver
your ISP / 1.1.1.1
Root + TLD
who runs .com?
Authoritative
the real answer
Every hop down this chain is itself a DNS lookup, cached afterward
How to Find the IP Address of a Website or URL (5 Methods)
The IP address of a website is the numeric address its domain name resolves to, and finding it takes seconds. The genuinely useful skill is knowing which address you found — the origin server, a CDN edge node, or a load balancer — because that determines whether the number is any use to you.
Here are five ways to find the IP address of a website or URL, from the fastest to the most detailed, followed by how to interpret the result honestly. If you start from a full URL, use only its hostname, the part between https:// and the first slash.
Method 1: Look up a website's IP address with an online tool
The quickest option, and the only one that needs no terminal. Paste a domain into the domain to IP lookup on the homepage and you get the A records (IPv4), AAAA records (IPv6), nameservers, MX, CNAME, and TXT records in one server-side query.
The advantage over a local command is that the lookup runs from a server with a clean cache, so you are not seeing a stale answer your own machine cached hours ago. If you have several domains to check, the bulk mode resolves up to 50 at once.
Method 2: ping — fast, available everywhere
ping resolves the name before it sends anything, and prints the address it resolved. Works identically on Windows, macOS, and Linux.
ping example.comThe first line shows the resolved address: PING example.com (93.184.216.34). You have what you need — press Ctrl+C to stop.
Method 3: nslookup — the cross-platform standard
Built into Windows, macOS, and most Linux distributions, and designed for exactly this question.
nslookup example.comThe output separates the resolver that answered (Server:) from the answer itself. A line reading Non-authoritative answer simply means it came from a cache rather than the domain's own nameserver — that is the normal case, not a warning.
nslookup example.com 1.1.1.1That second form is genuinely useful when you suspect a stale cache: you are asking Cloudflare's resolver directly instead of whatever your network hands you.
Method 4: dig — the one professionals use
dig ships with macOS and Linux (on Windows, use WSL or install BIND tools). It gives precise, scriptable output including the TTL.
dig +short example.com A
dig +short example.com AAAAdig example.comIn full output, the number in the ANSWER SECTION before IN A is the remaining TTL in seconds — how much longer this resolver will keep reusing its cached copy. Watching that number count down across repeated queries is the clearest way to see caching in action.
dig @ns1.example.com example.comThis skips every cache and asks the source. If this disagrees with what you see elsewhere, you are watching propagation in progress.
Method 5: Browser developer tools
Useful when you want the address actually serving the page you are looking at, including any redirects.
- Open DevTools with
F12(orCmd+Option+Ion macOS) and select the Network tab. - Reload the page.
- Click the first document request, then open the Headers panel.
- Under General, find Remote Address — that is the IP your browser actually connected to, with the port.
Comparing the five methods
| Method | Best for | Shows TTL? | Needs a terminal? |
|---|---|---|---|
| Online tool | All record types at once, clean cache | No | No |
ping | A fast answer anywhere | No | Yes |
nslookup | Querying a specific resolver | Partially | Yes |
dig | Precision and scripting | Yes | Yes |
| DevTools | The address serving this exact page | No | No |
Now — did you find the real server?
Probably not, and that is expected. Most sites of any size sit behind a CDN or load balancer, so the address you resolved belongs to that infrastructure.
Why a lookup shows the CDN, not the origin
Visitor
looks up the domain
CDN edge
104.21.x.x
this is what DNS returns
Origin server
real IP, never exposed
Signs you are looking at shared infrastructure rather than an origin server:
- Reverse DNS on the address resolves to a provider's hostname (
*.cloudflare.com,*.amazonaws.com,*.fastly.net). - The same address serves many unrelated domains.
- You get different addresses from different locations or on repeated queries.
Key takeaway
Any of these five methods gives you the address DNS publishes. That is a real, correct answer — it is just an answer about the domain's public front door, not necessarily the machine behind it.
Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.
Free tools for this topic
Frequently asked questions
Related reading
A recursive DNS lookup, one hop at a time
Browser
wants example.com
Resolver
your ISP / 1.1.1.1
Root + TLD
who runs .com?
Authoritative
the real answer
Every hop down this chain is itself a DNS lookup, cached afterward
How DNS Works: From Domain Name to IP Address
The internet's phone book, traced end to end: what happens in the few milliseconds between typing a domain and the first packet reaching a server.
Why a lookup shows the CDN, not the origin
Visitor
looks up the domain
CDN edge
104.21.x.x
this is what DNS returns
Origin server
real IP, never exposed
Why a CDN Shows Its IP Instead of the Origin Server IP
Looked up a domain and got a Cloudflare address? That is the system working correctly. Here is what sits behind it and why you cannot see through.
The records you will meet in nearly every zone
DNS A Records Explained: How Domains Map to IPv4
The record that actually points your domain at a server — its anatomy, the AAAA counterpart, and the four mistakes that break sites most often.