Free to explore: filter winning sites by DR, traffic and niche  ·  Try the live explorer →

How to find a website IP address (and why)

A command prompt on a laptop

If you want to know how to find a website’s IP address, the quick answer takes ten seconds. Open a terminal, run one DNS lookup and read the address it returns. The useful answer takes a little longer, because the address you get back is often not the one you expected. It may be one of several, it may be a CDN’s, and running the lookup in reverse rarely tells you which website lives at an address.

This post covers the command first, then what the result means, then why you would want it at all: checking a host, confirming a migration, allowing an address through a firewall or working out why a site is down.

How to find a website’s IP address with cmd

On Windows, the tool is nslookup. Microsoft Learn describes it as a command that “Displays information that you can use to diagnose Domain Name System (DNS) infrastructure,” and lists it for Windows 10, Windows 11 and Windows Server. Open Command Prompt and type:

In this one-line, noninteractive form, “the first command line parameter is the name or IP address of the computer that you want to look up.” You can add a second argument naming a DNS server to ask; “If you omit the second argument, nslookup uses the default DNS name server.” The output names the server that answered, then lists the address or addresses for the domain. Those address lines are your answer.

Other tools such as dig and ping are often mentioned for this job, and other operating systems have their own terminals. This post sticks to nslookup on Windows, because that is the command documented here. Swap in any domain you like for example.com; the steps don’t change. If you want to compare answers, run it again with a second DNS server named as the second argument.

Network cables in a switch

What you are actually looking up: the A record

The lookup asks DNS for the domain’s A record. Cloudflare’s Learning Center explains it in “What is a DNS A record?”: “The ‘A’ stands for ‘address’ and this is the most fundamental type of DNS record: it indicates the IP address of a given domain.” Its main use is exactly this: “matching a domain name … to an IPv4 address.” Your browser does the same thing every time it loads a page, “by sending a query to a DNS resolver.”

An IPv4 address is, in Cloudflare’s words, “four sets of numbers separated by dots, for example: ‘192.0.2.1’”. IPv6 uses “sets of numbers and letters separated by single or double colons”. The two live in different records: “A records only hold IPv4 addresses. If a website has an IPv6 address, it will instead use an ‘AAAA’ record.” So a lookup may show both kinds.

A server rack

Why the answer may surprise you

Four things make the result harder to read than it looks.

Several addresses

“The vast majority of websites only have one A record, but it is possible to have several,” Cloudflare says. “Some higher profile websites will have several different A records as part of a technique called round robin load balancing.” If your lookup lists more than one address, none of them is the single “real” one.

A proxy or CDN in front

Many sites sit behind a CDN or reverse proxy. Cloudflare’s page on reverse proxies puts it plainly: “With a reverse proxy in place, a web site or service never needs to reveal the IP address of their origin server(s).” The address you find is then the proxy’s, not the server’s. Our post on CDNs and SEO explains how that setup works.

A DNS settings panel

Addresses change

DNS answers are cached. Cloudflare states that “The default TTL for A records is 14,400 seconds. This means that if an A record gets updated, it takes 240 minutes (14,400 seconds) to take effect.” That is Cloudflare’s stated default, not a universal rule, but it explains why two people can see different answers for a while after a change.

LookupWhat you put inWhat you get backCaveat
A recordA domain nameOne or more IPv4 addressesSeveral records mean load balancing
AAAA recordA domain nameIPv6 addresses, if the site has themKept separate from A records
Site behind a proxyA domain nameThe proxy’s addressThe origin server stays hidden
Reverse lookupAn IP addressA domain name, if a PTR record existsOften fails or returns a host name

How to find a website from an IP address

Going the other way is less reliable. Cloudflare’s “What is reverse DNS?” defines it: “A reverse DNS lookup is a DNS query for the domain name associated with a given IP address.” You can try it with the same tool, nslookup 192.0.2.1, but it depends on a PTR record: “if the server does not have a PTR record, it cannot resolve a reverse lookup.” And “reverse DNS lookups are not universally adopted.”

When a reverse lookup does work, it often returns a host name set by whoever runs the server rather than the website you hoped to find. An IP address also won’t tell you who owns a site or where its owner is. For that, our guide on finding who owns a website covers the routes that do work.

A browser address bar

Why you would want a site’s IP address

Checking the host. An address can point you towards the hosting or CDN provider, which is a start when researching a competitor’s setup. Pair it with our guide to finding what technology a website uses, and see whether hosting affects SEO before reading too much into it.

A hosting control panel

Confirming a migration. After moving a site, look the domain up and check it returns the new address. If it still shows the old one, the TTL may not have run out yet. Our site migration checklist covers the rest.

Allow lists and outages. Firewalls and partner systems sometimes need an address to allow. And if a site won’t load, a lookup quickly shows whether DNS answers at all. Self-hosters should note Cloudflare’s warning that home connections often get “a dynamic IP address”, and “A change in IP address can cause their DNS queries to fail”.

A network diagram on a whiteboard

The limitation is worth stating. A lookup shows what DNS says right now, from where you are asking. It can’t reveal an origin server hidden behind a proxy, it won’t name a site’s owner, and it says nothing about a site’s physical location. The result can also change after a TTL expires, so treat any single lookup as a snapshot. For how DNS fits into crawling more broadly, see how search engines work.

Frequently asked questions

How do I find a website’s IP address?

Run nslookup example.com in Command Prompt or a terminal, replacing example.com with the domain. The address lines in the output are the site’s IP addresses.

Why does a website show more than one IP address?

A site can have several A records. Cloudflare notes some higher-profile sites use several as part of round robin load balancing, and IPv6 addresses appear in separate AAAA records.

Can I find a website from its IP address?

Sometimes, with a reverse DNS lookup. It needs a PTR record, which many servers don’t have, and it often returns a host name rather than the website.

Is the IP I find the site’s real server?

Not if the site is behind a CDN or reverse proxy. Then you see the proxy’s address, and the origin server’s address stays hidden.

The takeaway nslookup answers the question in seconds. Read the result knowing it may list several addresses, an IPv6 record or a proxy, and that reverse lookups rarely name a site.