Skip to main content
HandyWeb

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.

Example: 1.1.1.1 or tls://9.9.9.9 or https://dns.google/dns-query
Profile

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.

go install github.com/radestsam/nwrk/cmd/nw@latest

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

  1. Type a domain, domain:port, or a full URL.
  2. Pick a deeper profile if you want a longer check.
  3. 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.

Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)