1. Current Location: Home >  Router Encyclopedia >  What exactly do 404 and 502 mean? I ordered each one by one: if it starts with 4, it's your fault; if it starts with 5, it's the station manager's fault

What exactly do 404 and 502 mean? I ordered each one by one: if it starts with 4, it's your fault; if it starts with 5, it's the station manager's fault

Overview of HTTP status code families: 1xx in conversation, 2xx in succession, 3xx moving, 4xx your fault, 5xx webmaster's fault, including the meanings and triage mnemonics for 200/204/206/301/302/304/403/404/429/418/500/502

watching videos spinning, pages won't open, links go blank everywhere, browsers actually receive server replies 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's start with a general outline: 4 is usually your problem, and starting with 5 is the webmaster's fault . Remember this sentence, and you'll have a clear direction for most of the 'unopened' investigations.

clarify first: the status code is the first message the server replies

you type a website address 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, 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.

want to see it with your own eyes. If curl is installed on the computer, a single command line is:

curl -s -o /dev/null -w "%{http_code}" URL

press Enter and it spits 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—that's the value of status codes. the string of characters at the URL finds the server, and the status code tells you the result.

Five Families: The First Digit Determines Properties

There are over a hundred

status codes, but the first digit kills their nature—only five

family common common
1xx in conversation, respond first: don't hang up, 100 101
2xx done, what you want is here200, 204, 206
3xx not here, look elsewhere for 301, 302, 304
4xx the item you want or your posture is problematic403 404, 429
5xx server is messing up on its own500、502、503、504

1xx rarely seen; it is 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.

2 starts with 'Cheng' and '3' starts moving: six people count one by one

200 is the most standard, the server gives you the full content. Webpages, images, interfaces—under normal circumstances, it's all about it.

204 is "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: some content. It works with the Range in the request header (I want a certain segment). can freely drag the progress bar when watching 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 resending 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. browser cache mentioned its pitfall: 301 is recorded locally in the browser, and if the webmaster ever changes it back, old visitors will still be dragged back to the old address and only get dropped after cleaning the website data.

302 is a last-minute trip—going there today and maybe coming 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 is "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.

4 starts with your fault: 403, 404, 429, and an Easter egg

403 is 'I know you, but won'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 most famous: The server received your request and went to look for it, but found no such thing. 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 thing to do: port is written wrong you can't even get 404, which means you haven't even knocked on the server door; the browser keeps spinning until timeout—at least the server just brushed you off.

429 is 'You knock 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.

also has an Easter egg418: I am the 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.

5 starts with the stationmaster's fault: 500, 502, 503, 504

500 the server program crashed on its own, the code error was not received, and the webmaster didn't even know where the line died without checking the logs.

502 full name is 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 is the gateway 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. watching the evening rush hour video, a few requests only get 504.

all four faults are on the server side, so refreshing, changing browsers, or restarting the router is all a waste of effort. 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 you can't open the : first check if you get the numbers

chain these codes in the search order, so next time you can't open them, don't guess blindly:

phenomenon most likely what should you do
kept spinning in circles and finally timed out, no codes doors didn't open checking the internet, DNS parsing , and the website was completely down
404 page is missing or the address is wrong check if the address is broken and search the title in-site
403 If permissions aren't enough log in when you need to, ask the administrator when it's
5xx the admin's fault wait ten minutes and try again, if it still doesn't work, that's the webmaster's responsibility
page is normal but the content is incorrect cache is outdatedCtrl + F5 force flashing, or clear website data

there's another uncommon truth: status code is correct, the content can still be incorrect WeChat article link deleting parameters that "Parameter Error" page, the status code was a bona fide 200—the server said "I've given you everything you wanted," but instead gave 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 tip at the end: 2 starts with the move, starts with 3 to move, starts with 4 and tries again with different poses, stop brushing with 5 — it's the webmaster's . The last thing in the network search list—the transport layer issue (unable to connect, certificate error)—was stopped before the digital code. If interested, https and the HTTP are the first half of its story.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《What exactly do 404 and 502 mean? I ordered each one by one: if it starts with 4, it's your fault; if it starts with 5, it's the station manager's fault》
Article URL: https://www.shunot.com/en/lybk/1155.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow