Finding a website's IP address in three steps

A website's IP address is the numerical location where its files live on the internet. You can find it using a command-line tool on Windows or Mac, a free online lookup service, or your browser's developer tools. The fastest method depends on what device you're using and whether you want to see other details about the site at the same time.

Most people never need to know a website's IP address — your browser finds it automatically when you type a domain name. But if you're troubleshooting network problems, checking whether two sites share the same server, or learning how the internet works, knowing how to look it up is useful.

Key Takeaways

  • The command line tool nslookup (Windows and Mac) or dig (Mac and Linux) shows a website's IP address in seconds without installing anything.
  • Free online tools like MXToolbox or WhatsMyDNS let you look up any domain from your phone or browser without opening a terminal.
  • Your browser's developer tools can show you the IP address of a site you're already visiting by inspecting the network activity.
  • A single domain name can point to multiple IP addresses, and one IP address can host hundreds of websites, so the IP alone doesn't tell you everything.

Using the command line on Windows

The fastest way on Windows is to use nslookup, a tool built into every Windows computer. Open the Start menu, type cmd, and press Enter to open Command Prompt. Type nslookup example.com (replace example.com with the domain you want to check) and press Enter.

The tool will return several lines of information. Look for the line that says "Address:" — that's the IP address. It will look like four numbers separated by dots, such as 93.184.216.34. Some domains return multiple addresses because they use load balancing to spread traffic across several servers.

If you see a "server can't find" message, check that you typed the domain correctly and that your internet connection is working. The command works the same way whether you're checking a major site or a small business website.

Using the command line on Mac or Linux

Mac and Linux computers have dig, which works similarly to nslookup but shows more detail. Open Terminal (on Mac, search for Terminal in Spotlight; on Linux, open your terminal process). Type dig example.com and press Enter.

Look for the section labeled "ANSWER SECTION" — the IP address appears in the rightmost column of that section. The format is the same as Windows: four numbers separated by dots. If you prefer nslookup, it works on Mac too — just type nslookup example.com the same way you would on Windows.

Both tools are fast and don't require you to visit a website or install anything. They also show you the name servers that handle the domain, which is useful if you're troubleshooting DNS problems on your home network.

Using free online lookup tools

If you don't want to open a terminal, websites like MXToolbox, WhatsMyDNS, and IPQualityScore let you type a domain name and see its IP address when ready. These tools work on any device — phone, tablet, or computer — and don't require you to install anything.

Go to one of these sites, paste the domain name into the search box, and click the lookup button. The IP address appears within seconds, usually along with other information like the country where the server is located and whether the domain is flagged for spam or malware. This method is slower than the command line but easier if you're not comfortable using a terminal.

These services are free and don't require you to create an account. Some offer additional paid features like historical IP data or bulk lookups, but the basic lookup is always free.

Checking IP addresses in your browser

If you're already visiting a website and want to see what IP address it's using, you can check your browser's network activity. Open the website, then press F12 (Windows) or Command+Option+I (Mac) to open Developer Tools. Click the "Network" tab.

Reload the page. You'll see a list of requests — the first one is usually the main page. Click on it, then look for a "Remote Address" or "IP Address" field in the details panel on the right. That's the IP address the browser connected to.

This method only works for sites you're actively visiting, and it shows you the IP address at that exact moment. If a site uses a content delivery network (CDN), the IP address you see may be from the CDN's server rather than the website's main server, so it won't always match what nslookup returns.

Understanding what the IP address tells you

A website's IP address is useful for troubleshooting, but it has limits. One domain can point to multiple IP addresses if the site uses load balancing or a CDN. One IP address can also host hundreds of websites, especially on shared hosting plans, so knowing the IP doesn't tell you who owns the server.

If you're checking whether two websites are hosted on the same server, comparing their IP addresses is a quick way to find out. If they match, they're on the same machine. If they're different, they could still be owned by the same company but hosted separately, or they could be completely unrelated.

The IP address also tells you the general location of the server — you can use a geolocation tool to see what country or city it's in. This is useful if you're checking whether a site's server is where you expect it to be, but it's not precise enough to pinpoint a physical address.

Troubleshooting when the lookup fails

If nslookup, dig, or an online tool returns an error, the most common cause is a typo in the domain name. Double-check that you've spelled it correctly, including any hyphens or numbers. Domain names are case-insensitive, so capitalization doesn't matter.

If the domain is spelled correctly but still returns an error, the domain may not exist, may have expired, or may not be set up with DNS records yet. Try visiting the website in your browser — if the browser can't find it either, the domain itself is the problem, not your lookup tool.

If the browser can reach the site but your lookup tool can't find the IP, your internet connection may be blocking DNS queries. This sometimes happens on public WiFi networks or corporate networks with strict filtering. Try the lookup again on a different network, or use an online tool instead of the command line.

Frequently Asked Questions

Can I find the IP address of a website that's behind a proxy or VPN?

No. When a site uses a proxy or VPN, the IP address you find belongs to the proxy server, not the website's actual location. This is intentional — the proxy hides the real server. You can only see the proxy's IP address.

Is it illegal to look up a website's IP address?

No. IP addresses are public information — they have to be, or the internet wouldn't work. Looking up an IP address is no different from looking up a street address. Using that information to attack or interfere with a server is illegal, but the lookup itself is not.

Why do some websites have multiple IP addresses?

Websites with high traffic often use load balancing, which spreads requests across multiple servers. Each server has its own IP address. When you look up the domain, you might get one of several addresses depending on which server responds first. This improves speed and reliability.

What's the difference between IPv4 and IPv6 addresses?

IPv4 addresses use four numbers (like 93.184.216.34), while IPv6 addresses use longer strings with letters and colons (like 2606:2800:220:1:248:1893:25c8:1946). IPv6 is newer and provides more addresses. Most websites still use IPv4, but IPv6 is becoming more common.

Can I use a website's IP address to visit it instead of typing the domain name?

Yes, you can type an IP address directly into your browser's address bar. However, this doesn't work well for sites hosted on shared servers, because the server needs the domain name to know which website to show you. It works best for sites with their own dedicated server.