What you need to know first
Every website lives on a server somewhere, and that server has an IP address — a string of numbers like 142.251.41.14 that computers use to find it on the internet. You can look up the IP address of any website using free tools that are built into your computer or available online. The process takes less than a minute and requires no special software.
The IP address you find is the address of the web server hosting that website. If a website uses a content delivery network (a system that spreads copies of the site across many servers), you may see different IP addresses depending on where you look it up from. This is normal and expected.
Key Takeaways
- You can find a website's IP address using the command line on Windows (Command Prompt), Mac (Terminal), or Linux, by typing a single command.
- Online lookup tools like MXToolbox, IPQualityScore, or WHOIS databases show you the IP address without opening the command line.
- The IP address belongs to the web server, not necessarily to the person or company that owns the website — hosting companies own the servers.
- Different tools may show slightly different results if the website uses multiple servers or a content delivery network.
Using the command line on Windows
The fastest way on a Windows computer is to use Command Prompt, which is built into every Windows machine. Open the Start menu, type cmd, and press Enter. A black window will open.
Type this command exactly as written: nslookup example.com (replace example.com with the website you want to look up). Press Enter. Within seconds, you will see the IP address listed next to "Address:" in the results. Write down the number that starts with a digit — that is the IP address you are looking for.
If you see multiple addresses, the first one is usually the main one. If the lookup fails or times out, check that you typed the domain name correctly and that you have an internet connection.
Using the command line on Mac or Linux
On a Mac, open Spotlight by pressing Command + Space, type terminal, and press Enter. On Linux, open your terminal application from your applications menu.
Type this command: nslookup example.com (again, replace example.com with the website you want). Press Enter. The IP address will appear next to "Address:" in the output. This is the same command that works on Windows, and it produces the same result.
You can also use dig example.com on Mac or Linux for more detailed information. The dig command shows additional technical details about how the domain is configured, though for a simple IP lookup, nslookup is usually enough.
Using online lookup tools
If you do not want to use the command line, several websites let you type in a domain name and see the IP address immediately. MXToolbox (mxtoolbox.com) has a free IP lookup tool — go to the site, find "IP Lookup" in the menu, type the domain name, and click the button. The IP address appears in seconds.
IPQualityScore (ipqualityscore.com) offers a similar tool. Type the domain name and it returns the IP address along with information about whether the IP has a reputation for spam or abuse. WHOIS databases like whois.com or icann.org/whois also show IP addresses, though they return more technical information than you may need.
These tools work from any device with a web browser — phone, tablet, or computer. You do not need to install anything or use the command line. The downside is that you are sending the domain name to a third-party website, whereas the command line method keeps the lookup on your own machine.
Understanding what the IP address tells you
The IP address you find is the address of the web server. It does not directly tell you who owns the website — that information is in the domain registration records (the WHOIS data), which is separate from the IP lookup. Many websites share the same server, so multiple domains can have the same IP address.
If you look up the same website from different locations or at different times, you might see different IP addresses. This happens when a website uses a content delivery network that spreads the site across many servers in different countries. Each server has its own IP address, and you get routed to the closest one for speed.
The IP address can also change if the website moves to a different hosting company. If you looked up a website months ago and want to check again, the IP may be different now.
Troubleshooting common problems
If the command line returns "server can't find" or a timeout error, first check that you typed the domain name correctly. Common mistakes include typing www.example.com when you should type just example.com, or including extra spaces. Try again without the www prefix.
If you still get an error, your internet connection may be down or your DNS settings may be misconfigured. Try pinging a known website like google.com to test your connection. If that fails, restart your router and try again.
If an online lookup tool shows a different IP address than your command line result, this is usually because the website uses multiple servers. Both results are correct — they are just different servers that host the same website. This is especially common for large websites and social media platforms.
When you might need an IP address
System administrators and network technicians look up IP addresses to troubleshoot connection problems, check if a website is down, or verify that a domain is pointing to the correct server after a migration. Security researchers use IP lookups to investigate suspicious websites or trace the source of spam.
If you are setting up your own website, you may need the IP address to configure DNS records or to connect to your web server using an FTP client. If you suspect a website is fraudulent or dangerous, the IP address can help you research where it is actually hosted.
For most everyday users, knowing how to find an IP address is useful mainly for curiosity or for troubleshooting when something is not working as expected.
Frequently Asked Questions
Can I find the IP address of a website that is blocked or down?
Yes. The IP address is separate from whether the website is currently running. Even if a website is offline or blocked in your country, the lookup will still return the IP address of the server where it is hosted. The server may not be responding, but the address itself is still findable.
Is it illegal to look up a website's IP address?
No. IP addresses are public information. Looking up an IP address is not hacking, not illegal, and not a violation of anyone's privacy. The information is freely available and is used every day by network administrators, security researchers, and ordinary users troubleshooting connection problems.
Why do some websites have multiple IP addresses?
Large websites often use multiple servers to handle traffic and improve speed. A content delivery network spreads copies of the website across servers in different locations, so users in different countries connect to different IP addresses. This is intentional and improves performance.
What is the difference between an IP address and a domain name?
A domain name (like example.com) is the human-readable address you type into your browser. An IP address (like 142.251.41.14) is the numeric address that computers use to find the server. DNS translates the domain name into the IP address automatically when you visit a website.
Can I visit a website by typing its IP address instead of the domain name?
Sometimes, but not always. You can type the IP address directly into your browser's address bar, and it may work. However, many websites require you to use the domain name because they host multiple websites on the same server and use the domain name to figure out which one you want.