How to Ping a Computer or a Web Site

Ping an IP address to check a website's status

Computer Hacker Using Glass Tablet Seen Through Interface

Nakhorn Yuangkratoke / Getty Images

A ping utility sends test messages from the local client to a remote target over the TCP/IP network connection. The target can be a website, a computer, or any other device with an IP address. Besides determining whether the remote computer is currently online, ping also provides indicators of the general speed or reliability of network connections.

How to Ping an IP Address

Ping in windows powershell

Ping works the same across all platforms—open the utility then type:

ping <ip address>

Ping works from a shell prompt, sometimes called a terminal window. In Windows, use either Command Prompt or PowerShell to access ping.

Interpreting the Results of Ping

A typical ping session finds the requested server then returns statistics:

  • Reply from: By default, Microsoft Windows ping sends a series of four messages to the address. The program outputs a confirmation line for each response message received from the target computer.
  • Bytes: Each ping request is 32 bytes in size by default.
  • Time: Ping reports the amount of time (in milliseconds) between the sending of requests and receipt of responses.
  • TTL (Time-to-Live): A value between 1 and 128, TTL can be used to count how many different networks the ping messages passed through before reaching the target computer. A value of 128 indicates the device is on the local network, with 0 other networks in between.

Running Ping Continuously

On some computers (particularly those running Linux), the standard ping program does not stop running after four request attempts but instead runs until the user ends it. That behavior is useful for monitoring the status of a network connection over longer periods of time.

In Microsoft Windows, type ping -t instead of ping at the command line to launch the program in this continuously running mode (and use the Control-C key sequence to stop it).

Ping an IP Address That Does Not Respond

In some cases, ping requests fail. This happens for any of several reasons:

  • The IP address specified by the ping program is invalid.
  • The host system (device being used to send pings) is not connected to an IP network (i.e., does not have a working IP address).
  • No network device is connected to the target IP address.
  • Network congestion or errors in between the host and target are preventing messages from passing through (in one or both directions).

Each Reply from line takes several seconds to appear on the screen as the program waits and eventually times out. The IP address referenced in each reply line of the output is the address of the pinging (host) computer.

Intermittent Ping Responses

Though uncommon, it is possible for ping to report a response rate other than 0 percent (fully unresponsive) or 100 percent (fully responsive). This result appears most often when the target system is shutting down or starting up.

You're free to use a computer name rather than an IP address with the ping command. For example, type ping lifewire.com to ping a Lifewire server. You lose the precision of knowing which server you're targeting, but as a fast-and-easy method to determine whether your internet connection works, this trick is hard to beat.