After ordering 404 and 502 one by one, the 4 is your fault, the 5 is the stationmaster's fault

Watching videos spinning, web pages not opening, links clicking in are blank—the browser actually receives a reply from the server every time, just hiding the most crucial sentence. That phrase is the status code—a three-digit number, like 200, 404, 502. I have a small site myself, and the server logs keep flooding with numbers like these numbers, but if I really wanted to clarify every code, I still found a service that lets me casually click status codes and tried them one by one. Let me start with a general outline: Starting with 4 is mostly your problem, starting with 5 is the webmaster's fault. Remember this sentence, and you'll have a clear direction for most of the 'unopened' investigations.
First, to clarify: the status code is the first line of the server's reply
You type a URL in the address bar and press Enter; the browser sends a request for you, and the server picks up, handles, and responds. The first line of a reply is always a three-digit number plus a phrase, such as 200 OK or 404 Not Found. The browser usually doesn't show you this; it gets the numbers and judges for itself: starting with 2, it just densely renders the page; starting with 3, it moves along; only starting with 4 and 5 does it brighten the error page.
It's not hard to see it with your own eyes. If curl is installed on the computer, a single command line is required:
curl -s -o /dev/null -w "%{http_code}" URL
Press Enter and you'll spit out a number. I tried three things on my own site: homepage returns 200; Randomly make up a nonexistent page and reply to 404; If you miswrote the article category (for example, writing another name for an encyclopedia category), you actually redirected to 301 instead of 404, and it only redirects to 200 to the correct address. The same 'can't open' actually means three completely different words—this is the value of status codes: the string of characters in the URL is responsible for finding the server, and the status code tells you the result.
Five families: The first digit determines the property
There are over a hundred status codes, but the first digit overshadows their nature, so there are only five companies:
| Family | members | often speak in |
|---|---|---|
| When talking to 1xx, | respondfirst, don't add | 100, 101 |
| 2xx | is done. What you want is | 200, 204, 206 |
| 3xx | , not here; find 301 | , 302, 304 elsewhere |
| 4xx | Ifthe item you want or your posture is wrong | ,403, 404, 429 |
| 5xx | The server itself has | aproblem 500, 502, 503, 504 |
1xx is rarely seen; it's the 'received, continue' process during large file transfers. The ones who truly interact daily are the four families behind them. There's a service called httpbin that specifically provides a status code test address. You can click on the corresponding code by adding a number after the URL. I've selected all the commonly used ones, and now I'll focus on what works for home use.
Starting with 2, 'Moved'; starting with 3: Six people counted one by one
200 is the most standard for success; the server gives you the full content. Webpages, images, interfaces—under normal circumstances, it's all about it.
204 means "It's done, but there's nothing to show you." You click delete or mark read on the webpage, the server handles the matter and returns an empty 204—the browser doesn't need to refresh any new pages. Many "clicks with no response" actually get the backend replying to 204, the task is done, but no response.
206 Most Interesting: Partial content. It works with the Range in the request header (I want a certain segment). You can freely drag the progress bar to watch videos, thanks to it—if you drag the bar to the 7th minute, the player only asks the server for that area, and the server returns 206 plus a few MB of data, not re-uploading the entire file. The download tool's breakpoint resume mechanism is the same, continuing from the last disconnect point.
301 is a permanent move. The server says, 'This thing will always live at the new address from now on.' Not only does the browser go to the new address itself, it also records the migration info in a small notebook. Next time you enter the old address, it will copy a shortcut. The browser cache article mentioned its pitfall: 301 is recorded locally in the browser, but when the webmaster changes it back, old visitors are still dragged back to the old address, and the site data is cleared before it drops.
302 is a temporary outing; I'll go there today and might come back tomorrow. The browser doesn't keep long-term notebooks. It's basically used for login redirects and event page redirects. After 301 and 302, there are two more more serious brothers, 307 and 308. The difference is that after transferring, the request method doesn't change—only those writing code and submitting forms need to worry, and you can't find them online at home.
304 means 'What you have is still fresh, no need to repost.' The browser brings a local cache timestamp and asks, "Can I still use this file?" The server glances and doesn't change, only replies with a 304 empty body, and the browser renders using its own cache. When F12 opens the network panel and sees a bunch of 304 files, that's helping you save data, not a mistake.
Starting with 4 is your pot: 403, 404, 429, and an Easter egg
403 means 'I know you, but don't let you in.' The server knows what you want, but the permissions are insufficient. The shared folders on the home NAS, certain interfaces in the router's backend, and some unmatched account permissions are these ones. The difference from 404 is one thing: 403 has doors open and someone is blocking them, 404 has no door to be found at all.
404 is most famous: The server received your request and went to look for it, but it didn't have this item. If a link is copied halfway, the page is deleted by the webmaster, or there is a case misspell, it will all be 404. By the way, here's an easy tip: port is written incorrectly and you can't even get 404. That's because you haven't even knocked on the server's door; the browser keeps spinning until timeout—at least 404 is the server responding to you.
429 means 'You knocked too hard.' High-frequency requests in a short period trigger rate limits, and the server tells you to wait and try again. Script crawling and third-party app interfaces are too heavily tuned, which is common.
There's also an Easter egg 418: I am a teapot. On April Fool's Day 1998, the IETF issued a prank protocol RFC 2324, saying that using the coffee protocol to control the teapot would result in 418. It was originally a joke, but in the end, major servers treated it like an Easter egg. In 2017, the standards organization wanted to delete it, programmers launched the "save418" protest, and it was eventually retained. I clicked on the test address, and the server replied correctly with a 418 message. The sense of humor on the internet can sometimes be quite serious.
Starting with 5 is the webmaster's fault: 500, 502, 503, 504
500 was because the server program crashed on its own, the code error wasn't received, and the webmaster didn't even check the logs without knowing where it died.
502 stands for Bad Gateway. Nowadays, slightly larger websites have reverse proxies or CDNs in front, while the real work is hiding in the background. 502 means: the front end forwards the request to the backend program, and the backend either crashes or replies with something it can't understand. The 502 page you see is actually posted by the front end, and the back end is still alive. The few seconds after a website update and restart are the most likely to hit 502.
503 means overwhelmed, overloaded servers, or under maintenance, meaning "try again later." Ticket grabbing, flash sales, and the queue pages that appear when concerts go on sale are all based on this theme.
504 means the gateway is waiting for the backend to time out. A pair of brothers in trouble with 502: 502 was instantly interrupted in the backend, 504 was too slow in the backend, and the front desk waited for them to get impatient and quit first. When watching videos during the evening rush hour, the few requests you get are 504.
All
four faults are on the server side; refreshing, changing browsers, restarting routers is all wasted. All you can do is wait or notify the webmaster through another channel. I once had a program crash on my own site in the middle of the night. The next day, I checked the surveillance for half an hour and it was all 502. On the reader's side, they were all thinking, 'Is this site gone?'—the truth is, the webmaster was sleeping.
How to triage if it won't open: First, check if you get the numbers
String these codes into a sorting order, so next time you can't open them, don't guess blindly:
| Most of the time | , it's about | what you should do |
|---|---|---|
| Kept spinning in circles but finally timed out, no code | ,no | door to check the network, DNS resolution, website crashed |
| 404 | pages missing or addressed incorrectly | Check if the address is half-broken, search the site for the title |
| 403 | If permissions are insufficient | , log in; if necessary, contact the administrator |
| 5xx | The site owner's fault | is to wait ten minutes and try again. If it still doesn't work, that's the webmaster's problem |
| . The page is normal but the content is incorrect | Cache old | Ctrl+F5 forced flashes, or clear website data |
There's also an unconventional approach: even if the status code is correct, the content can still be wrong. WeChat article link deletes the "parameter error" page, the status code is a proper 200—the server says "I've given you everything you want," but it only shows a page error message. Digital code management is about whether the content is correct or not, regardless of whether it is correct. So don't treat 200 as a safe; whether the page is white or not, you still need to check for yourself.
Here's a final tip: If you start with 2, move your house; if you start with 4, try changing your posture and try again; if you start with 5, stop brushing—it's the webmaster's job. The last thing in the network search list—the transport layer (unable to connect, certificate errors)—was stopped before the digit code. If interested< a href="https://www.shunot.com/en/lybk/1117.html"> https and HTTP are the first half of the story.
