The HTTP status codes for your pages might not mean much to your users. However, they 're incredibly important for SEO and general website health. These status codes tell you what 's happening when browsers try to contact your website. They show when things go right and when things go wrong.
Plus, they mean a lot to Google.
Therefore, they mean a lot for SEO.
In this guide, we 'll dive into your site 's status codes and cover:
- What HTTP status codes are
- What each types of code indicates
- The HTTP status codes most important to SEO
- Managing your HTTP status codes
What are HTTP Status Codes and What do They Mean?
An HTTP status code is a message a website 's server sends to the browser to indicate whether or not that request can be fulfilled.
Status codes specs are set by the W3C. Status codes are embedded in the HTTP header of a page to tell the browser the result of its request.
When that all goes according to plan the server returns a 200 code.
However, there 's a lot that could go wrong when trying to fulfill a browser 's request to a server.
The different status codes and what they say
There are five ranges of HTTP status codes. Each range defines where the error was encountered and the number defines what the actual error was.
Here are the 5 ranges and what they mean:
- 1xx: Informational
- 2xx: Success!
- 3xx: Redirect. The requested page has moved somewhere else.
- 4xx: Client error. There 's something wrong with the way the browser asked for the page.
- 5xx: Server error. Something went wrong with the way the server tried to send the page.
HTTP Status Codes Important for SEO
Obviously, all status codes are important "you should know how healthy your site is" but there are certain ones that particularly important for SEO and anyone working on a website.
Seeing pages with a 200 status is the outcome you 're hoping for. Servers return 200 status codes, or any code within the 2xx range, when things are working as intended. This means the server, browser and visitor are all happy.
301: Permanent redirect
A server returns a 301 HTTP response when the requested URL has moved permanently to a new URL. If a user tries to visit the old URL, it will return a 301 HTTP status, pointing the browser to the new URL. If you move a page without adding a 301 redirect, users trying to visit the old URL will see a 404 error. Plus, using a 301 HTTP status will pass full link juice to the final URL.
The 302 HTTP status tells the browser that the requested page has been found, but exists at a different URL. The browser then requests that updated URL. Since this status is a bit ambiguous, it 's better to use 301 redirects when you permanently move a page. 302 redirects do still pass full link juice, though.
404: Not Found
The most well-known of the 4xx status codes, servers return a 404 error when the browser requests a URL that the server can 't find. These responses can be pretty bad from a user experience because they frustrate people trying to get to a desired page. From an SEO perspective, a site with lots of 404 errors tells Google that it possibly isn 't maintained very well and won 't offer users a good experience.
Monitor your site 's 404 errors via Google Search Console and aim to minimize the number of errors.
Avoid 404 errors by redirecting pages when you move them, keeping your links up to date and making sure deleted pages return a 410 HTTP status.
Since it 's impossible to prevent humans from ever reaching a page that returns a 404 HTTP status, make the most of it by creating a custom 404 page.
Servers return a 410 HTTP status when the URL requested by a browser has been removed. For a human user, the result is the same as a 404. They 'll see the designated error page.
For search engines, however, a 410 says that the page has been deleted and they shouldn 't index that URL.
Before you remove a page, ask yourself if you can add a 301 redirect to a different, relevant page elsewhere on your site.
451: Unavailable for legal reasons
This is a relatively new HTTP status code. It should be used to indicate that a page has been removed for legal reasons like a DMCA takedown request or a court order.
It 's pretty rare to see a 451 status. European users, however, might encounter a 451 error when trying to access content on sites that are unable (or unwilling) to comply with GDPR rules.
500: Internal server error
Servers return a 500 HTTP status when the browser makes a valid request, but an internal error in the server prevents it from returning the page. Search engines dislike this error code because it 's very generic" they don 't know what 's supposed to be happening.
500 errors are usually caused by errors in code or a database. If your website returns a lot of 500 errors, you must fix these issues ASAP.
503: Service unavailable
Servers return the 503 HTTP status if they are unavailable when the browser makes the request.
Use 503 responses during planned server maintenance periods. A 503 tells a search engine that, even though they can 't access anything now, if they come back in a little bit chances are it will work.
Managing HTTP Status Codes
The HTTP status codes of your pages is a big part of SEO, and for search engines in general. Knowing when and how HTTP statuses occur is key in maximizing user experience and minimizing the number of errors people and Google see.
For instance, knowing how to properly delete a page using a 410 vs. when to use a 301 redirect is vital in maintaining the health of your website in Google 's eyes.
To check the HTTP status codes that your website generates, log in to your Google Search Console account. Then check the Coverage report to see how many URLs Google encounters that return error codes.
Monitor your site 's crawl errors encountered by Google.
These errors must be fixed to ensure that your website is being indexed correctly by search engines and navigated by users.