Have you ever clicked on a link to an article to find this message staring back at you on the page?
Well, this is known as an HTTP status code—and there are many different types that you could potentially come across on the web.
What Are They?
So… what is an HTTP status code exactly?
According to Moz, it is a server response to a browser’s request.
Or, described more in-depth, when you visit a website, your browser sends a request to the website’s server (where the website and its information are stored), and the server responds to the browser’s request with headers or information about what to expect. This includes a three-digit code: the HTTP status code.
These codes indicate whether things between the browser and the server are okay, kind of shaky, or if something is just plain wrong or broken.
Categories of Codes
HTTP status codes are divided into five different classes of responses (numbered from the 100s to the 500s), typically having similar or related meanings. It’s helpful to have a general knowledge of these codes in case you run across one and want to be able to grasp what the issue is before having to do a deep dive into the website.
The five classes include:
- 100s: These codes indicate that the request you’ve made to the server is still in progress for some reason. This isn’t necessarily a problem; it’s just letting you know that the request is taking longer than expected.
- 200s: This means that the request was completed and the server gave the browser the expected response. Success!
- 300s: This means that the information requested by the browser is in a different location than it was originally, aka redirection. These codes are returned when a new resource has been substituted for the requested page/information—allowing visitors to find the content they were looking for
- 400s: These codes indicate a problem with your browser or the request it sent to the server.
- 500s: 500-level status codes are considered errors, but they indicate that the problem is on the server’s end and is not an issue with the request. This could potentially make them more challenging to solve.
List of Common HTTP Codes
While there are over 60 different status codes, you’ll likely encounter fewer than a dozen regularly. Below are a few that you may see while you’re browsing:
- Status Code 400: The server was not able to process the request due to a client error – this may be because of missing data, invalid formatting, or domain validation.
- Status Code 401: This status code request occurs when authentication is required but has failed or not been provided.
- Status Code 403: Similar to status code 401, a status code 403 happens when a valid request was sent, but the server refuses to accept it. This happens if a client/user requires the necessary permission or they may need an account to access the resource. Unlike a status code 401, authentication is not applicable.
- Status Code 404: This is the most common status code the average user will see. A browser displays a 404 code when the request URL is valid, but the resource that the server is supposed to provide can’t be found on the server.
- Status Code 409: A status code 409 is sent when a request conflicts with the current state of the resource. This is usually an issue with simultaneous updates, or versions, that conflict with one another.
- Status Code 410: The resource requested is no longer available and won’t be available again.
- Status Code 500: This is another one of the more commonly seen status codes by users. The status code 500 happens when the server cannot fulfill a request due to an unexpected issue. This is typically when a web developer may have to step in and comb through server logs to determine where the exact issue is.
- Status Codes 502, 503 & 504: These are the most common errors we see when there is something wrong with the web server or hosting infrastructure. If you have someone maintaining your website, this is another instance to give them a call, and if not, call your web hosting support.
Want to dive deeper? Check out this list by Kinsta for more HTTP status codes.
Why HTTP Codes Matter
Not only is it helpful to know what may be going on when you run into one of these errors, but HTTP status codes are also valuable for diagnosing and fixing website configuration errors.
What that means is that HTTP codes can help improve a user’s experience on your website so they don’t run into a bunch of errors while trying to browse.
Additionally, addressing any issues with the HTTP codes on your website can improve your Search Engine Optimization (SEO).
SEO and HTTP Codes
Search engines use web crawlers to index the content of websites and then rank them on the search engine results pages. When going through websites, web crawlers look at all of the HTTP status codes they encounter to determine the site’s health and each web page’s ranking.
The best scenario would be to have all your web pages return a 200 status code, meaning that all website resources are accessible.
While 300 status codes aren’t necessarily harmful to SEO, it’s best to keep their number at a minimum. This HTTP status code class informs search engines whether a page redirect is temporary or permanent. Despite not impacting rank, setting up good redirects is critical if you ever change the URL for a page or change domains, like going from www to non-www.
400 and 500 status codes are the ones that can be harmful to your website’s SEO. These response codes prevent crawlers from indexing web pages, potentially leading search engines’ algorithms to rank your site less favorably due to low quality. One exception to this is if you are having issues getting Search Engines to de-index a page, 410 “Gone” can be a strong indicator to remove it permanently.
Checking your website’s HTTP status codes periodically is the best way to preserve its SEO as well as help give the best user experience possible.
Hit Us Up!
Feel free to let us know in the comments if you’ve encountered any other unique HTTP status codes or tricky errors!
And as always, reach out to us if you have any website issues that you can’t seem to figure out! We’d love to help not only you but others as well, in order to make the web a better place for everyone.