Using the ping, traceroute, and telnet commands

If you are unable to access your website or a specific service running on our servers, you can use the ping, traceroute, and telnet commands to investigate why that happens.

What are the ping, traceroute, and telnet commands used for?

The ping command allows you to check if a connection can be established between your device and a specific hostname or IP address. Another usage of the command is to determine to what IP address a specific hostname resolves on your device.

The traceroute (tracert on Windows) command, as the name suggests, allows you to trace the route a network packet takes from your device to a specific hostname or IP address. Each hop from the route of the packet is presented on a new row, and three checks will be made for it. You can use this information to find which servers between your device and the target hostname/IP address are responding slowly. The result of the command can also help you determine if and where a connection may be blocked, so you can reach out to the correct service provider for assistance.

With the telnet command, you will essentially use the telnet utility, which allows you to establish a connection from your device to a specific web service that works at a hostname or IP address on a specific port. For example, you can use this command to connect to an FTP or SMTP server. You can cancel a telnet connection by pressing Ctrl+] on your keyboard, and to exit the telnet utility, you will need to type quit and hit ↵ Enter.

Where to execute the ping, traceroute, and telnet commands?

You can execute the commands in the Command Prompt (for Windows) or Terminal (for macOS and Linux) applications.

To open the Windows Command Prompt, press ⊞ Win+R on your keyboard to open the Run application feature and type cmd in the Run application window. You can copy information (e.g. command output) from the Command Prompt by selecting it and then pressing the ↵ Enter key. More details and screenshots on the process are available in our Copying text (traceroute or ping results for example) from a DOS prompt article.

You can open the Terminal application on macOS by going to "Finder" > "Applications" > "Utilities" > "Terminal".

If you want to open Terminal on Linux, you should press the Ctrl+Alt+T keys on your keyboard. Alternatively, you can press Alt+F2 and type terminal - you should see a list of available terminal applications.

How to use the ping command?

Note: On Linux, you may need to install additional packages to use the ping command, so please refer to your distribution's documentation if the command is not available by default.

To use the ping command, you need to enter it in a Command Prompt or Terminal window as explained above. If you want to test your connection to a hostname (e.g. example.com) or an IP address (e.g. 8.8.8.8), you should run the following ping commands:

ping example.com
ping 8.8.8.8
On macOS and Unix devices, the ping command will run continuously until interrupted. You can stop the command by pressing the Ctrl+C keys on your keyboard.

You can also use the count (-c) option to specify the number of ping retries, or in other words, how many ping requests should be sent. This option may require additional privileges, so you may have open the Command Prompt or Terminal window as an administrator or a user with escalated privileges. In the below example, you can see the exact ping command for making 10 retries (connections) to example.com:

ping -c 10 example.com
Here is а sample result from the ping dns.google command:

Pinging 8.8.8.8 with 32 bytes of data:

Reply from 8.8.8.8: bytes=32 time=6ms TTL=59
Reply from 8.8.8.8: bytes=32 time=8ms TTL=59
Reply from 8.8.8.8: bytes=32 time=5ms TTL=59
Reply from 8.8.8.8: bytes=32 time=5ms TTL=59

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 8ms, Average = 6ms

From the result, we can conclude that the dns.google hostname resolves to IP address 8.8.8.8 from our device, and there are no lost packets.

How to use the traceroute command?

Note: If the traceroute command is not available by default on a Linux device, additional packages may have to be installed. Please check your distribution's documentation for more details on that matter.

To check the route of an internet packet from your device to a particular hostname (e.g. example.com) or an IP address (e.g. 8.8.8.8), you can run the following commands in a Command Prompt window for Windows:

tracert example.com
tracert 8.8.8.8
or the following commands in a Terminal window for macOS or Linux:

traceroute -I example.com
traceroute -I 8.8.8.8
Note: On macOS and Linux devices, the traceroute command packets are sent via UDP by default, and such requests are restricted on our servers due to security concerns. For this reason, you should use the "-I" (--icmp) or "-T" (--tcp) options which configure the traceroute command to explicitly use ICMP or TCP instead of UDP.

An example result of the traceroute command to dns.google should look like this:

Tracing route to dns.google [8.8.8.8]
over a maximum of 30 hops:

  1     2 ms     1 ms     1 ms  192.168.0.1
  2     3 ms     2 ms     7 ms  192.168.100.1
  3    12 ms     5 ms     5 ms  redacted_hostname [redacted_IP_address]
  4     5 ms     9 ms     9 ms  209.85.174.19
  5   146 ms    40 ms     5 ms  209.85.174.18
  6    14 ms     8 ms     4 ms  142.251.244.71
  7     6 ms     5 ms     8 ms  142.250.60.187
  8     7 ms     9 ms     7 ms  dns.google [8.8.8.8]

Trace complete.

Here you can see that the trace completed successfully and the end destination (hostname dns.google with IP address 8.8.8.8) was reached.

In some hops of a traceroute you may see "Request timed out." results. This is normal and should be of no concern as the device that handles your packet in that hop may not be accessible directly from your device. If the trace ends at such a hop, it could be indicative of a problem, and you should contact your internet or hosting service provider for assistance.

The hosting Control Panel > Traceroute section allows you to run the traceroute command from the server of your hosting account to a hostname or an IP address of your choice. Your IP address will be prefilled by default, so you can easily test the connection from the server to your IP address.

How to use the telnet command?

Note: Telnet may not be available by default on all operating systems. For more recent versions of Windows, please refer to the official documentation on enabling telnet. Telnet is also not available on newer versions of macOS and some Linux distributions. It can be enabled by installing additional packages, so we would suggest that you search for the recommended telnet client/application for your operating system. Alternatively, you can use the netcat command for Linux, which is also available for macOS but shortened to just nc.

To run the telnet and netcat commands, open the Windows Command Prompt or macOS/Linux Terminal application. In the commands, you will need to specify the hostname or IP address and port of the service that you wish to test from your device. The services running on our servers work on the default ports. Here is a brief list of the default ports that you are most likely to test for connection problems with the telnet or netcat command:

ServicePort(s)
Web80 (HTTP), 443 (HTTPS)
FTP21
SSH22
Incoming mail110 (POP3), 143 (IMAP), 993 (IMAPS), 995 (POP3S)
Outgoing mail587 (SMTP), 465 (SMTPS)
Database3306 (MySQL 5), 3308 (MySQL 8)


Let's consider the following situation - your email software application stops downloading email messages from our servers, and you are using IMAPS (port 993) to connect to the incoming mail server for your account (mail.your_server.com) as per the instructions in the Configuring an e-mail program (Outlook, Thunderbird, Mail, etc) section of our online documentation.

To test if you can connect to the mail server from your device, you can use the following telnet command:

telnet mail.your_server.com 993
If you connect successfully, you will see a blinking pointer on a blank screen in Microsoft's Command Prompt or a message like the following in the Terminal application on macOS/Linux:

Trying redacted_IP_address...
Connected to mail.your_server.com.
Escape character is '^]'.

To close the connection, press Ctrl+]. You will remain in the telnet program, so enter the quit command and press ↵ Enter to exit, or just close the window.

Should you prefer to use the netcat command to test your connection to the mail server, you should run the following command for Linux:

netcat -vz mail.your_server.com 993
or its nc equivalent for macOS:

nc -vz mail.your_server.com 993
The result from the netcat (nc) command should look like this if successful:

DNS fwd/rev mismatch: mail.your_server.com != your_server.com
mail.your_server.com [redacted_IP_address] 993 (imaps) open

If you are unable to connect, you can see errors like:

Connecting To mail.your_server.com...Could not open connection to the host, on port 993: Connect failed
telnet: could not resolve mail.your_server.com/993: Name or service not known
DNS fwd/rev mismatch: mail.your_server.com != your_server.com
mail.your_server.com [redacted_IP_address] 993(?) : Connection timed out


These errors indicate that something is blocking the connection from your device to the service running on hostname mail.your_server.com on port 993. The possible reasons include but are not limited to:

  • The email application lacking privileges to use port 993 on the device.
  • Anti-virus software blocking all connections on port 993 or to the mail server hostname (mail.your_server.com).
  • The operating system blocking port 993.
  • A router blocking connections on port 993.
  • Your internet service provider blocking connections on port 993 or to the mail server hostname (mail.your_server.com).
  • Your IP address being blocked/blacklisted by a firewall on the mail server (mail.your_server.com).