Why you might need a website's IP address
A website's IP address is the numerical identifier that points your browser to the actual server holding the website's files. Most of the time you never need to know it — you type a domain name like example.com and your computer figures out the rest. But if you're troubleshooting a network problem, checking whether a domain is actually hosted where you think it is, or investigating a suspicious website before you visit it, knowing how to find that IP address is useful.
Finding an IP address is straightforward and takes less than a minute. The method you choose depends on what device you're using and how much detail you want to see.
Key Takeaways
- Every website has an IP address, but you normally don't see it because your computer translates the domain name automatically.
- On Windows, open Command Prompt and type nslookup example.com (replacing example.com with the actual domain) to see the IP address when ready.
- On Mac or Linux, open Terminal and type dig example.com or nslookup example.com to get the same result.
- Online lookup tools like MXToolbox or WHOIS databases work from any device with a browser and show additional information about the domain's registration and hosting.
- A single domain can point to multiple IP addresses, and one IP address can host many websites, so the IP alone doesn't tell you everything.
Finding an IP address on Windows using Command Prompt
Command Prompt is the fastest method on a Windows machine. Press the Windows key, type cmd, and press Enter. A black window opens — this is Command Prompt.
Type this exactly: nslookup example.com (replace example.com with the actual domain you're looking up). Press Enter. Within a second or two, you'll see a block of text. Look for the line that says Address: followed by a series of numbers separated by dots, like 93.184.216.34. That's the IP address.
If you see multiple addresses listed, the domain is pointing to more than one server — this is normal for large websites that spread traffic across several machines. The first one listed is usually the primary address.
Finding an IP address on Mac or Linux using Terminal
On a Mac, press Command + Space, type terminal, and press Enter. On Linux, open Terminal from your applications menu. Either way, you get a text window similar to Windows Command Prompt.
Type dig example.com (replacing example.com with your domain) and press Enter. You'll see a longer output with several sections. Look for the section labeled ANSWER SECTION. The line there will show the domain name, a number (the TTL, which you can ignore), the word A, and then the IP address. For example: example.com. 3599 IN A 93.184.216.34. The IP address is the last number on that line.
If dig doesn't work on your system, try nslookup example.com instead — it works the same way as Windows and produces similar output.
Using an online lookup tool from any device
If you don't want to open a command window, or you're on a phone or tablet, use a web-based lookup tool. MXToolbox (mxtoolbox.com) and WHOIS databases like whois.net are free and require no login. Go to the site, paste the domain name into the search box, and click the button. The IP address appears in seconds.
These tools often show extra information beyond just the IP — things like which company hosts the domain, where the server is located geographically, and whether the domain registration is public or private. This can be useful if you're checking whether a website is hosted where the owner claims it is, or if you're investigating a suspicious site.
One advantage of online tools is that they work the same way on every device. A disadvantage is that you're sending the domain name to a third-party server, which most people don't mind but some prefer to avoid.
Understanding what the IP address tells you
Once you have the IP address, it's important to know what it does and doesn't tell you. The IP address is where the website's files live — it's the address of the server. If you ping that IP address (a network test you can run from Command Prompt or Terminal), you can check whether the server is responding.
But one IP address can host hundreds of websites, especially on shared hosting plans. So knowing the IP doesn't tell you everything about who owns or controls the site. Similarly, one domain can point to multiple IP addresses if the owner uses a content delivery network or load balancer to spread traffic. The IP address is one piece of information, not the whole picture.
If you're trying to figure out whether a website is legitimate, the IP address alone won't answer that. But combined with other checks — like looking up the domain registration through WHOIS, checking the SSL certificate (the padlock in your browser), and seeing how long the domain has been registered — it becomes part of a useful picture.
Troubleshooting when the lookup doesn't work
If you type the command and get an error or no result, the most common cause is a typo in the domain name. Double-check that you've spelled it exactly right, including any hyphens or numbers. Domain names are case-insensitive, so capitalization doesn't matter.
If the domain name is spelled correctly but you still get no result, the domain may not exist, or it may be very new and not yet fully registered in the system. Wait a few hours and try again — new domains can take time to propagate through the internet's name servers.
If you're on a corporate or school network, your network administrator may have blocked direct lookups. In that case, use an online tool instead, which goes through a web browser and usually isn't blocked the same way.
Frequently Asked Questions
Can I find the IP address of a website without opening Command Prompt?
Yes. Use an online lookup tool like MXToolbox or WHOIS.net — just paste the domain name and click search. You get the same information in your browser without typing any commands.
Does every website have only one IP address?
No. Large websites often use multiple IP addresses spread across different servers to handle traffic. A single lookup may show you one address, but the domain could be pointing to several. Online tools sometimes show all of them.
If I have the IP address, can I visit the website by typing the IP into my browser?
Sometimes, but not always. Many websites require you to use the domain name, not the IP address, because one IP hosts multiple sites and the server needs to know which one you want. You can try typing the IP directly into your address bar, but expect it to fail or show a different site.
Is finding a website's IP address safe or legal?
Yes. 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. It's informational only and doesn't access or change anything.
Why would I need this information for my home network?
If you're troubleshooting a connection problem or checking whether your computer is reaching the right server, knowing the IP address helps you verify the connection. It's also useful if you're investigating a suspicious website before you visit it, or if you're setting up network security rules that block or allow traffic to specific addresses.