Why can I write the command
ping www.google.com
but not
ping www.google.com/
or
ping http://www.google.com
The latter two yield an “unknown host” error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ping is used to tell if a host (hostname or IP address) is alive. It uses the ICMP protocol to do so. It does not know anything about URLs or web servers.
What you probably want is a
http pingutility, like http-ping. Or you can use tools likecurl, orwgetto retrieve website index pages and measure the latency that way.Example with
curl(this does a HEAD request):Example with
curlfor GET request:This will give you a crude idea of how responsive the web server is from your host.