What you need to know about finding a website's IP address
Every website lives on a server, and every server has an IP address — a unique number that identifies it on the internet, like a street address for a computer. When you type a domain name (like google.com) into your browser, your computer looks up that domain's IP address behind the scenes and connects to the server at that address.
You can find a website's IP address yourself using free tools that are built into your operating system or available online. The process takes less than a minute and works the same way whether you're on Windows, Mac, or Linux. This is useful if you're troubleshooting server problems, checking whether two websites are hosted on the same server, or understanding how your own domain is configured.
Key Takeaways
- A website's IP address is a unique number that identifies the server where the website is stored, and you can look it up for free using command-line tools or online lookup services.
- The Windows Command Prompt and Mac Terminal both have built-in commands (nslookup and dig) that show you a domain's IP address in seconds.
- Online IP lookup tools like MXToolbox, WHOIS lookup sites, and DNS checkers work from any browser without installing anything.
- A single IP address can host multiple websites, and one domain can point to multiple IP addresses depending on how the owner configured it.
- The IP address you find is usually the address of a web hosting company's server, not the physical location where the website owner sits.
Using Command Prompt on Windows
The fastest way on Windows is to use the Command Prompt, which comes built into every Windows computer. Open the Start menu, type "cmd" or "Command Prompt", and press Enter. A black window will open where you can type commands.
Type this command and press Enter: nslookup google.com (replace google.com with the domain you want to look up). The Command Prompt will return the IP address within a second or two. You'll see a line that says "Address:" followed by a number like 142.250.185.46. That number is the IP address.
If you want to look up multiple domains, just type nslookup followed by a new domain name and press Enter again. You can stay in Command Prompt and run as many lookups as you need. When you're done, type "exit" and press Enter to close the window.
Using Terminal on Mac or Linux
Mac and Linux computers have a Terminal application that works similarly to Windows Command Prompt. On Mac, open Spotlight (press Command + Space), type "Terminal", and press Enter. On Linux, open your applications menu and search for Terminal.
Type this command and press Enter: dig google.com (replace google.com with the domain you want). The Terminal will display detailed information about the domain, and you'll see the IP address listed next to "A" in the answer section. The "A" stands for "address" and shows the IPv4 address — the standard format most websites use.
If you prefer the nslookup command (which works on Mac and Linux too), type nslookup google.com instead. Both commands do the same job; dig shows more detail, while nslookup is simpler. Either one takes less than a second to run.
Using online IP lookup tools
If you don't want to open a command-line tool, you can use a web browser instead. Sites like MXToolbox (mxtoolbox.com), WHOIS lookup services, and DNS checkers let you type in a domain name and see the IP address instantly. These tools work on any computer, phone, or tablet with a web browser.
Go to one of these sites, find the search box, type the domain name you want to look up, and click the search button. The site will display the IP address within a few seconds. Some of these tools also show additional information like the hosting company, the server location, and whether the domain is using a content delivery network (a system that spreads the website across multiple servers for speed).
The advantage of online tools is that you don't need to remember command syntax or open a terminal. The disadvantage is that you're sending your lookup request to a third-party website, whereas command-line tools do the lookup directly from your computer. For most purposes, either method is fine.
Understanding what the IP address tells you
The IP address you find is the address of the server where the website's files are stored. In most cases, this is a server owned by a web hosting company, not the person or business that owns the website. The hosting company runs the server and rents space on it to many different website owners.
One IP address can host dozens or even hundreds of websites, especially on shared hosting plans where multiple customers rent space on the same server. Conversely, one domain can point to multiple IP addresses if the owner set up load balancing (a system that spreads traffic across several servers). So the IP address alone doesn't tell you much about who owns the website or where they are located.
If you want to find out who owns a domain, you'll need to look up the domain's WHOIS record instead. That record contains registration information like the owner's name and contact details (though many owners keep this information private). The IP address is useful for technical troubleshooting, but the WHOIS record is what you need for ownership information.
Troubleshooting when the lookup doesn't work
If you type a command and get an error message, the most common cause is a typo in the domain name. Make sure you typed the domain correctly — for example, "google.com" not "gogle.com". Also check that you're connected to the internet, because the lookup needs an internet connection to work.
If the domain name is spelled correctly and you're online, the domain might not exist or might not be set up properly. Try looking up a domain you know works (like google.com or amazon.com) to confirm your tool is working. If that works but your target domain doesn't, the domain may have expired, been deleted, or not yet been configured by its owner.
On Windows, if nslookup doesn't work, try running Command Prompt as an administrator. Right-click on Command Prompt and select "Run as administrator", then try the command again. On Mac or Linux, you may need to install the dig tool if it's not already on your system, though it comes pre-installed on most modern versions.
Frequently Asked Questions
Can I find the IP address of a website that's password-protected or behind a firewall?
Yes. The IP address is public information that anyone can look up — it's how your browser finds the website in the first place. Password protection and firewalls don't hide the IP address. What they do is control who can access the website once they connect to that IP address.
What's the difference between IPv4 and IPv6?
IPv4 is the older, more common format (like 142.250.185.46) and is what most websites use. IPv6 is a newer format with longer addresses (like 2607:f8b0:4004:80a::200e) that was created because the world was running out of IPv4 addresses. Most websites support both, but IPv4 is still the standard.
If two websites have the same IP address, are they the same website?
Not necessarily. They could be different websites hosted on the same server by the same hosting company. This is common on shared hosting plans. However, if two domains point to the same IP address and you suspect they're related, you can look up their WHOIS records to see if they have the same owner.
Does finding a website's IP address tell me where the server is physically located?
Not exactly. The IP address is assigned to a hosting company, and that company's servers could be in any country. Some IP lookup tools show a "location" based on where the IP address is registered, but this is often inaccurate or outdated. The actual server could be in a different country than the registration location.
Can I use the IP address to visit a website instead of typing the domain name?
You can type the IP address directly into your browser's address bar, and in many cases it will work. However, if the server is hosting multiple websites on the same IP address, the server won't know which website you want to see. In that case, you'll get an error or the wrong website. This is why domain names exist — they tell the server which website you're looking for.