Networking

How to Check if a Website Is Down (or Just Down for You)

To check if a website is down, load it from a different network (your phone with Wi-Fi off works) or run curl -I https://example.com and read the result. If it loads elsewhere, the site is up and the problem is on your side; if it fails everywhere, the site or its host is down.

Replace example.com with the site you are testing in every command below.

Is it down for everyone or just you?

This is the first question to settle, and it needs no commands:

  1. Turn off Wi-Fi on your phone and open the site over mobile data. A different network rules out your router, your ISP's DNS and any firewall or VPN on your computer.
  2. Open the site in a private window or a different browser. That rules out a bad cookie, extension or cached error page.
  3. Ask someone in another place, or use an online status checker. A checker runs the test from its own servers, so a success there means the site is up for them even if it fails for you.

A status checker has a limit: it tests from one or a few locations. A site can be unreachable from your region and still look fine to the checker.

Check from the command line with curl

curl ships with Windows 10 and 11, macOS and most Linux distributions. Ask only for the response headers:

curl -I --connect-timeout 10 --max-time 20 https://example.com

-I (--head) fetches the headers only. --connect-timeout limits the connection phase to 10 seconds, and --max-time limits each transfer to 20 seconds, so the command cannot hang for minutes. In PowerShell, curl can be an alias for Invoke-WebRequest; type curl.exe instead.

Example output for a working site:

HTTP/2 200
content-type: text/html; charset=UTF-8

To print only the status code, which is handy in scripts:

curl -s -o /dev/null -w "%{http_code}\n" https://example.com

On Windows Command Prompt or PowerShell, use NUL instead of /dev/null. -s hides the progress meter, -o throws the body away, and %{http_code} is "the numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer".

What the result tells you

A response with a status code means the server answered, so the network path works. A failure with no status code means the problem is earlier, and curl's exit code (echo $? on Linux and macOS, echo %errorlevel% in Command Prompt) says where:

ResultMeaningLikely cause
Exit code 6, "Could not resolve host"DNS lookup failedDomain expired or misconfigured, or your DNS resolver is failing
Exit code 7, "Failed to connect to host"The name resolved but the connection was refused or unreachableServer or web service is off, or a firewall blocks you
Exit code 28, "Operation timeout"The time limit you set was reachedServer overloaded or unreachable, or packets dropped on the way
Exit code 35, "SSL connect error"The TLS handshake failedServer TLS misconfigured
Exit code 60, "Peer certificate cannot be authenticated with known CA certificates"The certificate was not trustedExpired or wrong certificate, or an untrusted proxy in the path

The meanings of the exit codes are from the curl man page. The "likely cause" column is a guide, not a diagnosis: the same exit code can have more than one cause.

Check the port on Windows with Test-NetConnection

PowerShell can test whether the web port accepts a connection:

Test-NetConnection -ComputerName example.com -Port 443

The output includes TcpTestSucceeded. True means a TCP connection to port 443 (HTTPS) was established. False means it was not, which points at the server, a firewall or the route. Use -Port 80 for plain HTTP, or -CommonTCPPort HTTP. Without -Port, the cmdlet does a ping test and reports PingSucceeded.

A TCP connection only proves the port is open. The site can still return an error page, so use curl as well. For what port numbers are, see What is a port number?

Why ping is not a reliable test

A reply to ping shows that the machine is reachable by ICMP. It says nothing about the web server on it. In the other direction, some servers and firewalls do not answer ping at all, so a timeout does not prove the site is down. Treat ping as a hint and test the web port directly. The details are in the ping command guide.

What common HTTP errors mean

StatusWhat it meansWho can fix it
503 Service Unavailable"The server is not ready to handle the request", for example overloaded or down for maintenanceThe site owner; retry later
502 Bad GatewayA gateway or proxy received an invalid response from the upstream serverThe site owner
504 Gateway TimeoutThe proxy received no HTTP response from the originThe site owner
429 Too Many RequestsYour client is being rate limitedYou: slow down

MDN notes that a 503 may carry a Retry-After header with the estimated time for recovery, and that it should be used for temporary conditions. MDN also says a 502 can be a client-side problem when the service works for other visitors and you use a VPN or custom networking, so check proxy, firewall and DNS settings in that case. The full list is in HTTP status codes explained.

If the site is up for others but not for you

  • Flush your DNS cache. A stale or bad DNS answer is a common cause. Steps for each system are in flush the DNS cache, and how DNS works explains the lookup.
  • Turn off your VPN or proxy and retry. Some sites block VPN address ranges.
  • Try another DNS resolver or another network. If the site works on mobile data, the fault is in your home network or your ISP.
  • Check your system clock. A wrong date makes certificates look invalid, which can produce curl exit code 60 or a browser certificate warning.

If the site is down for everyone

Nothing on your side will fix it. Check whether the service has an official status page, retry in a few minutes, and avoid refreshing in a tight loop, which adds load to a server that may already be overloaded. If it is your own site, check the web server process and any proxy or load balancer in front of it first, and read the error log for the time of the failure.

Frequently asked questions

How can I tell if a website is down for everyone or just me?
Try the same address from a different network, for example your phone with Wi-Fi turned off, or from a third-party status checker. If it loads there, the problem is on your side: your connection, DNS, browser, VPN or firewall. If it fails everywhere, the site or its host is down.
What does a 503 error mean?
503 Service Unavailable means the server is not ready to handle the request, usually because it is overloaded or down for maintenance. It is meant to describe a temporary condition. Only the site owner can fix it, so waiting and retrying is the right response.
Does a failed ping mean the website is down?
No. Some servers and firewalls do not answer ping, so a site can load fine in a browser while ping times out. A test of the web port itself, such as curl or Test-NetConnection on port 443, is a better check.
What is the difference between a 502 and a 504 error?
Both come from a gateway or proxy in front of the real server. 502 Bad Gateway means the proxy got an invalid response from the upstream server. 504 Gateway Timeout means it got no response from the origin at all.

Sources