What you need to know first

Every website runs on a server somewhere, and that server has an IP address — a string of numbers like 142.251.41.14. You can find 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 the site, not the person who owns it. If you are trying to contact a website owner, the IP address alone will not give you their name or location — you would need to look up the domain registration instead. But if you need to know which server is hosting a site, or troubleshoot connection problems, finding the IP address is straightforward.

Key Takeaways

  • You can find a website's IP address using the command line on Windows (Command Prompt) or Mac (Terminal), or by using an online lookup tool.
  • The IP address belongs to the web server, not to the person who owns the website, so it will not reveal the owner's identity.
  • The ping command and the nslookup command are the two fastest methods on your own computer.
  • Online tools like MXToolbox, WHOIS lookup sites, and DNS checkers all show IP addresses without requiring you to open a command line.

Using the command line on Windows

The fastest way on a Windows computer is to use Command Prompt, which is built in. Open the Start menu, type cmd, and press Enter. A black window will open.

Type this command and replace example.com with the actual website address:

ping example.com

Press Enter. Within a second or two, you will see a response that includes the IP address in the first line. It will look something like this:

Pinging example.com [93.184.216.34]

The numbers in the brackets are the IP address. Write it down or take a screenshot. You can close Command Prompt after that.

If the ping command does not work, the website may be blocking ping requests. In that case, try nslookup example.com instead. Type it the same way, press Enter, and look for a line that says "Address:" followed by the IP address.

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 the applications menu.

Type the same ping command:

ping example.com

Press Enter. The IP address will appear in the first line of the response, inside parentheses or brackets. Press Control + C to stop the ping.

If ping does not work, use nslookup example.com or dig example.com instead. Both will show you the IP address in the response.

Using an online lookup tool

If you do not want to open a command line, you can use a website that looks up IP addresses for you. MXToolbox (mxtoolbox.com) is one of the most reliable. Go to the site, find the "Ping" or "DNS Lookup" tool, type the website address into the box, and click the button. The IP address will appear in the results within seconds.

Other options include WHOIS lookup sites like whois.com or domaintools.com. These sites also show IP addresses along with other information about the domain. Simply type the website address and the results will include the IP address of the server.

Online tools work the same way whether you are on Windows, Mac, or Linux, and you do not need to remember any commands. The trade-off is that you are sending the website address to a third-party server, whereas the command line keeps everything on your own computer.

Understanding what the IP address tells you

The IP address you find is the address of the web server that hosts the website. Multiple websites can share the same server and therefore the same IP address, especially if they are hosted by the same company. Knowing the IP address does not tell you who owns the website or where they are located.

If you are trying to find out who runs a website, the IP address is not the right tool. Instead, you would look up the domain registration using a WHOIS search, which shows the registered owner of the domain name itself. The IP address is useful for technical troubleshooting, checking which hosting company runs a site, or verifying that a website is actually online.

What to do if you get an error

If the ping command returns "Host not found" or "Unknown host," the website address may be spelled wrong, or the site may be offline. Double-check the spelling and try again. If the spelling is correct and you still get an error, the website may be temporarily down.

Some websites block ping requests for security reasons. If ping does not work, try nslookup or dig instead — these commands use a different method and often succeed when ping fails. If all three commands fail, the website is likely offline or blocking all lookup requests.

Why you might need a website's IP address

System administrators and IT professionals look up IP addresses to troubleshoot network problems, verify that a website is hosted where it claims to be, or check which hosting company runs a site. If you are having trouble reaching a website, knowing its IP address can help you determine whether the problem is with the site itself or with your connection to it.

Web developers sometimes need IP addresses to set up DNS records or to test a website before it goes live. Security researchers may look up IP addresses to investigate suspicious websites or to understand how a network is structured. For most everyday users, finding an IP address is more of a curiosity than a necessity, but the process is simple enough that it is worth knowing.

Frequently Asked Questions

Can I find out who owns a website just from its IP address?

No. The IP address belongs to the web server, which may host hundreds of websites. To find the owner, you need to look up the domain name using a WHOIS search, which shows the registered owner of the domain itself.

Why do some websites have multiple IP addresses?

Large websites often use multiple servers to handle traffic, and each server has its own IP address. Some websites also use content delivery networks that route traffic through different servers depending on where you are located. Both methods can result in different IP addresses at different times.

Is it illegal to look up a website's IP address?

No. IP addresses are public information, and looking one up is not illegal. Anyone can find the IP address of any website using the methods described here.

What is the difference between ping and nslookup?

Ping sends a test message to the server and waits for a response, which also tells you if the server is online. Nslookup queries the DNS system to find the IP address without sending a test message. Some websites block ping but allow nslookup, so trying both increases your chances of success.

Can I find the IP address of a website on my phone?

Yes, but it is easier on a computer. On a phone, you would need to use an online lookup tool like MXToolbox or a WHOIS site. Some phones have terminal apps, but typing commands on a phone is slower than using a web form.