If you’ve ever browsed online, you’ve likely seen an HTTP status code at one point or another. Does a 404 ‘page not found’ message seem familiar? This is an HTTP status code, and a common one at that.
There are different status codes to signify different errors, so you’ll know exactly what’s wrong when you see one – that is if you’re familiar with them! We’ll make sure you are by the end of this guide.
What are HTTP status codes?
HTTP status codes, or error codes, are responses from your web server to your browser request. Essentially, when you visit a website, your browser sends a request to that site’s server. Sometimes, these requests are fulfilled seamlessly, and other times, an error occurs. HTTP status codes are messages letting you know how things went and are useful in identifying the problem if a request has failed.
Status code classes
HTTP status codes are divided into different classes to help differentiate their meanings, and the first digit of the code indicates each class. These classes can help to identify the general nature of the status code before you determine what an individual code actually means. The five status code classes include:
- 1xx – Any code starting with a 1 has to do with an informational response, or rather, the server is still processing the browser request.
- 2xx – The 200-level status code class refers to a successful request. The browser request was successfully completed and the server gave the browser the expected response.
- 3xx – This class entails a redirection code. Your request was received, but you got redirected to a different source.
- 4xx – The 400-level status class refers to a client-side error. This means there was a problem on the website’s side of communication, and usually appears when a page is not valid or not found (like a 404 error).
- 5xx – This is the status code class for server-side errors. The request was valid, but the server failed to complete it.
Now that you understand the status code classes, let’s go over some of the most common status codes that you may encounter.
Common status codes
Here are some of the most common status codes that you may have seen, what they mean and how you can troubleshoot them if they prevent you from reaching your desired web page:
200 – OK
This status code means everything is working as it should between the server and the browser.
301 – Permanent redirect
This code indicates a permanent redirect. When a page or resource has been permanently replaced with a different resource, any visitors or bots that land on this page will be redirected to the new URL.
302 – Temporary redirect
Similar to a 301, a 302 temporary redirect status code means visitors are passed along to a new page, but the new location is not permanent. There is also no troubleshooting necessary for this status code.
403 – Forbidden
The 403 forbidden error status code appears when a user tries to access a resource they do not have permission to view.
404 – Page not found
A 404 page not found error is a common status code indicating the page the browser is requesting was not found by the server. If you type in a URL that doesn’t exist, you’ll get a 404.
410 – Gone
A 410 means that a page is no longer available at all, and is more permanent than a 404.
500 – Internal server error
A 500 internal server error indicates a problem with the server. This means something went wrong on the server side and the request was not delivered.
502 – Bad gateway
A 502 bad gateway error means that there was a communication error between servers, like when a proxy server is in use.
503 – Service unavailable
A 503 service unavailable error indicates that the server is running properly, unlike a 500, but it is temporarily out of commission. This error is common when servers are undergoing maintenance or overloaded due to increased traffic.
List of all status codes
Explore over 60 different HTTP status codes under each class below.
1xx class status codes
Status code | Function |
---|---|
100 | Continue |
101 | Switching protocols |
102 | Processing |
103 | Early hints |
2xx class status codes
Status code | Function |
---|---|
200 | OK |
201 | Created |
202 | Accepted |
203 | Non-authoritative information |
204 | No content |
205 | Reset content |
206 | Partial content |
207 | Multi-status |
208 | Already reported |
226 | IM Used |
3xx class status codes
Status code | Function |
---|---|
300 | Multiple choices |
301 | Moved permanently |
302 | Found |
303 | See other |
304 | Not modified |
307 | Temporary redirect |
308 | Permanent redirect |
4xx class status codes
Status code | Function |
---|---|
400 | Bad request |
401 | Unauthorized |
402 | Payment required |
403 | Forbidden |
404 | Not found |
405 | Method not allowed |
406 | Not acceptable |
407 | Proxy Authentication Required |
408 | Request timeout |
409 | Conflict |
410 | Gone |
411 | Length required |
412 | Precondition failed |
413 | Payload too large |
414 | URI too long |
415 | Unsupported media type |
416 | Range not satisfiable |
417 | Expectation failed |
418 (unused) | I’m a teapot |
421 | Misdirected request |
422 | Unprocessable entity |
423 | Locked |
424 | Failed dependency |
425 | Too early |
426 | Upgrade required |
428 | Precondition required |
429 | Too many requests |
431 | Request header fields too large |
451 | Unavailable for legal reasons |
5xx class status codes
Status code | Function |
---|---|
500 | Internal server error |
501 | Not implemented |
502 | Bad gateway |
503 | Service unavailable |
504 | Gateway timeout |
505 | HTTP version not supported |
506 | Variant also negotiates |
507 | insufficient storage |
508 | Loop detected |
510 (unused) | Not extended |
511 | Network authentication required |
Troubleshooting common HTTP status codes
If you get an HTTP status code, there are a few things you can do to try to fix it.
For a 403 forbidden code:
- Double-check your URL
- Clear your browser cache and cookies
- Contact your internet service provider
- Disable your VPN if you have one running
Learn more about troubleshooting a 403 forbidden error.
For a 404 page not found code:
- Check your URL for typos
- Refresh the page
- Clear your browser cache
- Contact the company, service or organization directly
Learn more about troubleshooting a 404 status code.
For a 500 internal server error code:
- Clear your cache and browser history, then refresh the page
- Give it some time and come back later
- Contact the site owner
Learn more about troubleshooting a 500 internal server error.
For a 502 bad gateway code:
- Start a new browsing session
- Refresh the page
- Restart your equipment
- Change your DNS server
- Contact the web administrator or your ISP
Learn more about troubleshooting a 502 bad gateway status code.
For a 503 service unavailable code:
- Refresh the page
- Restart your device
- Give it some time
- Contact the website owner or administrator
Learn more about troubleshooting a 503 service unavailable status code.
Best practices for handling HTTP status codes
If you have your own website, it’s imperative to understand and manage HTTP status codes to ensure a good user experience and performance.
HTTP status codes are important from the web admin side because they essentially tell you what is going wrong. A regular user may see an error and understand what it means at best, but a web developer or administrator has the power to choose appropriate status codes for certain situations and fix errors on their side of things. Aside from knowing what all of the codes mean, here are some other best practices if you are a website owner or developer:
- Choose appropriate status codes
- Use redirection codes appropriately
- Keep sensitive data secure
HTTP status codes FAQs
What is an HTTP status code?
An HTTP status or error code is a message that a website’s server sends to a browser to indicate whether the request can be fulfilled. Think of an HTTP status code as a conversation between a server and browser. If something goes wrong, this code indicates the nature of the problem.
What is a 403 status code?
A 403 status code means access to the requested resource is forbidden to the user.
What is a 201 status code?
A 201 status code indicates that the request was successful and a resource was created.
How do I fix HTTP status codes?
If you are seeing a status code when trying to access a web page, you can try to clear your cache and browser history, refresh the page, restart your device or contact the website owner. Sometimes though, there is nothing you can do.
Written by:
Camryn SmithCammy is a writer with Allconnect, growing her broadband industry knowledge for over a year on the internet marketplace. Her expertise lies in home internet and broadband service with a focus on providers, plans… Read more
Edited by:
Robin LaytonEditor, Broadband Content
-
FeaturedWhat is a 403 error and how can you fix it? Camryn Smith — 4 min read
-
Featured502 bad gateway error: What it is and how to fix it Camryn Smith — 4 min read
-
Featured503 service unavailable error: What it is and how to fix it Allconnect — 3 min read
Latest
-
Tuesday, November 5, 2024
How to share your Wi-Fi password on an iPhoneCamryn Smith — 3 min read
-
Monday, November 4, 2024
Federal government takes a look at ‘doom loop’ of customer supportRobin Layton — 2 min read
-
Thursday, October 31, 2024
Why is my internet so slow during the day?Camryn Smith — 4 min read