Why status codes are worth knowing
You've almost certainly seen "404 Not Found" or "500 Internal Server Error" on a web page. They look like technical gibberish, but each one is a short, precise message from a website explaining what happened to your request.
These messages are called HTTP status codes. HTTP (Hypertext Transfer Protocol) is the set of rules your browser and websites use to talk to each other. Every time you load a page, the website replies with a three-digit status code, even when everything works perfectly.
Knowing what the common codes mean helps you work out whether a problem is at your end or the website's, what you can do about it, and what's going on when a link sends you somewhere else. If you run a website, they're essential for keeping it healthy.
How a web request works
When you visit a page, two things are talking. Your browser is the client (the one asking), and the computer that hosts the website is the server (the one answering).
- Your browser sends a request: "Please give me the page at
/recipes/pavlova." - The server works out what to do with it.
- The server sends back a response: a status code, some extra information called headers, and usually the page itself.
Here's a simplified version of that conversation:
Browser asks: GET /recipes/pavlova HTTP/1.1
Host: www.example.com.au
Server replies: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
<html> ...the pavlova recipe page... </html>
GET means "fetch this for me", and 200 OK is the status code meaning everything went well. You don't normally see any of this, because your browser just shows you the page.
The five families of status codes
Status codes are grouped by their first digit. Once you know the five groups, you can understand the gist of almost any code, even one you've never seen. People often write the groups as 1xx, 2xx and so on, where "xx" means "any two digits".
Think of ordering at a café:
| Group | Meaning | At the café |
|---|---|---|
1xx Informational | "Got it, still working on it" | "Your order's in, won't be long." |
2xx Success | The request worked | "Here's your flat white." |
3xx Redirection | What you want is somewhere else | "We serve that at the counter next door." |
4xx Client error | Something's wrong with the request | "Sorry, that's not on our menu." or "Staff only." |
5xx Server error | The website itself has a problem | "The coffee machine's broken." |
The most useful distinction for everyday browsing is between 4xx and 5xx. A 4xx code usually means the request needs changing (a different address, logging in, waiting a bit). A 5xx code means the website is having trouble, and there's often little you can do except try again later.
Tip: "client error" doesn't mean you did something wrong. A 404 is technically a client error, but it's often caused by a website moving or deleting a page and leaving an old link behind.
The codes you'll meet most often
There are dozens of official status codes, defined in a standard called RFC 9110, but a small handful cover nearly everything you'll come across.
Success (2xx)
| Code | Name | What it means |
|---|---|---|
200 | OK | Everything worked and the page was sent. This is the code behind almost every page you load. |
201 | Created | Something new was created, such as a new account or post. |
204 | No Content | It worked, but there's nothing to send back (common for "save" actions in apps). |
Redirection (3xx)
| Code | Name | What it means |
|---|---|---|
301 | Moved Permanently | The page has a new permanent address. Your browser goes there automatically. |
302 | Found | The page is temporarily somewhere else. Your browser goes there automatically. |
304 | Not Modified | Nothing has changed since your last visit, so your browser reuses its saved copy. This makes pages load faster. |
307 / 308 | Temporary / Permanent Redirect | Stricter versions of 302 and 301 (more on these below). |
You normally never see a redirect happen; the browser just follows it silently and you land on the new page.
Client errors (4xx)
| Code | Name | What it means |
|---|---|---|
400 | Bad Request | The server couldn't make sense of the request, sometimes due to a mangled link or a corrupted cookie. |
401 | Unauthorized | Despite the name, this really means "unauthenticated": the server doesn't know who you are. Logging in usually fixes it. |
403 | Forbidden | The server knows who you are (or doesn't need to) and still won't let you in. Logging in again won't help. |
404 | Not Found | There's nothing at that address. The page may have moved, been deleted, or the link may contain a typo. |
410 | Gone | The page was deliberately removed and isn't coming back. |
429 | Too Many Requests | You (or your network) have made too many requests too quickly. Wait a while and try again. |
Server errors (5xx)
| Code | Name | What it means |
|---|---|---|
500 | Internal Server Error | Something broke on the website and it can't say exactly what. A general "oops". |
502 | Bad Gateway | One server got an invalid answer from another server behind it. |
503 | Service Unavailable | The site is overloaded or down for maintenance. Usually temporary. |
504 | Gateway Timeout | One server waited too long for another server to answer. |
Fun fact: 418 I'm a teapot began as an April Fools' joke in 1998, in a spoof standard for controlling coffee pots over the internet. It's not part of the official HTTP standard, but plenty of websites still answer with it as an Easter egg. And 451 Unavailable For Legal Reasons, used when content is blocked for legal reasons, is a nod to Ray Bradbury's novel Fahrenheit 451.
Redirects up close
Redirects deserve a closer look, because they're behind every shortened link. When you click a link like bit.ly/3kQx7Zp, the shortener replies with a 3xx code and a Location header containing the real address:
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com.au/recipes/pavlova
Your browser then makes a brand-new request to that address and, all being well, gets a 200 OK.
Permanent or temporary?
| Code | Type | Browser may change the request? | Typical use |
|---|---|---|---|
301 | Permanent | Yes, sometimes | A page or whole site has moved for good |
302 | Temporary | Yes, sometimes | A short-term detour, e.g. during a sale |
307 | Temporary | No | Temporary moves where a form submission must be kept intact |
308 | Permanent | No | Permanent moves where a form submission must be kept intact |
"Change the request" refers to an old quirk: with 301 and 302, browsers may turn a form submission into a plain page load when following the redirect. The newer 307 and 308 were created to forbid that. For everyday web pages, 301 and 302 are fine.
The difference between permanent and temporary matters to search engines such as Google. A permanent redirect tells them to update their records to the new address, while a temporary one tells them to keep the old address in mind.
Redirect chains
Sometimes one redirect leads to another, and another, before you reach the final page. This is a redirect chain. For example, a short link might redirect to a tracking service, which redirects to http://, which redirects to https://. Chains slow pages down, and if a chain loops back on itself, your browser gives up with an error such as "too many redirects".
If you want to see every step a link takes before you click it, a link expander such as ExpandURL follows the redirects for you and shows where the chain ends. That's also a handy way to check a suspicious short link safely.
How to see a status code yourself
Browsers hide status codes unless something goes wrong, but you can easily look for yourself using your browser's developer tools, a built-in panel for inspecting web pages.
- Open the developer tools. In Chrome, Edge or Firefox on Windows, press
F12orCtrl+Shift+I. On a Mac, pressCmd+Option+I. (In Safari, first turn on the Develop menu in Settings, under Advanced.) - Click the Network tab.
- Reload the page with
F5orCmd+R. - Look at the Status column. The first row is the page itself; the rest are images, scripts and other files it loaded. Click any row for details, including headers.
You'll often see a mix of 200, 304 and the odd redirect. A 404 on an image explains why a picture is missing.
From the command line
If you're comfortable with a terminal, the free curl tool (built into Windows, macOS and Linux) shows just the status line and headers. The -I option asks for headers only:
curl -I https://www.example.com.au/old-page
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com.au/new-page
Add -L (curl -IL) to follow each redirect and see every step of the chain.
Troubleshooting by status code
The code tells you where to start. Here's what you can try as a visitor, and what to check if it's your own website.
| Code | As a visitor, try… | If it's your site, check… |
|---|---|---|
400 | Retyping the address; clearing the site's cookies | Malformed links, oversized cookies or form data |
401 | Logging in (or logging out and back in) | Login sessions and authentication settings |
403 | Checking you're in the right account; contacting the site | File permissions, security rules, blocked regions or IP addresses |
404 | Checking for typos; using the site's search; going to the home page | Broken internal links; add 301 redirects for moved pages |
429 | Waiting a few minutes before trying again | Rate-limit settings; bots hammering the site |
500 | Refreshing; trying again later | Server error logs; recent code or plugin changes |
502 / 504 | Refreshing after a minute or two | Whether the application server or database is running or overloaded |
503 | Waiting; checking the site's social media for maintenance notices | Maintenance mode, traffic spikes, hosting limits |
Problems codes don't always reveal
- "Soft 404s": some sites show a "page not found" message but send a
200 OKcode. It looks like an error to you but like a normal page to search engines. Site owners should make sure missing pages really return404. - "Too many redirects": this browser error means a redirect loop. Clearing the site's cookies sometimes fixes it; otherwise it's the site owner's job.
- Error pages that hide the code: many sites show friendly custom error pages. Developer tools will still show the real code.
Key rule: 4xx usually means "change something about the request"; 5xx usually means "the website needs to fix something". If you get a 5xx, waiting and retrying is often all you can do.
Quick reference table
| Code | Name | In plain words |
|---|---|---|
200 | OK | It worked. |
301 | Moved Permanently | It's moved for good; follow me. |
302 | Found | It's temporarily elsewhere; follow me. |
304 | Not Modified | Use your saved copy. |
307 | Temporary Redirect | Temporarily elsewhere; keep the request exactly the same. |
308 | Permanent Redirect | Moved for good; keep the request exactly the same. |
400 | Bad Request | I don't understand the request. |
401 | Unauthorized | Who are you? Please log in. |
403 | Forbidden | I know who you are, and the answer's no. |
404 | Not Found | Nothing here. |
410 | Gone | It was here, and it's been removed for good. |
429 | Too Many Requests | Slow down. |
500 | Internal Server Error | Something broke on our end. |
502 | Bad Gateway | A server behind me gave a bad answer. |
503 | Service Unavailable | Too busy or down for maintenance. |
504 | Gateway Timeout | A server behind me took too long. |
For the full list of codes, see CSSPortal HTTP Status Codes.
Wrapping up
HTTP status codes are the web's way of reporting back on every request. Most of the time they're invisible, quietly saying 200 OK. When something goes wrong, the code points you straight towards the cause.
If you remember four things, make them these:
- The first digit tells you the family: 2xx success, 3xx redirect, 4xx request problem, 5xx server problem.
- 401 means "please log in"; 403 means "you're not allowed, even if you do".
- 301 and 302 redirects power shortened links, and your browser follows them silently.
- You can see any page's status code in your browser's developer tools, under the Network tab.
Next time an error page appears, read the number first. It's telling you more than you might think.