Skip to content

"This site can't be reached" for a cPanel domain: DNS and connectivity triage

The browser shows "This site can't be reached" or DNS_PROBE_FINISHED_NXDOMAIN. The request never gets a usable answer. Here is how to tell DNS from connectivity and fix it.

“This site can’t be reached” — with DNS_PROBE_FINISHED_NXDOMAIN, ERR_NAME_NOT_RESOLVED, or ERR_CONNECTION_TIMED_OUT underneath — is the browser saying it never got far enough to receive an HTTP response. Either the domain name did not resolve to an IP at all, or it resolved but nothing answered on port 80/443. This is different from a 403/404/500, which are HTTP responses from a server that did answer. The fix is to find which half failed: name resolution (DNS) or the connection to the address (firewall, wrong IP, dead service), and correct that.

What’s happening

Loading a site is two distinct steps. First the browser resolves the hostname to an IP address through DNS — your authoritative nameservers return an A (or AAAA) record. Second, the browser opens a TCP connection to that IP on port 443 (or 80) and Apache/LiteSpeed answers. “This site can’t be reached” means one of those two steps never completed, so there is no HTTP status to read.

DNS-side failures: the domain’s A record is missing, points at an old server IP after a migration, or the nameservers at the registrar do not match where the zone is actually hosted (the most common cause after moving hosts). The domain may have expired, or a recently changed record has not propagated. Connectivity-side failures: the A record is correct but the firewall (CSF/iptables) is blocking port 80/443 or the visitor’s IP, Apache/LiteSpeed is down, or the server itself is offline. A new SSL-only setup that has no listener on 443 yet also produces a connection error rather than a certificate warning.

How to verify

Settle the DNS question first — does the name resolve, and to the right IP?

# Does the name resolve at all, and to what?
dig +short A example.com
dig +short A example.com @8.8.8.8
dig +short A www.example.com

# What nameservers does the registrar say are authoritative?
dig +short NS example.com
whois example.com | grep -i 'name server\|expir'

# Compare the resolved IP to this server's real IP
curl -s https://api.ipify.org
hostname -I

If the IP is correct, test the connection itself from outside and from the server.

# Is the port open and answering from the outside?
curl -sI http://example.com/ | head -1
curl -sIv https://example.com/ 2>&1 | grep -i 'connect\|refused\|timed'

# Is Apache/LiteSpeed actually listening locally?
netstat -tlnp | grep -E ':80|:443'
/scripts/restartsrv_httpd --status
/scripts/restartsrv_lsws --status   # if LiteSpeed

Rule out the firewall blocking the port or the visitor:

# Is the visitor's IP blocked? Is the port allowed? (CSF)
csf -g <visitor_ip>
csf -g 443
grep -E 'TCP_IN|TCP6_IN' /etc/csf/csf.conf

The fix

  1. Nameservers do not match the host — dig NS returns nameservers that are not the ones serving the zone (classic after a migration: registrar still points at the old provider). Update the nameservers at the domain registrar to the host’s nameservers, then wait for the registrar TTL. This is the single most common “can’t be reached” after changing hosts.
  2. Missing or stale A record — dig A returns nothing, or an old server IP. Add or correct the A record (and www) in WHM » DNS Zone Manager (or the authoritative DNS provider) to this server’s IP confirmed by hostname -I. Lower the TTL before planned moves so the change takes effect quickly.
  3. Domain expired — whois shows a past expiry date or a registrar-hold status. No DNS fix will help until the registration is renewed at the registrar. Check this early; an expired domain looks exactly like a DNS misconfiguration.
  4. Firewall blocking the port or visitor — csf -g shows the visitor’s IP denied, or port 443 is not in TCP_IN. Unblock the IP (csf -dr <ip>) or add the port to TCP_IN in /etc/csf/csf.conf and csf -r. A whole-country block or a fail2ban-style auto-deny can take a legitimate visitor offline while the site is fine for everyone else.
  5. Apache/LiteSpeed down — netstat shows nothing listening on 80/443 and --status reports the service stopped. Restart it (/scripts/restartsrv_httpd or /scripts/restartsrv_lsws) and check why it stopped — an EasyApache rebuild or a config error can leave no listener (see the dedicated Apache-down runbooks). With no listener, every domain on the box is unreachable.
  6. Resolves but only on www (or only bare) — one of the two hostnames has an A/CNAME and the other does not. Add the missing record so both example.com and www.example.com resolve, and confirm the vhost serves both with a ServerAlias.
  7. Propagation in progress — dig @8.8.8.8 and your local resolver disagree. A recent change is mid-propagation; you wait out the previous record’s TTL. Confirm the authoritative answer is correct (dig A example.com @<authoritative-ns>) and the rest is time.

Once DNS resolves to the right IP and a connection to port 443 returns an HTTP status line, reload — getting any HTTP response (even a 403 or 500) proves the “can’t be reached” layer is fixed; from there you troubleshoot the HTTP error separately. Stack Harbor handles cPanel DNS and connectivity triage under cPanel server administration — start a conversation.