The quickest way to find a website's IP address

You can find any website's IP address using a command-line tool called nslookup on Windows or dig on Mac and Linux. On Windows, open Command Prompt, type nslookup example.com (replacing example.com with the actual domain), and press Enter. The tool will return the IP address in seconds. On Mac or Linux, open Terminal and type dig example.com to see the same information.

If you prefer not to use the command line, dozens of free websites will do this lookup for you. Search "IP lookup tool" or "DNS lookup" and you'll find sites like MXToolbox, DNSChecker, or WhatsMyDNS. Type the domain name into the search box, click the button, and the site displays the IP address when ready. These tools work the same way your browser does — they ask the DNS system to translate the domain name into an IP address.

The IP address you find is usually the address of the web server hosting the website. If the site uses a content delivery network (CDN) like Cloudflare or Akamai, you may see the CDN's server address instead of the original host. This is normal and intentional — the CDN sits between you and the real server to speed up loading times and protect against attacks.

Key Takeaways

  • Windows users can open Command Prompt and type nslookup domain.com to see the IP address when ready.
  • Mac and Linux users can open Terminal and type dig domain.com to retrieve the same information.
  • Free online lookup tools like MXToolbox or DNSChecker do the same job without opening a terminal.
  • The IP address returned may belong to a content delivery network rather than the original web server, which is normal.

Why you might want to know a website's IP address

Finding a website's IP address is useful when you're troubleshooting connection problems. If a site loads slowly or times out, knowing its IP address lets you test whether you can reach that specific server directly. You can ping the IP address to see if the server responds, which tells you whether the problem is with the domain name system (DNS) or with the server itself.

Website owners and network administrators use IP lookups to monitor their own sites, check DNS records, and verify that traffic is routing correctly. If you run a website and notice it's not loading, an IP lookup confirms that your DNS is pointing to the right server. You might also look up a competitor's IP address to see which hosting company they use, though this tells you very little about their actual business.

Understanding what the lookup results show you

When you run an nslookup or use an online tool, you'll see at least one IP address listed. Most websites have multiple IP addresses — one for IPv4 (the older, more common format like 192.0.2.1) and one for IPv6 (the newer format like 2001:db8::1). Both point to the same website, but IPv6 is gradually replacing IPv4 as the internet runs out of IPv4 addresses.

You may also see additional records like MX records (which handle email) or CNAME records (which point to other domains). For a straightforward IP lookup, you only need the A record (for IPv4) or AAAA record (for IPv6). These are the records that translate the domain name directly into an IP address.

Some lookups show you the nameservers — the DNS servers that hold the records for that domain. Nameservers are usually provided by your domain registrar or your hosting company. If you change hosting companies, you update your nameservers so the DNS system knows where to find your website's new location.

What happens when a website changes its IP address

Websites change IP addresses when they move to a different hosting company, upgrade their server, or switch to a content delivery network. When this happens, the domain registrar updates the DNS records to point to the new IP address. This update doesn't happen when ready — it can take anywhere from a few minutes to 48 hours for the change to spread across all the DNS servers on the internet, a process called DNS propagation.

During this transition period, some people may reach the old server while others reach the new one, depending on which DNS server their internet service provider is using. This is why websites sometimes appear broken or show old content for a few hours after a migration. If you look up the IP address during this window, you might see the old address or the new one depending on which DNS server the lookup tool queries.

Using IP addresses to block or allow websites

Some routers and firewalls let you block or allow websites by their IP address rather than by domain name. This is useful if you want to prevent certain sites from loading on your home network. You access your router's settings, find the firewall or access control section, and add the IP address to a blocklist. The router then refuses to let any device on your network connect to that address.

Blocking by IP address has a limitation: if the website shares an IP address with other sites (which is common on shared hosting), blocking that IP address blocks all the sites on that server. This is why domain-based blocking is usually more precise. However, if a website is using a unique IP address, blocking by IP is straightforward and effective.

Checking if a website's IP address has changed

If you looked up a website's IP address weeks or months ago and want to know if it has changed, run the lookup again and compare the results. If the IP address is different, the website has moved to a new server. This might mean the site changed hosting companies, upgraded its infrastructure, or switched to a different content delivery network.

You can also use online tools that track DNS history. Sites like SecurityTrails or WHOIS databases show you the IP addresses a domain has pointed to over time. This is useful if you're investigating a website's history or trying to understand when a migration happened. However, these historical records are not always complete, especially for very old changes.

Frequently Asked Questions

Can I find out who owns a website by looking up its IP address?

The IP address itself doesn't tell you who owns the website. However, you can use a WHOIS lookup tool to search the IP address and see who registered it with their internet service provider. This usually shows the hosting company, not the website owner. To find the actual owner, you need to look up the domain name in WHOIS, which may show the registrant's information if they didn't use privacy protection.

Why do some websites have multiple IP addresses?

Websites with high traffic often use multiple servers to handle the load. A technique called load balancing distributes visitors across several servers, each with its own IP address. When you look up the domain, you might see one IP address, but the DNS system rotates between multiple addresses each time someone visits. This spreads the traffic so no single server gets overloaded.

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

No. Looking up a website's IP address is a normal part of how the internet works. Your browser does it automatically every time you visit a site. Using publicly available lookup tools is completely legal and doesn't violate any laws or terms of service.

What's the difference between pinging an IP address and looking it up?

Looking up an IP address translates the domain name into a number using DNS. Pinging an IP address sends a test message to that server to see if it's online and responding. You look up first to get the IP address, then you can ping it to test the connection. Both are diagnostic tools that help troubleshoot network problems.