Why Won't a Website Load? Diagnose IP, DNS, Port and Status Code
Refreshing the page and switching browsers rarely fixes a site that will not load. What works is checking one layer at a time: is the IP address valid, does the domain resolve, is the port reachable, and what did the server return?
- Work down the stack in a fixed order — IP address, DNS, port, then HTTP status — because every layer depends on the one below it
- Addresses in 10.x, 172.16-31.x, 192.168.x and 127.x are private or loopback and can never be reached from the public internet
- A record type tells you what a DNS entry is for: A and AAAA are addresses, CNAME is an alias, MX handles mail, TXT often proves ownership
- An unreachable port has only two causes — a firewall blocking it, or nothing listening on it
- Status codes point to the culprit by class: 4xx is the request side, 5xx is the server side, and 502/504 usually mean a reverse proxy or upstream timeout
- A WebSocket test connects your browser straight to the target, so messages never pass through this site and you can verify wss certificates and auth headers
#Establish which layer is broken
Network troubleshooting follows a fixed order: address, resolution, port, then application protocol. You work upward, because each layer depends on the one below it — and a lower-layer failure often produces a misleading error higher up.
A browser timeout, for example, could mean the domain never resolved, or that it resolved fine but the port is blocked. The browser message alone cannot tell you which — each layer answers a different question:
| Layer | Question | Tool |
|---|---|---|
| Address | Is this a public IP address? | IP Address Lookup |
| Resolution | Which IP does the domain point to? | DNS Lookup |
| Port | Is the target port reachable? | Common Ports |
| Protocol | What did the service return? | HTTP Status Codes |
#Step one: the address itself is wrong
Private and loopback addresses can never be reached from the public internet. If your server address falls in one of these ranges, the investigation stops here.
These ranges are reserved for internal networks:
| Range | Purpose |
|---|---|
10.0.0.0/8 | Private network |
172.16.0.0/12 | Private network |
192.168.0.0/16 | Home and office LAN |
127.0.0.0/8 | Loopback (localhost) |
169.254.0.0/16 | Link-local — usually a DHCP failure fallback |
If the address starts with 169.254., the machine never obtained a valid IP, and every network request from it will fail.
IP Address Lookup shows the address type directly. For IPv6 it also shows the expanded and compressed forms side by side — fe80::1 and fe80:0000:0000:0000:0000:0000:0000:0001 are the same address.
#Step two: does the domain resolve
The signature of a DNS problem is "the IP works but the domain does not." When you see that, go straight to the DNS records.
Each record type answers a different question, and querying the wrong one leads to false conclusions:
| Record | Purpose | When to check it |
|---|---|---|
| A | Domain to IPv4 address | A site will not load |
| AAAA | Domain to IPv6 address | Only some networks can reach it |
| CNAME | Domain to another domain | You use a CDN or third-party service |
| MX | Mail servers | Email is not arriving |
| TXT | Text record | Ownership verification, SPF |
| NS | Authoritative name servers | Confirm who runs the DNS |
Do not expect DNS changes to apply instantly. The TTL value is how long the old answer may still be cached — a TTL of 3600 means up to an hour of stale results. What looks like a wrong record may just be a cache.
#Step three: is the port reachable
An unreachable port has exactly two causes: a firewall dropping traffic, or nothing listening on it. First confirm the port number is right.
Default ports are easy to misremember:
| Service | Default port |
|---|---|
| HTTP / HTTPS | 80 / 443 |
| SSH | 22 |
| MySQL / PostgreSQL | 3306 / 5432 |
| Redis | 6379 |
| MongoDB | 27017 |
Use Common Ports to look up a port by number or find the port for a service by name — it covers 68 common ports across databases, middleware and containers. Once the port is confirmed, check the firewall rules and the listening socket on the server.
#Step four: what did the service return
The HTTP status code carries more diagnostic value than anything else, because it tells you whether the fault is on the request side or the server side.
- 2xx success — the request was handled; look at page logic or front-end assets
- 3xx redirect — watch for redirect loops, or a jump to http that triggers a certificate warning
- 4xx client — 401 unauthenticated, 403 forbidden, 404 wrong path, 429 rate limited
- 5xx server — 500 unhandled exception, 502 invalid upstream response, 503 unavailable, 504 upstream timeout
502 and 504 almost always point at the reverse proxy layer, not your application code. A 502 means the proxy reached the backend but got an invalid response — the process died or the port is misconfigured. A 504 means the proxy gave up waiting — the backend is slow or deadlocked. Checking whether the backend process is alive beats reading code.
Look up individual codes in HTTP Status Codes, which lists the common 1xx to 5xx responses with plain-language explanations.
#Test long-lived connections separately
A WebSocket handshake rides on HTTP, but it fails for entirely different reasons — HTTP tools will not show you the cause.
The differences that matter:
- The handshake needs an
Upgradeheader, which an intermediary proxy may strip wss://must pass certificate validation, so a self-signed cert fails outright- Many gateways do not support long-lived connections and treat the upgrade as a plain HTTP request
- Browsers validate cross-origin WebSocket connections differently from AJAX calls
Use WebSocket Test to connect to a ws:// or wss:// endpoint:
- Connect to a public echo server first to confirm your network and the tool work
- Switch to the real target and watch whether the handshake succeeds
- Send a message and check whether a reply comes back
- Read the connection log — a socket that closes immediately after opening usually means authentication failed
This connection runs directly from your browser to the target; messages never pass through this site. Note that the browser WebSocket API cannot set custom headers, so if you need to test "only this header passes," use a command-line tool or a backend script instead.
#Which tool for which job
| What you need | Tool | Notes |
|---|---|---|
| Check whether an IP is public or private | IP Address Lookup | Also shows IPv4 base conversions and IPv6 expanded/compressed forms |
| See where a domain resolves | DNS Lookup | A/AAAA/CNAME/MX/TXT/NS/SOA with TTL |
| Find the port for a service | Common Ports | 68 common ports, searchable by number or name |
| Understand a response code | HTTP Status Codes | 1xx to 5xx with plain descriptions |
| Debug a long-lived connection | WebSocket Test | Connect, send, receive, log |
| Pull IPs or emails out of a log file | Regex Tester | Common log-analysis task |
#Frequently asked questions
#The IP works but the domain does not. Why?
That is a DNS problem. Either the domain does not point at the right address, or a CDN or intermediate resolver is serving a cached answer. Query the A record and its TTL with DNS Lookup and compare it against the real server IP. If you changed the record recently, wait for the TTL to expire.
#Why does a site load on some networks but not others?
Three common causes: the domain has both A and AAAA records but only one family actually works; a CDN resolves to different edge nodes and one is unhealthy; or a local DNS resolver is returning bad answers. Check AAAA first, then compare across networks.
#Is an unreachable port a firewall problem or a dead service?
Check both, but check the service first. On the server, confirm a process is listening on that port (ss or netstat will show it). If something is listening but external connections fail, it is the firewall or security group.
#What is the difference between 502 and 504?
502 Bad Gateway means the reverse proxy received an invalid response from the backend — typically a crashed process or a wrong port. 504 Gateway Timeout means the proxy gave up waiting — typically a slow or stalled backend. The first calls for checking processes, the second for checking performance and timeout settings.
#Why does a WebSocket connection close right after opening?
Usually failed authentication: the server rejects the token or header and closes the connection itself. Less often it is a protocol mismatch, or an intermediary gateway that does not support long-lived connections and treats it as a normal HTTP request. Confirm the network with a public echo server first, then check auth and gateway configuration.
Tools used in this guide
Parse IPv4/IPv6, detect public/private/loopback
Open tool →DNS LookupLook up A, AAAA, CNAME, MX, TXT, NS, SOA, SRV and CAA records, including unde…
Open tool →WebSocket TestConnect to ws/wss endpoints and exchange messages
Open tool →HTTP Status CodesReference for 56 common HTTP status codes, grouped by class with causes and f…
Open tool →Common PortsReference table of 68 common service ports
Open tool →