Finding a website's IP address using your computer
The fastest way to find a website's IP address is to use a command-line tool built into your operating system. On Windows, this tool is called Command Prompt. On Mac or Linux, it is called Terminal. Both systems have a command called nslookup that asks your DNS server to translate a domain name into an IP address — the same lookup that happens invisibly every time you visit a website.
On Windows, open Command Prompt by pressing the Windows key, typing "cmd", and pressing Enter. Type nslookup example.com (replacing example.com with the website you want to look up) and press Enter. Within a second, you will see the IP address listed next to "Address:" in the results.
On Mac, open Terminal by pressing Command + Space, typing "terminal", and pressing Enter. Type the same command: nslookup example.com. The IP address appears in the same format. Linux users open a terminal and use the same nslookup command, or the alternative dig example.com command, which shows more detail about the DNS lookup.
Key Takeaways
- Use nslookup (Windows, Mac, Linux) or dig (Linux) in your command-line tool to find any website's IP address in seconds.
- Online IP lookup tools like whatismyipaddress.com or mxtoolbox.com work from any browser and show the same information without typing commands.
- A website may have multiple IP addresses if it uses a content delivery network or load balancer to serve traffic from different locations.
- Finding a website's IP address is public information — the IP is visible to your internet provider every time you visit the site.
Using online IP lookup tools
If you prefer not to use the command line, several websites will look up an IP address for you. Type the domain name into the search box on whatismyipaddress.com, mxtoolbox.com, or similar lookup services, and the site returns the IP address when ready. These tools do the same nslookup work behind the scenes but display the result in a web page instead of a terminal window.
Online tools often show additional information alongside the IP address: the hosting company that owns the IP block, the geographic location associated with that IP, and sometimes the server software running on that address. This extra detail can be useful if you are troubleshooting a connection problem or checking whether a website is hosted where you expect it to be.
Why a website might have more than one IP address
Some websites return different IP addresses depending on where you look them up from or when you look them up. This happens because large websites use load balancers or content delivery networks (CDNs) to spread traffic across multiple servers in different locations. When you request the website, the DNS server sends you to whichever server is closest to you or least busy at that moment.
If you run nslookup multiple times on the same domain, you may see different IP addresses in the results. This is normal and intentional — it is how the website distributes the load. If you need to find all the IP addresses a domain uses, some online tools show multiple results, or you can use the nslookup -type=A example.com command to see all A records (the standard IPv4 addresses) associated with a domain.
The difference between a website's IP and your own IP
Finding a website's IP address is different from finding your own IP address. When you look up a website's IP, you are finding the address of the server that hosts that website — the computer somewhere on the internet that stores the website's files and sends them to you. When you find your own IP address, you are finding the address your internet provider assigned to your home network or device.
You can find your own public IP address by visiting whatismyipaddress.com without searching for anything — the site displays your IP automatically. Your device also has a private IP address used only within your home network (usually starting with 192.168 or 10.0), which is different from the public IP that the rest of the internet sees.
When you might need to find a website's IP address
Most of the time, you never need to know a website's IP address — your browser handles the DNS lookup automatically. But there are situations where finding the IP is useful. If a website is down or loading slowly, checking the IP address can tell you whether the problem is with DNS (the lookup service) or with the server itself. If you are setting up a firewall rule or blocking a website on your home network, you may need the IP address to create that rule.
System administrators and network technicians look up IP addresses regularly to troubleshoot connection problems, verify that a domain points to the correct server, or check whether a website has moved to a new hosting provider. If you are managing a home network and want to block a specific website from certain devices, knowing the IP address gives you another way to do it beyond just blocking the domain name.
IPv4 versus IPv6 addresses
Most websites today use IPv4 addresses, which look like four numbers separated by periods: 142.251.41.14. This is the format you will see in most nslookup results. Some newer websites also support IPv6 addresses, which look like a longer string of hexadecimal characters: 2607:f8b0:4004:809::200e.
If you want to see IPv6 addresses specifically, use nslookup -type=AAAA example.com on the command line (AAAA is the DNS record type for IPv6). Most home networks and browsers work with both IPv4 and IPv6, so you usually do not need to choose — your device will use whichever one the website supports. Online lookup tools often show both types if they are available.
Frequently Asked Questions
Is it legal to look up a website's IP address?
Yes. A website's IP address is public information — your internet provider can see it every time you visit the site, and the DNS system is designed to share this information. Looking up an IP address is not hacking or illegal in any way.
Can I visit a website by typing its IP address instead of the domain name?
Usually yes, but not always. You can type an IP address directly into your browser's address bar (for example, 142.251.41.14), and if the server at that IP hosts only one website, it will load. However, many servers host multiple websites on the same IP address, so the server needs the domain name to know which website to send you. In that case, typing the IP alone will not work.
Why does nslookup show a different IP than an online lookup tool?
This usually means you ran the lookup from different locations or at different times. If a website uses a CDN or load balancer, the IP address can change based on your location or server availability. Run the lookup again and you may see a different result. Both answers are correct — the website is using multiple IPs intentionally.
What if nslookup returns "server can't find" or a timeout?
This usually means the domain name does not exist, is misspelled, or your DNS server is not responding. Check that you typed the domain correctly (without "www" or "https://"). If the domain is correct, your internet connection or DNS settings may have a problem — try restarting your router or using a different DNS server like 8.8.8.8 (Google's public DNS).