How to determine the IP address of a website

Updated: 12/30/2019 by Computer Hope
IP address

You can determine the IP address of a website by using the ping command from a command line. Below are steps on how to use the ping command and other commands to get an IP address.

Using the ping command in MS-DOS or Windows command line

Below are the steps on how to use the Windows command line to determine the IP address of a website.

  1. Open the Command Prompt.
  2. Run the following command at the command prompt, replacing "google.com" with the domain name of the website you're trying to find the IP address.
ping google.com
  1. Review the output (similar to the below output) to see the domain name, IP address, and the responses from the server if accepted.
Pinging google.com [216.58.216.164] with 32 bytes of data:

Reply from 216.58.216.164: bytes=32 time=30ms TTL=53
Reply from 216.58.216.164: bytes=32 time=30ms TTL=53
Request timed out.
Reply from 216.58.216.164: bytes=32 time=31ms TTL=53

Ping statistics for 216.58.216.164:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 30ms, Maximum = 31ms, Average = 30ms

Using the ping in the Linux command line

  1. Open the Linux command shell.
  2. Run the following command at the command prompt, replacing "google.com" with the domain name of the website you're trying to find the IP address.
ping google.com
  1. Review the output (similar to the below output) to see the domain name, IP address, and the responses from the server if accepted.
PING google.com (216.58.216.164) 56(84) bytes of data.
64 bytes from www.google.com (216.58.216.164): icmp_seq=1 ttl=63 time=0.267 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.267/0.267/0.267/0.000 ms

Why is the IP address long or not only numbers?

If you see an address that contains letters, numbers, and commas (e.g., 2607:f8b0:4005:805::200e) the website is using an IPv6 address and not an IPv4 address.

Using nslookup to look up an IP address

The nslookup command is used to query your nameserver for the IP address of a hostname. The command is available from the Windows command line, or a linux or macOS X terminal. Example:

nslookup wikipedia.org
Server: [name.server]
Address:  [nameserver.address]

Non-authoritative answer:
Name:    wikipedia.org
Addresses:  2620:0:860:ed1a::1
          208.80.153.224

For more information, see the command documentation:

Using online services

Online services exist which can help you determine the IP address of a website. Such services are particularly helpful if ICMP requests (pings) are being filtered somewhere between you and the site.

Additional information