How to check if a website is down
Load the site from a second network, such as your phone on mobile data, and run curl against it from a terminal: if both fail it is down for everyone, and if only your connection fails the problem sits between you and the site.
A page that will not load is one of five things: your connection, your DNS resolver, your browser, the site blocking you, or the site actually being down. The first four are "just me". Only the last is "down for everyone". Telling them apart takes about a minute, and guessing wrong costs more, because you either restart a healthy server or wait out an outage you could have fixed.
How to check if a website is down or just me
- Open it on your phone with wifi off. Mobile data means a different network, a different DNS resolver and a different IP address. If it loads there, the site is up and the problem is on your side.
- Try a private window. It skips cached redirects, cookies and extensions. A site that works in private but not in your normal window has a browser problem, not an outage.
- Ask a checker. Down For Everyone Or Just Me requests the site from its own servers and reports what it got. Downdetector works differently: it counts user reports, so it is good for Netflix or Slack and useless for a site with 40 visitors a day.
Check it from a terminal
curl tells you what the server actually answered, which a browser error page often hides. Swap in the domain you care about:
# 1. What did the server answer, how fast, and from which IP?
curl -sS -o /dev/null -w '%{http_code} in %{time_total}s from %{remote_ip}\n' https://example.com
# 2. What does your own resolver say the name points to?
dig +short example.com
# 3. What does a public resolver say? A different answer means stale local DNS.
dig +short example.com @1.1.1.1 - 200 or a 301: the server is up. If the browser still fails, look at the browser, an extension or a cached redirect.
- 500, 502, 503 or 504: the site is down for everyone. A 502 or 504 usually means the proxy in front is fine and the app behind it is not.
- 000 with "Could not resolve host": DNS. Either the domain lapsed or your resolver is wrong, so compare the two dig answers.
- 000 with "Failed to connect" or a timeout: nothing is listening, or a firewall dropped you. Try from mobile data before blaming the server.
Check if website is down for everyone
One request from one place is a sample of one. A site can be down in one region and fine in another, broken over IPv6 and fine over IPv4, or blocking your country while serving everyone else. The useful answer to "is it down for everyone" is a check that runs from outside your network on a schedule and keeps the history, so you can see when it started and whether it is still happening.
If the site is yours, stop checking by hand. You only check after someone complains, which is the worst moment to find out.
A monitor or curl by hand
Logdash vs checking with curl by hand
| Feature | Logdash | curl by hand |
|---|---|---|
| When it checks | Every 5 minutes free, every minute on Builder, every 15 seconds on Pro | When you remember to |
| Rules out your own connection | Always, it runs outside your network | Only from a second network |
| Why it failed | Status code and error message | dig and the curl error show the cause |
| Setup | One form, free for 5 services | Nothing, curl is already installed |
When curl by hand is the better pick
- The site is not yours. You want one answer now, not a monitor on someone else's server.
- You are mid-incident and need the DNS answer or the exact connection error. The monitor says it failed, the commands say why.
Make a monitor check it for you
- Add the URL Create a service in Logdash and give it the address. The free plan covers five services checked every 5 minutes, Builder checks every minute and Pro every 15 seconds. Every check stores the status code and response time.
- Connect Telegram Add a Telegram channel once and attach it to the monitor. The bot sends a welcome message straight away, so you know the wiring works before you need it.
- Take it down on purpose Stop the server or make the URL return 503. On the next check the monitor flips to down and a Telegram message reaches your phone with the site name, the status code and the error, such as "Timed out after 10s".