Skip to content
We areTOP 1%

A website is not loading on your laptop. How would you troubleshoot it?

MediumConceptScenario Questions
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Work up the layers from the bottom, testing one thing at a time, so that each successful check rules out a whole class of causes. The first check that fails points to the faulty layer.

  • Link and IP configuration: confirm the cable or Wi-Fi connection, then run ipconfig (Windows) or ip addr (Linux). An address such as 169.254.x.x means DHCP failed.
  • Reachability: ping the default gateway (for example 192.168.1.1) to test the local network, then ping 8.8.8.8 to test routing to the internet.
  • DNS: run nslookup example.com. If IP addresses respond but names do not resolve, the DNS server setting is at fault.
  • Transport and application: curl -v https://example.com shows whether TCP connects on port 443, whether TLS succeeds and which HTTP status returns, such as 503 from an overloaded server.

Example:

$ ping 192.168.1.1        replies     -> the LAN and router are fine
$ ping 8.8.8.8            replies     -> routing to the internet works
$ nslookup example.com    timed out   -> DNS is broken

The fault is DNS. Switching to a working resolver such as 1.1.1.1 fixes it, and it explains why the site opened by IP address but not by name.

More in Scenario Questions

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account