If a website or server is unavailable, slow or only fails to work from certain locations, you can quickly identify where the problem lies using a few commands: in the domain name resolution (DNS), somewhere along the network path, or on the server itself. The commands run in the terminal on Linux and macOS; the equivalent Windows commands are marked separately.
ping: is the machine accessible?
ping -c 10 example.hu
The -c 10 option stops measuring after ten packets (under Windows, ping sends four by default). The summary line shows the packet loss and response time.
- If the ping responds, the machine is accessible on the network.
- If it does not respond, this does not necessarily mean that the server is down: many server firewalls block ping (ICMP) packets. In this case, please check the service using the
curlornccommand below.
dig: Does the domain point to a valid IP address?
After a domain transfer or a change of name servers, the most common issue is that the domain still points to the old IP address.
dig +short example.hu A
dig +short www.example.hu A
dig +short example.hu MX
dig +short example.hu NS
You can also query a specific DNS server to check whether the change is now visible everywhere:
dig +short example.hu A @1.1.1.1
dig +short example.hu A @8.8.8.8
The dig package is called bind-utils on AlmaLinux and dnsutils on Ubuntu and Debian. The article ‘DNS queries using the dig command’ explains how to interpret the output, as well as the steps involved in using the +trace option and performing a DNSSEC check. On Windows, you can perform a similar query using the nslookup example.hu command. You can read about how DNS changes propagate in the article ‘What is DNS propagation?’.
traceroute and mtr: where does the connection get stuck along the way?
traceroute (tracert on Windows) lists the route taken by packets to the server, hop by hop.
traceroute example.hu
mtr is a combination of ping and traceroute: it sends many packets to each node, so even temporary packet loss is visible. We recommend this for reporting faults.
mtr -rwc 100 example.hu
-r: runs in report mode and displays the result at the end,-w: does not truncate machine names,-c 100: sends 100 packets per node (approx. one and a half minutes).
Installation: sudo dnf install mtr or sudo apt install mtr-tiny. On the AlmaLinux 10 cloud image, traceroute was not installed during testing (sudo dnf install traceroute), only the similar but simpler tracepath; on Debian 12, traceroute was present, whilst on Ubuntu 24.04, both mtr and tracepath were available. On Windows, the pathping example.hu command or the WinMTR program provides similar results.
Interpreting the results: if packet loss is apparent at an intermediate node but not at subsequent nodes, this is not a fault: many routers simply respond to test packets with low priority. It indicates a genuine problem if packet loss occurs at every subsequent node from a particular point onwards, including the destination node.
ss: Is the service running on the server?
If you can log in to the server, check which ports it is listening on:
sudo ss -tlnp
Look for the service’s port in the output (e.g.:80,:443,:22,:3306). If the port is not listed, the service is not running; check using the systemctl status command (see: Managing services with the systemctl command). If the port is only listening on 127.0.0.1, it cannot be accessed from outside.
nc and curl: is the port accessible from outside?
You can check whether a TCP port is accessible using the nc command:
nc -zv example.hu 443
nc -zv mail.example.hu 587
The nc package is called nmap-ncat on AlmaLinux and netcat-openbsd on Ubuntu and Debian. If the service is listening on the server but is not accessible from the outside, the port is probably blocked by the firewall (see: How do I set up a firewall on my VPS?).
In the case of a web server, curl also displays the HTTP response:
curl -I https://example.hu
The -I option retrieves only the headers; the first line is the HTTP status code (e.g. HTTP/2 200 or HTTP/1.1 500). You can read about the meanings of these codes in the article on HTTP error and status codes. With the -v option, details of the connection and SSL negotiation are also displayed.
Testing your website before changing your DNS settings
During migration, it is useful to be able to test the site on the new server before changing the DNS settings. With the --resolve switch, you can specify which IP address curl should connect to, whilst the domain name remains unchanged:
curl -I --resolve example.hu:443:203.0.113.10 https://example.hu
What should you send to the support team?
If you are reporting a network fault, please provide the following information to enable us to investigate it quickly:
- their own public IP address (from which the error is occurring),
- the exact time of the fault, and whether it is ongoing or intermittent,
- the output of
mtr -rwc 100 <szerver>from your own computer (under Windows, the results ofpathpingor WinMTR), - If you can access the server, you should also check the output of the command
mtr -rwc 100 <az Ön IP-címe>from the server itself, as the return route may differ.