Networking
How to Find a Website's IP Address
Networking · 4 min read · Updated October 17, 2026
To find a website's IP address, look up the domain in DNS. The fastest way is an online DNS lookup tool, or the nslookup command on your computer. Type the domain name and you get its IP address in seconds.
Every website lives at an IP address, which is the number computers actually use to reach it. The domain name is the friendly label, and DNS servers translate it into the real address behind the scenes.
Use an online DNS lookup tool
Search for a free DNS lookup tool and enter the domain name, for example example.com. The tool queries public DNS records and shows the A record, which is the IPv4 address, and the AAAA record if the site uses IPv6.
This method needs no software and works on phones and tablets too. It is the easiest option if you are not comfortable with the command line.
Find a website's IP with nslookup
On Windows, open Command Prompt and type nslookup example.com, then press Enter. The answer section shows the site's IP address. On Mac or Linux, open Terminal and run the same command, or use dig example.com for a more detailed result.
nslookup asks your configured DNS server for the answer, so the result is whatever address your provider sees. That is usually the same as anyone else's, but not always.
Use ping for a quick check
You can also run ping example.com. The first line of output shows the IP address it resolved before sending test packets. Then press Ctrl+C to stop it. Ping is really a network testing tool, so treat it as a shortcut rather than a proper lookup.
If the site blocks ping requests, you get timeouts but you still see the IP address in the first line. The command works on Windows, Mac, and Linux with the same basic syntax.
Why some websites hide their real IP address
For big sites, the IP you find is often a CDN edge server, not the actual web server. Services like Cloudflare sit in front of the site and answer for it, so the lookup returns the CDN's address and the true origin server stays hidden. That is by design, it protects the site from direct attacks.
Smaller sites on shared hosting also share one IP address across many domains, so knowing the IP tells you little about which site you are looking at. If you need the actual server for troubleshooting, this is the point where you contact the site owner or their host.
Frequently asked questions
Is it legal to find a website's IP address?
Yes. A website's IP address is public information published in DNS records. Looking it up is no different from looking up a phone number in a directory.
Why does a website show a different IP for me and my friend?
Large sites use CDNs with servers all over the world, so DNS points each visitor to the nearest edge server. You and your friend can get different, equally correct answers.
Can I find the real IP of a site behind Cloudflare?
Not from DNS alone. Cloudflare's edge IP is the only address published, and the origin server is hidden on purpose. Old records or misconfigured subdomains sometimes leak it, but that is rare and not something to rely on.
What is the difference between the IP address and the domain name?
The IP address is the numeric address computers use to connect, while the domain name is the human-readable label. They are tied together by DNS, similar to how [public and private IP addresses](/guides/public-vs-private-ip-address) are tied to devices rather than names.
Can a website's IP address change?
Yes. Sites change IPs when they move hosts, switch CDN providers, or scale up. That is why an IP you looked up months ago may no longer work. If you need a stable address for firewall rules, ask the site owner for their current range.
Does finding a website's IP tell me where it is hosted?
Roughly. You can paste the IP into our homepage tool or an IP geolocation lookup to see the city and network owner. For CDN-backed sites this shows the edge location, not the real data center. Learn more in our guide to [how accurate IP location is](/guides/how-accurate-is-ip-location).