Diagnose Why a Website Won't Load with nw
Build the nw diagnose command. It tests DNS, TCP, TLS, and HTTP one by one and shows the first step that fails, so you know where the problem is.
Diagnose a connection (diagnose)
Tests a destination one step at a time: DNS, then TCP, then TLS, then HTTP. It shows the first step that fails.
How to read the result
- In the summary, each step is ok, FAIL, partial, skipped, or not run.
- Find the first step that is not ok. The steps after it are skipped, and the reason is next to each one.
- The hypotheses section lists possible causes. Confidence is low, medium, or high. These are guesses, not final answers.
Exit codes
0: no problem. 1: an error or a warning. 2: wrong command. 130: stopped with Ctrl-C.
Install nw
If you have Go, this one command is enough. It puts the file in $(go env GOPATH)/bin, usually ~/go/bin.
Other ways to install are on the nwrk.ir install page: ready-made builds for Linux, macOS, and Windows, and install scripts.
The install scripts download a script and run it. Read the script before you run it.
nwrk.ir install page (opens in a new tab)This page only builds the command. You run nw yourself, on your own device.
How to Use It
- Type a domain, domain:port, or a full URL.
- Pick a deeper profile if you want a longer check.
- Copy the command and run it. Find the first step that is not ok.
Questions and Answers
Does FAIL always mean the site is broken?
No. FAIL says that step did not work from your device to the target. The cause can be the site, the network, or interference. The hypotheses section lists the possible causes.
What do I do after diagnose?
If the DNS step failed, run the DNS test with several servers. If foreign sites do not open, run nw doctor --region ir.
Good to Know
This page only builds the command. It runs no test. To run it, install nw on your own device. The commands come from the nwrk.ir docs for version 0.5.
Related Tools
- DNS Lookup with nwBuild the nw command that asks DNS servers about a domain. Works with UDP, TCP, DoT, and DoH. Learn what NXDOMAIN and timeout errors mean.
- Check Internet Access in Iran with nwBuild the nw doctor command for Iran. It checks your device, domestic sites, and foreign sites, and gives one clear result.
- nw Command BuilderBuild the exact nw command to test DNS, TCP, TLS, or HTTP, trace a path, or find why a connection fails. Learn how to read the result and the exit code.
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)