How to Ping a Computer or a Web Site

Ping an IP address to check a website's status

What to Know

  • If you know how to ping a computer, you can find out if another computer is online or what the speed or reliability of a connection is.
  • Ping is the same across all platforms; it uses the command ping <IP address> to gather data.
  • Ping works from a command prompt in Windows or a terminal window in Mac.

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. Here's how to ping any of those devices.

These instructions are centered around Windows, but you can ping a network device from other operating systems, too.

Person pinging a computer or website
Ellen Lindner / Lifewire

How to Ping an IP Address

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): Set by the system that's sending the ping command. It can be set to any value between 1 and 255. Different OSs set different defaults. Each router that receives the packet subtracts at least 1 from the number. If it remains greater than 0, the router forwards the packet, otherwise it discards it and sends an ICMP message back to the host.
Ping in windows powershell

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 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.