The importance of HTTP status codes cannot be overstated: they’re the first things search engines check when they crawl your website.
To help you master this important part of technical SEO optimization, we have compiled the definitive guide to HTTP status codes and what they mean, and what role they play in your overall SEO strategy.
What are HTTP codes?
It would be useful to start from the very basics – what are HTTP codes? HTTP stands for Hypertext Transfer Protocol – which is the primary way clients and servers communicate and exchange data.
Technically speaking, HTTP codes are three-digit responses that a server gives at the request of a client. The client is usually a browser or a search engine. They are a vital part of the communication process between clients and servers.
HTTP codes are divided into five classes with multiple variants. Each of these classes conveys a different message and purpose.
Every time you request a page in your browser, you make dozens of requests to the page’s server. Whether any of those requests is successful in fetching the information comes to light thanks to HTTP status codes.
Main HTTP code classes to keep in mind
1xxs – Informational responses: This means that the server is thinking through the request.
2xxs – Success! This means that the request was completed, and the server gave the browser the desired response.
3xxs –Redirection: This means that you got redirected somewhere else- the request was received, but there’s a redirect of some kind.
4xxs – Client errors: This happens when a page is not found. It means that the site or page the client requested couldn’t be reached. (The request was made, but the page isn’t valid — this is an error on the website’s side of the conversation and often appears when a page doesn’t exist on the site.)
5xxs – Server errors: This represents failure. The client made a valid request, but the server failed to complete the request.
Some common HTTP status codes in SEO
Since HTTP status codes in SEO are such a common occurrence, the chances are that you have seen these around:
200 shows that things are how they probably should be; a client asks the server for content, and the server replies with a 200 success message along with the content the client needs. Both the server and the client are satisfied. Note: all messages in 2xx mean some sort of success.
“301” means that the URL in question has moved permanently, which means any links featuring the old URL should be redirected to the new URL provided. Using a 301 redirect to direct an old URL to a new one, you ensure that users don’t see a 404 error page if they try to open the old URL. Moreover, using a 301 will provide the old URL’s link value to the new URL.
A 302 redirect essentially lets search engines know that a website or page has been moved temporarily. This type of redirect should be used if you want to send users to a new site or page for a short period, for example, when you’re redesigning or updating your website.
The 307 redirect is another internal redirect used in cases where the browser knows HTTPS is enforced. The browser will use the internal 307 redirect to request the HTTPS version of the URL, ultimately restricting unnecessary, unsafe requests.
The 404 redirect code means that the file or page that the browser is requesting wasn’t found by the server. You must remember that 404s don’t really indicate whether the missing page or resource is missing permanently or only for the time being. This is the least desirable thing for your site in terms of SEO.
A 410 status code is the same as a 404 since the content has not been found. However, with a 410, you tell search engines that you deleted the requested content. Thus it’s much more specific than a 404. In a way, you order search engines to remove the URL from the index. Before you permanently delete something from your site, ask yourself if there is an equivalent of the page somewhere. If so, make a redirect. If not, maybe you shouldn’t delete it and just improve it.
429 is a response code that indicates that a client has made too many requests. Often a result of some form of rate-limiting technology that prevents websites from being burdened by external requests. Additionally, possibly the most frustrating thing about this is that it is hard to identify since Google does not support these responses in the Search Console. Therefore, if a website uses rate-limiting technology, you need to ensure that it does not give 429 responses!
This usually happens when a server cannot handle the request due to something like an outage or overload. This status code should nearly be used whenever the page requires temporary downtime, e.g., when you are there is maintenance going on the site. This way, search engines know that they can come back later to find your site in working order again, which is good for your site’s health.
What makes HTTP status codes important for SEO?
The primary aim behind SEO is to acquire organic traffic for your site. To get that traffic, the first thing you need to ensure is that your site’s content is accessible to search engines. HTTP status codes provide this and also evaluate the health of the site and its server. You must understand that HTTP status codes are a vital part of SEOs. For this reason, you are likely to come across them daily. The description above about what each of the standard HTTP codes means will significantly help you understand how to improve your SEO practices.
What do HTTP status codes look like?
It may be useful to remember that each three-digit status code’s first digit begins with one of five numbers, 1 through 5. You may see this expressed as 1xx or 5xx to indicate status codes in that particular range at some places. As mentioned earlier, each of those ranges encompasses a different class of server response.
This is what an HTTP request look like:
This is what each of the parts means:
GET the HTTP method used to get what you want from the server.
/academy/http-status-codes/: what URL the request is about.
HTTP/2: what protocol to communicate in.
Here’s the HTTP response header the server sends back:
HTTP/2 200 OK
HTTP/2 – describes what protocol to communicate in.
200 OK – the request was successful—this is what you want to see.
How to check HTTP status code across different browsers?
Every browser has a useful built-in tool to help you check the HTTP status code.
What do timeouts and other connection errors mean?
The thing about timeout or connection errors is that they are unrelated to HTTP status code classes are no server responses. Errors like timeouts and connection related issues mean that the client’s request never reached the server.
Let’s look at a few examples to ensure that we are not confused:
Connection timeout errors, such as Google Chrome’s “This site can’t be reached.”
These are not status codes. A message like this means that your request could not reach the server. This, in turn, means that there can’t be any server responses and hence, what you’re seeing is not a status code.
DNS lookup errors, such as Google Chrome’s “This webpage is not available.”
An error like this isn’t a server response because it essentially means that the client couldn’t connect with the server because of a DNS issue.
What you need to keep in mind about the HTTP status code is that you’ll only be able to see it if the server was reached and issue a response.
Other uses for HTTP status codes.
HTTP status codes are not strictly related to SEO. They can also help you improve a site’s security, which is ultimately a great thing for your site. HTTP headers make a website considerably less vulnerable to a range of potential security issues. Some of these issues may include:
The Key Takeaway
We hope this guide to HTTP status codes helped you, if you want to get alerts as soon as detrimental error codes are detected on your website look no further than Hexometer, which provides 24/7 sitewide monitoring of all your websites and key 3rd party services to catch problems before they affect your customers.
Hexometer works in the cloud, with no software or code changes required so you can get comprehensive peace of mind in minutes.
Catch website problems before they affect your customers
Every day your website can face an increasing range of threats. Server problems, slow landing pages, broken links, frustrating mobile experiences, embarrassing spelling mistakes, changing SEO rules, 3rd party services breaking, or security issues that put your business at risk.
Hexometer is like having your own QA team, monitoring your entire website 24/7 for availability, performance, user experience, SEO, health and security problems so you can focus on your business. Now that’s peace of mind
Get started in minutes – no software, proxies, or programming required