How to find a website's IP address
A website's IP address is the numerical identifier that points your browser to the actual server where the site lives. You can find it using free command-line tools built into Windows, Mac, and Linux, or through online lookup services that do the work for you. The method you choose depends on whether you want a quick answer or more detailed information about the server.
The most direct approach is to use a tool called nslookup (on Windows) or dig (on Mac and Linux), which query the domain name system and return the IP address in seconds. If you prefer not to open a terminal, websites like MXToolbox, DNSChecker, and WHOIS lookup services will show you the same information through a web form.
Key Takeaways
- Windows users can open Command Prompt and type nslookup example.com to see a website's IP address instantly.
- Mac and Linux users can open Terminal and type dig example.com to retrieve the same information.
- Online tools like MXToolbox and DNSChecker let you look up an IP address without using the command line.
- A single domain name can point to multiple IP addresses if the site uses load balancing or a content delivery network.
- Finding a website's IP address is legal and commonly done for troubleshooting, security research, and network administration.
Using Command Prompt on Windows
Open Command Prompt by pressing Windows key + R, typing cmd, and pressing Enter. Once the black window opens, type nslookup example.com (replacing "example.com" with the actual domain) and press Enter. Within a second or two, you will see the IP address listed next to "Address:".
If you want more detailed information, you can add flags to the command. Typing nslookup -type=A example.com shows only the main IP address, while nslookup -type=MX example.com shows the mail server addresses. For most purposes, the basic nslookup example.com command gives you everything you need.
Using Terminal on Mac and Linux
Open Terminal (on Mac, search for it in Spotlight; on Linux, use Ctrl + Alt + T or open it from your applications menu). Type dig example.com and press Enter. The output will show the IP address in the "ANSWER SECTION" of the results, listed as the "A" record.
The dig command returns more information than nslookup, including the time it took to resolve the domain and details about which nameserver answered the query. If you want a simpler output, you can type dig example.com +short to see only the IP address itself. Both commands work identically on Mac and Linux systems.
Online lookup tools for quick results
If you do not want to use the command line, MXToolbox (mxtoolbox.com), DNSChecker (dnschecker.org), and WHOIS lookup sites will show you a website's IP address through a simple web form. Type the domain name into the search box, click the button, and the tool displays the IP address within seconds. These services are free and require no account or software installation.
Online tools are useful when you are on a computer where you cannot or do not want to open a terminal, or when you need additional information like the nameservers, mail server addresses, or WHOIS registration details all in one place. The downside is that you are sending the domain name to a third-party website, though this is a normal part of how DNS lookups work anyway.
Understanding what you see in the results
When you run a lookup, you will see an IP address in the format of four numbers separated by periods, like 192.0.2.1. This is called an IPv4 address. Some results also show an IPv6 address, which looks like a longer string of numbers and letters separated by colons (for example, 2001:db8::1). Both point to the same website; IPv6 is simply a newer format that allows for many more addresses.
If a domain returns multiple IP addresses, that usually means the website uses load balancing (spreading traffic across several servers) or a content delivery network (CDN) that caches the site on servers around the world. When you visit the site, your browser connects to one of these addresses, often the one geographically closest to you. This is normal and does not indicate a problem.
Why you might want to find a website's IP address
System administrators use IP lookups to troubleshoot connection problems, verify that a domain points to the correct server, or check whether a site has moved to a new host. Security researchers and IT professionals look up IP addresses to investigate suspicious websites or understand the infrastructure behind a service. Website owners use these tools to confirm their DNS records are configured correctly after a migration or update.
Finding a website's IP address is a standard, legal practice. It is the same information your browser retrieves every time you visit a site, and it is publicly available by design — that is how the internet routes traffic to the right place. There is no risk to you in performing a lookup, and it does not alert the website owner that you have done so.
Frequently Asked Questions
Can I find the IP address of a website that is blocked or down?
Yes. The IP address is stored in the domain name system independently of whether the website is currently running. If the site is down, the IP address still exists and you can still look it up. However, you will not be able to visit the site itself until the server comes back online.
Does looking up a website's IP address show me who owns it?
Not directly. The IP address tells you which server hosts the site, but not who registered the domain. To find ownership information, you need to run a WHOIS lookup on the domain name itself, not the IP address. Many online tools offer both lookups in one place.
Why does a website have more than one IP address?
Websites with heavy traffic often use multiple servers to handle requests. A content delivery network (CDN) like Cloudflare or Akamai also assigns different IP addresses depending on where you are located, so your browser connects to a server near you. This improves speed and reliability.
Is it safe to visit a website if I know its IP address?
Knowing the IP address does not make a site safer or more dangerous. You can type an IP address directly into your browser's address bar (like 192.0.2.1) instead of a domain name, but this bypasses some security checks and is rarely necessary. Stick to visiting sites through their domain names.