With a ping test, you can check whether a hostname resolves to an IP address and whether the target responds to ICMP echo requests. Ping is therefore a useful tool for network diagnostics—though not a complete test of whether a website, mail server, or other internet service is working.
In particular, a failed ping does not automatically mean that a server or website is offline. Many servers, firewalls, and networks deliberately do not respond to ping requests.
Briefly explained: Ping can provide clues about DNS resolution, network connectivity, and response times. However, whether a website works via HTTP or HTTPS cannot be determined with ping alone.
What is a ping test? #
The program pong sends so-called ICMP echo request packets to a target system. If the target or the intermediate network configuration allows these requests, it can respond with an ICMP echo reply.
For the destination, you can use a domain name, for example:
ping example.ch
or an IP address directly:
ping 192.0.2.10
The IP address used here is merely an example address reserved for documentation purposes.
What can I check with Ping? #
A ping test can help answer the following questions, among others:
- Is a domain name resolved to an IP address?
- Does the destination respond to ICMP echo requests?
- How long does it take to get a response, roughly?
- Are any packets lost during the test?
- Does the behavior differ between different networks or devices?
However, the results must always be interpreted in the context of the remaining network and server configuration.
What can't Ping check reliably? #
Ping does not test whether a website is being correctly served via HTTP or HTTPS.
A successful ping, for example, does not prove that:
- the web server is working,
- the right website has been set up,
- the SSL/TLS certificate is valid,
- WordPress works,
- a database is accessible,
- or email functions correctly.
Conversely, a website can function completely even though the server does not respond to a single ping.
Important: Use ping as a diagnostic tool and not as the sole availability test for a website.
Perform a ping test in Windows #
In Windows, you can run ping via the Command Prompt or PowerShell.
For example, open the command prompt and type:
ping example.ch
By default, Windows sends a limited number of echo requests and then displays statistics.
An example result might look like this:
Ping is being performed for example.ch [192.0.2.10]
Response from 192.0.2.10: Bytes=32 Time=24ms TTL=54
Response from 192.0.2.10: Bytes=32 Time=23ms TTL=54
Response from 192.0.2.10: Bytes=32 Time=25ms TTL=54
Response from 192.0.2.10: Bytes=32 Time=24ms TTL=54
The exact text and values depend on the version of Windows, the language, the network, and the target system.
Perform a ping test on macOS #
On macOS, you can run ping in the Terminal.
Open the app Terminal and enter, for example:
ping example.ch
Unlike standard Windows behavior, ping on macOS typically continues to run until you stop the process.
To do this, press:
Control + C
If you want to send only a certain number of requests from the start, you can use the following, for example:
ping -c 4 example.ch
This sends four Echo requests.
Performing a Ping Test on Linux #
On many Linux systems, you can also use ping via a terminal:
ping example.ch
On many distributions, the test continues to run until you with
Control + C
finish.
For a limited number of requests, you can use, for example:
ping -c 4 example.ch
Depending on the Linux distribution or installation, the specific availability or implementation of the ping tool may vary.
What happens when I ping a domain name? #
If you
ping example.ch
execute, your system must first determine an IP address for the hostname.
If an IP address is displayed in the result, this is already an indication that the name resolution for this hostname has worked.
For example:
PING example.ch (192.0.2.10)
However, this does not necessarily mean that the IP address belongs to the actual origin web server. Upstream systems such as reverse proxies or other network services can also appear as the publicly visible target.
What do „Zeit“ and „time“ mean? #
Upon a successful response, ping typically displays a measured time.
For example:
64 bytes from 192.0.2.10: time=18.4 ms
The value in milliseconds simply describes the time for the round trip of the ICMP request and response.
This value is often referred to as round-trip time.
A low time basically means a short response time to this ICMP test. However, it is not a direct measurement of a website's loading time.
Note: A ping of 20 ms does not mean that a website loads in 20 ms. The loading time of a website also depends on the web server, application, database, page size, browser, network, and many other factors.
What does packet loss mean? #
Ping can indicate if sent echo requests have remained unanswered.
For example, if ten packets are sent and only eight responses are received, a packet loss of 20 percent results during this test.
Packet loss can indicate a network problem. However, the result must be interpreted with caution because ICMP traffic, for example, can be filtered, limited, or prioritized lower than other network traffic.
Therefore, a single ping test is not sufficient to automatically deduce a web server problem from it.
What does TTL mean in ping? #
In ping outputs, a value like this frequently appears:
TTL=54
or rather
ttl=54
TTL stands for here Time To Live. For IP packets, this value limits how many routers or hops a packet can pass through before it is discarded.
Each corresponding redirection step reduces the value.
Therefore, the TTL value visible in a ping response is not a speed value, nor does it indicate how long a domain remains valid.
Is the Ping TTL the same as the DNS TTL? #
No.
Although in both cases the abbreviation TTL is used, these are different concepts.
For IP packets, TTL limits the lifespan of a packet via the number of network hops.
With DNS, on the other hand, TTL specifies how long a DNS record or DNS response may be cached.
Therefore, the DNS TTL plays a role particularly in DNS changes and caching. You can find more about this under What is DNS propagation and why does a DNS change take time?.
Request timeout #
A timeout initially just means that no ICMP Echo Reply response was received within the scheduled time window.
One possible cause is an unreachable target. However, there are other possibilities.
For example, can:
- ICMP requests are blocked by a firewall,
- Ping replies must be disabled on the destination,
- network devices filter ICMP traffic,
- packages get lost in transit,
- or there are indeed network issues.
Attention: A „Request timed out“ or timeout does not automatically mean that the website is offline.
What does „Destination Host Unreachable“ mean? #
A message like
Destination Host Unreachable
indicates that a participating system could not determine or use a reachable path to the specified destination.
The exact cause can be in various places, for example in the local network, in the routing, or along the way to the destination.
Here too, this message should be considered together with further diagnostic data.
What does „Unknown host“ or „Name or service not known“ mean? #
If a domain name cannot be resolved to an IP address, ping may display a message like, depending on the operating system,
Unknown host
or
Name or service not known
display.
This points more strongly to a name resolution problem than a simple ping timeout.
In this case, first check the spelling of the hostname as well as the nameserver and DNS entries.
With the CURIAWEB DNS-Check can you check publicly visible DNS information.
Why does the website work even though ping fails? #
Because a website and ping use different protocols.
Ping is based on ICMP. A website, on the other hand, is typically provided via HTTP or HTTPS.
A server or an upstream firewall may block ICMP while HTTPS connections are still allowed without any issues.
That is why the following behavior is technically quite possible:
Ping: No response
HTTPS: Website is working
That is no contradiction.
Why does ping work even though the website is not reachable? #
The reverse case is also possible:
Ping: successful
HTTPS: Website unreachable
Then the destination is basically reachable via ICMP, but the web service may not be working correctly.
Possible causes could then be, for example, the web server, firewall rules for HTTP/HTTPS, SSL configuration, domain assignment, or the web application.
A successful ping therefore does not prove that a website is working.
Can I use ping to check which IP address my domain points to? #
Ping often displays the IP address to which the hostname used in that test was resolved.
This can be helpful for an initial check.
However, DNS queries are better suited for a targeted DNS check because a domain can have different record types and the website can also be integrated via CNAME or IPv6, for example.
We explain how to specifically check DNS records at Check DNS records: View current DNS configuration of a domain.
Can a domain have multiple IP addresses? #
Yes.
For example, a hostname can have multiple A or AAAA records. Upstream services can also return different IP addresses depending on location, network, or time.
Therefore, the IP address displayed during a single ping does not necessarily have to be the only possible address of a website.
What is the difference between a ping and a DNS check? #
A ping test and a DNS query answer different questions.
With a DNS check, for example, you examine:
Which nameservers are responsible?
Which A or AAAA records exist?
Which MX records are present?
Which TXT records are published?
In contrast, ping primarily checks whether a specific target responds to ICMP Echo Requests after name resolution has taken place and measures the response times.
Therefore, you should not rely exclusively on ping if you suspect a DNS problem.
Can I use ping to detect a DNS error? #
Ping can provide an initial clue.
If
ping example.ch
cannot resolve IP address for the hostname, there may be a problem with name resolution.
To find the cause, however, you should then specifically examine nameservers and DNS records.
We explain the basics of DNS resolution at DNS simply explained: How the Domain Name System works.
Can I use ping to find out where a website is hosted? #
Very limited.
The IP address visible during a ping can provide a technical clue. However, it does not prove with which company the website operator has concluded their hosting contract.
Upstream systems, reverse proxies, resellers, and other infrastructures can complicate attribution.
We explain how to distinguish between registrar, DNS, web hosting, and email at Where is my domain registered and where is my website hosted?.
Can I test email problems with ping? #
Ping is only suited for this to a very limited extent.
A mail server can respond to a ping and still not accept an SMTP connection. Likewise, it can block ping and process emails completely correctly.
Therefore, if you experience issues with receiving emails, you should examine the MX records and the actual mail flow in particular.
If emails do not arrive, you can find further steps under Emails not arriving: Causes and solutions.
How do I test a domain after a DNS change? #
After a DNS change, you should first check the DNS configuration and not just perform a ping.
Check if the expected nameservers and DNS records are publicly visible.
Ping can then additionally show which IP address your system is currently using for a hostname and whether the destination responds to ICMP.
If different internet connections receive different DNS responses, cached DNS information from a recent change may still be involved.
How do I test a domain after switching to CURIAWEB? #
If you have just connected an existing domain to CURIAWEB, you should first check whether the intended nameservers or DNS records are active.
If the entire DNS management is to be done via CURIAWEB, the CURIAWEB nameservers are:
ns1.curiaweb.ch
ns2.curiaweb.ch
For further troubleshooting steps, see Domain unreachable after switching to CURIAWEB: Causes and solutions.
What needs to be considered with a newly registered domain? #
If a newly registered domain is not working yet, you should not immediately conclude from a failed ping that there is a server outage.
First, registration, nameservers, DNS zone, and hosting configuration must be correct.
You can find a systematic diagnosis under New domain is not working yet: Causes and solutions.
How do I interpret a ping test correctly? #
When interpreting, you can generally distinguish between three situations:
1. Hostname is not resolved
→ Investigate DNS more closely
2. Hostname is resolved, ping does not respond
→ Destination or network does not respond to ICMP
→ Website may still work
3. Hostname is resolved and ping responds
→ ICMP connection to the visible destination works
→ Test website/email separately anyway
This distinction prevents the frequent mistake of directly equating every ping result with the availability of a website.
When is ping particularly useful? #
Ping is well-suited as part of systematic network diagnostics.
For example, you can compare whether a destination is reachable via different internet connections, whether a hostname is resolved, or whether noticeable packet loss occurs during a test.
However, for a complete diagnosis, ping should be combined with DNS checks and tests of the actually affected service.
Practical Tip: If your website is unreachable, document not only the ping result but also the exact error message in the browser and the current DNS values. This information is much more meaningful for troubleshooting than simply saying „ping doesn't work“.
Summary #
You can use a ping test to check if a hostname is resolved and if the reached destination responds to ICMP Echo Requests.
A successful ping can also display response times and potential packet loss during the test.
However, ping is not a complete test for websites or email. A server can block ping and still serve a website without any issues. Likewise, ping can be successful even though the web server or application is not working.
If a domain name cannot be resolved at all, you should check the nameservers and DNS configuration. If an IP address is resolved but the ping remains unanswered, this alone is not yet proof of a server failure.
Therefore, use ping as a building block for diagnosis—not as the sole decision-maker on whether a domain, website, or server is working.