HTTP Status Codes

What are HTTP status codes?

An HTTP status code is a server response to a browser’s request. When you visit a website, your browser sends a request to the site’s server, and the server then responds to the browser’s request with a three-digit code: the HTTP status code.

These status codes are the Internet equivalent of a conversation between your browser and the server. They communicate whether things between the two are A-okay, touch-and-go, or whether something is wrong. Understanding status codes and how to use them will help you to diagnose site errors quickly to minimize downtime on your site. You can even use some of these status codes to help search engines and people access your site;  a 301 redirect, for example, will tell bots and people that a page that has moved somewhere else permanently.

The first digit of each three-digit status code begins with one of five numbers, 1 through 5; you may see this expressed as 1xx or 5xx to indicate status codes in that range. Each of those ranges encompasses a different class of server response.

Common HTTP status code classes:

1xxs – Informational responses: The server is thinking through the request.

2xxs – Success! The request was successfully completed and the server gave the browser the expected response.

3xxs – Redirection: You got redirected somewhere else. The request was received, but there’s a redirect of some kind.

4xxs – Client errors: Page not found. The site or page 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: Failure. A valid request was made by the client but the server failed to complete the request.

The most important status codes for SEOs

It’s important for every professional SEO and website owner to understand the status codes that have the biggest impact on SEO.

Imagine you’re working on a site that’s showing a lot of 5xx errors; you’ll want to know off the top of your head that this is a server issue. 4xx errors affect visitor experience, so right away you can start thinking about any changes you may have made to your URLs, or whether you’ve any deleted pages. Once you understand the cause of the issue, you can look at implementing a custom 404 page, or look into using the all-powerful 301 redirect to send visitors to the right place.  

It’s worth learning — and committing to memory — the most impactful status codes every SEO should know:

HTTP Status Code 200 - OK

This is your ideal status code for your normal, everyday, properly functioning page. Visitors, bots, and link equity pass through linked pages like a dream. You don’t need to do anything and you can happily go about your day secure in the knowledge that everything is just as it should be.  

HTTP Status Code 301 - Permanent Redirect

A 301 redirect should be utilized any time one URL needs to be redirected to another permanently.  A 301 redirect means  that visitors and bots that land on that page will be passed to the new URL. In addition, link equity — the power transmitted by all those hard-earned links to your content — is also passed to the new URL through a 301 redirect. Despite talk from Google that all 3xx redirects are treated equally, tests have shown this is not completely true. A 301 redirect remains the preferred method of choice for permanent page redirects.

HTTP Status Code 302 - Temporary Redirect

A 302 redirect is similar to a 301 in that visitors and bots are passed to the new page, but link equity may not be passed along. We do not recommend using 302 redirects for permanent changes. Using 302s will cause search engine crawlers to treat the redirect as temporary, meaning that it may not pass along the link equity that the magical 301 does.

HTTP Status Code 404 - Not Found

This means the file or page that the browser is requesting wasn’t found by the server. 404s don’t indicate whether the missing page or resource is missing permanently or only temporarily. You can see what this looks like on your site by typing in a URL that doesn't exist. It’s like hitting a brick wall. Just as you’ve experienced, your visitors will hit a page that has a 404 error and either try again (if you’re lucky) or wander away to another site that has the information they’re seeking.

Every site will have some pages that return 404 status codes. These pages don’t always have to be redirected; there are other options. One common misconception is that it’s an SEO best practice to simply 301 redirect pages that return a 404 status code to the homepage of the given domain. This is actually a bad idea for the majority of cases, because it can confuse users who may not realize that the webpage they were trying to access doesn't exist.

If the pages returning 404 codes are high-authority pages with lots of traffic or have an obvious URL that visitors or links are intended to reach, you should employ 301 redirects to the most relevant page possible. For example, if your page on sugar-free cupcakes no longer exists, you may want to redirect this URL with a 301 to your sugar-free recipe category page.

Outside of these instances, it may be necessary for a URL return a 404 on purpose — this will keep them from getting indexed and repeatedly crawled by search engines. Give your visitors the best experience possible with a custom 404 page, as suggested by this Google Search Console guide. For example, e-commerce sites often produce 404 pages when products go out of stock, so these sites are great candidates for creating a custom e-commerce 404 page.

HTTP Status Code 410 - Gone

A 410 is more permanent than a 404; it means that the page is gone. The page is no longer available from the server and no forwarding address has been set up. Any links you have on your site that are pointing to a 410 page are sending bots and visitors to a dead resource, so if you see them, remove any references or links to them from your content.

HTTP Status Code 500 - Internal Server Error

Instead of the problem being with pages missing or not found, this status code indicates a problem with the server. A 500 is a classic server error and will affect access to your site. Human visitors and bots alike will be lost, and your link equity will go nowhere fast. Search engines prefer sites that are well maintained, so you’ll want to investigate these status codes and get these fixed as soon as you encounter them.

HTTP Status Code 503 - Service Unavailable

Another variety of the 500, a 503 response means that the server is unavailable. Everyone (human or otherwise) is asked to come back later. This could be due to temporarily overloading the server or maintenance of the server. A 503 status code ensures that the search engines know to come back soon because the page or site is only going to be down for a short time.

Keep Learning

Try It

  • MozBar — The MozBar SEO toolbar lets you see relevant metrics in your browser as you surf the web.

  • Link Explorer — Your All-In-One Link Building Tool. Quickly find link building opportunities, track discovered and lost links over time, and create link tracking lists to see when you've gotten a link. Powerful link data to fuel smarter link building.


Put your skills to work

Gauge a Site's Influence with Link Explorer

Link Explorer is a link popularity and backlink analysis tool that lets you research and compare any site on the web.