The ping command is one of the easiest and most reliable tools to test whether a website or a network host is reachable.
Here’s how you do it:
On Windows, open Command Prompt and type:
ping http://www.example.com
On macOS or Linux, open Terminal and do the same.
The command sends a series of small data packets AKA Internet Control Message Protocol (ICMP) Echo Requests to the website’s server. If the server is reachable, you’ll get back ICMP Echo Replies along with the response time in milliseconds.
For example:
Received from 93.184.216.34: icmp_seq=1 bytes=32 time=20ms ttl=58
This means the website responded in 20 milliseconds, a pretty healthy connection!
Actually, these numbers can tell you quite a lot.
- time=XXms → The round-trip time for the packet. Lower is better.
- TTL (Time to Live) → How many hops (routers) the packet went through.
- Request Timed Out → The server didn’t respond — could be down, blocking ICMP, or your network has issues.
A lot of people don’t realize some websites intentionally block ping requests for security reasons. So, if you get a timeout, it doesn’t always mean the site is offline.