Q: What is a 504 error?
A: 504 errors are a type of code that appears on a page when the server cannot present it to you. It is common among other errors like 404s, when a page can’t be found. Read more to learn about linking errors you might find on State websites, and how to fix them.
When your browser asks a server for a webpage (or API data), the server replies with a three-digit number called a status code.
If you get a 200 HTML code on the backend, the page will just present itself. It loads normally.
300 codes are for redirects, meaning the page has moved somewhere else.
400 codes mean there is an error, usually on your end, creating the link to the page.
500 codes indicate that the server has a problem, and the website itself is having an issue.
Here are the most common errors explained simply:
-
404 Not Found - Very common
The page or file you're asking for doesn't exist on the server.
"Page not found" — wrong URL, deleted page, broken link, or typo in the address. To fix this, check that the link has no typos, and that the page it is linking to still exists.
-
500 Internal Server Error
Something broke on the website's server. It's a general "oops, we have a problem" message.
The server crashed, it has bad code, or a database issue, but it doesn't tell you exactly why.
It’s usually temporary. You can try the page again at a later time.
-
502 Bad Gateway
The server is acting as a middleman (gateway/proxy), but got a bad or invalid reply from another server behind it. This is common with load balancers, CDNs (like Cloudflare), or when one part of the website's backend fails.
-
503 Service Unavailable
The server is temporarily down or too busy to handle your request. It may be overloaded, under maintenance, or have too many visitors. This error often comes with a "try again later" message.
-
504 Gateway Timeout
The server (acting as a gateway or proxy) waited too long for a reply from another server it needs to talk to.
In simple terms: The middleman asked the real backend server for information, but the backend took too long or never answered, so the middleman gave up and showed you a 504 Gateway Timeout.
Common causes:
- The website's backend is very slow (heavy database query or overload).
- Network problems between servers.
- Firewall blocking.
- The upstream server crashed or is down.
It's a server-side issue. Refreshing might help if it's temporary, but usually the website owners need to fix it by increasing timeouts, optimizing performance, or resolving the underlying server issue.
Quick error code summary
| Code | Name | What it means | Who's to blame? |
|---|---|---|---|
| 404 | Not Found | Page doesn't exist | Usually you (bad URL) or the site removed it |
| 500 | Internal Server Error | Server broke internally | Website/server |
| 502 | Bad Gateway | Middle server got an invalid reply from the backend | Website/server |
| 503 | Service Unavailable | Server too busy or under maintenance | Website/server |
| 504 | Gateway Timeout | Middle server waited too long and received no answer from the backend | Website/server |