How to Find the IP Address of a Website (CMD, Terminal, Browser, Online)

To find a website’s IP address, look up its A record (IPv4) and AAAA record (IPv6). Online, enter the domain in our DNS Lookup. On Windows, run nslookup example.com in Command Prompt; on macOS and Linux, run dig +short example.com. Keep in mind that many sites sit behind a CDN or proxy such as Cloudflare, so the address you see belongs to the CDN, not to the server where the site actually runs.

Online

Our DNS Lookup queries public resolvers and shows the A, AAAA, CNAME and other records. To see where an address is located and which network owns it, paste it into IP Location or ASN Lookup.

On Windows (Command Prompt or PowerShell)

nslookup example.com
ping -4 example.com
Resolve-DnsName example.com -Type A

nslookup prints the addresses under Name / Addresses after a “Non-authoritative answer” line, which simply means the answer came from a resolver’s cache. ping shows the address it uses in the first line, even if the server does not answer pings. Resolve-DnsName is the PowerShell equivalent with cleaner output.

On macOS and Linux

dig +short example.com
dig +short AAAA example.com
host example.com

See how to use dig for more options, such as asking a specific DNS server with dig @1.1.1.1 example.com.

In the browser

Open DevTools (F12) → Network, reload the page and click the first request. The Remote Address field shows the IP and port the browser connected to.

Why you may see several or “wrong” addresses

What you seeReason
Several IP addressesRound-robin DNS or anycast spreads traffic across servers
A different address than a friend seesGeoDNS and CDNs answer with the nearest location
An address belonging to Cloudflare, Akamai, AWS CloudFront…The site is behind a CDN or reverse proxy; the origin server is hidden on purpose
A CNAME instead of an addressThe name points to another name; the resolver follows it to the final A record
An old addressCached DNS; see DNS TTL

Behind a CDN, the real server address is intentionally not published, and tools that reveal it are working against the site owner’s protection. To find out which company hosts a site, see how to find out who hosts a website, and to see which other sites share an address, use Reverse IP Lookup.

Common Questions

Can I visit a website by typing its IP address?

Sometimes. Many servers host several sites on one address and choose the site by its name, and HTTPS certificates are issued for names, so typing the IP often shows a default page or a certificate warning.

Is a website's IP address the same for everyone?

Not always. Large sites and CDNs answer with different addresses depending on your location and network.

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

It is not published by design. The DNS records point to Cloudflare, which forwards traffic to the hidden origin server.

What is the difference between the A and AAAA record?

The A record holds an IPv4 address such as 203.0.113.10; the AAAA record holds an IPv6 address such as 2001:db8::10. Many sites publish both.

Link to or cite this page

Found this useful? You are welcome to link to it from your website, documentation, course material or forum answers.

HTML link <a href="https://ipdnshub.com/resources/how-to-find-the-ip-address-of-a-website">How to Find the IP Address of a Website (CMD, Terminal, Browser, Online) – IP DNS Hub</a>
Citation "How to Find the IP Address of a Website (CMD, Terminal, Browser, Online)." IP DNS Hub. https://ipdnshub.com/resources/how-to-find-the-ip-address-of-a-website