The quickest way to find a website's IP address
The fastest method is to use your computer's built-in command line tool. On Windows, open Command Prompt and type nslookup example.com (replace example.com with the actual domain). On Mac or Linux, open Terminal and type dig example.com or nslookup example.com. Within seconds, you'll see the IP address listed in the results — usually labeled as "Address" or under the answer section.
If you prefer not to use the command line, several free websites do this lookup for you. Go to a DNS lookup tool like MXToolbox, DNSChecker, or What Is My IP Address, type in the domain name, and click the search button. The site returns the IP address instantly, along with other technical details about the domain.
Both methods work because they query the Domain Name System (DNS), which is essentially a directory that translates human-readable domain names into the numerical IP addresses that computers actually use to find websites on the internet.
Key Takeaways
- Windows users can open Command Prompt and type nslookup example.com to see a website's IP address in seconds.
- Mac and Linux users can use Terminal with the dig or nslookup command to retrieve the same information.
- Free online DNS lookup tools like MXToolbox or DNSChecker work from any device without installing software.
- A single domain can point to multiple IP addresses, especially if the website uses a content delivery network or load balancing.
- The IP address you find is the address of the web server hosting the site, not the location of the website owner.
Using Command Prompt on Windows
Open the Start menu and search for "Command Prompt" or "cmd". Click to open it. At the blinking cursor, type nslookup google.com (or any domain you want to look up) and press Enter. The tool queries DNS servers and returns results within a second or two.
Look for the line that says "Address:" — this is the IP address. You may see multiple addresses if the domain uses multiple servers. The results also show which DNS server answered your query, though that's usually not important for this task.
If you want to look up many domains at once, you can type each nslookup command one after another in the same window. Type exit when you're done to close Command Prompt.
Using Terminal on Mac and Linux
Open Terminal (on Mac, search for it in Spotlight; on Linux, right-click the desktop or use your application menu). Type dig example.com and press Enter. The dig command is more detailed than nslookup and shows the IP address in the "ANSWER SECTION" of the output.
If dig is not installed on your system, use nslookup example.com instead — it works the same way as on Windows. Look for the line labeled "Address" to find the IP.
Both commands work instantly on any internet connection. You can also add +short to the dig command — type dig example.com +short — to see only the IP address without extra details.
Free online lookup tools
If you don't want to use the command line, open a web browser and go to MXToolbox.com, DNSChecker.org, or WhatIsMyIPAddress.com. Each site has a search box where you type the domain name. Click the button to look it up, and the site displays the IP address within a few seconds.
These tools often show additional information like the hosting provider, the country where the server is located, and whether the domain uses a content delivery network. This extra context can be useful if you're troubleshooting network issues or researching a website's infrastructure.
No account is required, and these lookups are free. The sites make money from ads, not from charging users. You can perform as many lookups as you want without restriction.
Why a domain might have multiple IP addresses
Large websites often point to more than one IP address. This happens when a site uses load balancing — spreading traffic across several servers so no single server gets overwhelmed. When you visit the site, your request goes to one of these servers, chosen automatically.
Another reason is content delivery networks (CDNs) like Cloudflare or Akamai. These services cache website content on servers around the world, so users download from a server near them rather than from the original server far away. When you look up the domain, you see the CDN's IP address, not the original hosting server's address.
If your lookup shows multiple addresses, that's normal and expected. Each one is valid and points to the same website.
What the IP address tells you and what it doesn't
The IP address you find is the address of the web server hosting the website. It tells you where the server is physically located (roughly — usually to the city or region level) and which company operates it. This information is public and available to anyone who looks it up.
The IP address does not tell you who owns the website or where the website owner lives. A person in New York can host their website on a server in Germany. The domain's registration information (the owner's name and address) is separate from the IP address and is stored in a different system called WHOIS.
If you need to know who registered a domain, you would look up the WHOIS record instead. If you need to know where the server is located, the IP address is what you want.
Frequently Asked Questions
Can I find the IP address of a website that's behind Cloudflare or another proxy?
When you look up the domain, you see Cloudflare's IP address, not the original server's address. That's by design — Cloudflare hides the origin server to protect it from attacks. If you need the original server's IP for legitimate reasons, you would contact the website owner directly and ask them.
Is it legal to look up a website's IP address?
Yes. IP addresses are public information. Looking up a domain's IP address is no different from looking up a business's street address in a phone book. It's the next step — using that information to attack the server or access it without permission — that would be illegal.
Why does the IP address sometimes change when I look it up again?
Websites using load balancing or CDNs may return different IP addresses on different lookups, or your DNS server may cache the result and return a slightly different address the next time. This is normal. The domain still points to the same website; the routing just changes based on traffic and server availability.
What's the difference between nslookup and dig?
Both tools query DNS and return IP addresses. dig shows more detailed information and is preferred by network administrators. nslookup is simpler and works on all operating systems. For finding an IP address, either one works fine.
Can I find the IP address of a website that requires a login?
Yes. The IP address is public information stored in DNS, separate from the website's login system. You don't need to log in to find it — the command line tools and online lookup sites work on any domain, whether it's public or password-protected.