Making sure that the pages of a website return the correct header status codes is pretty much on the basics checklist for any technical audit.
The number of times I’ve had a webmaster gleefully tell me their website is free of 404 errors, only to find out the 404 page doesn’t return a 404 server header code.
How a 5xx Server Error Can Hurt Your Website’s Rankings
If Google comes across a website with a 500 response, Google immediately perceives an issue and if it receives 500 codes in quick succession (allowing for a minor server failover), it could lower the page’s ranking or drop it altogether, as it would prove a negative user experience.
However, there have to be multiple instances of 503 responses over a week or two before ranking stops and the page is removed from Google’s index. 503 codes of course are most useful when putting a website into maintenance mode.
- 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 Not Extended
- 511 Network Authentication Required
- 599 Network Connect Timeout Error
You can avoid 5XX errors by making use of stable servers, as well as other fallback solutions such as caching CDNs.
Header Status Codes
When a user, or bot, requests a URL from a website, the browser requests the page from the server, which returns a server status code.
For all pages we want users to access (and Google to index) we want the pages to return a 200 OK status.
This status code also comes with additional information which includes HTML code that the user’s browser uses to present the page content, images and video accordingly as the website owner has defined. For example, the below is the status header code for my website’s homepage:
The above status code is usually only served up when there are no server-side issues with a particular page.
There are other codes which can be served up and which provide information into availability of a certain page and whether it even exists or not. Server errors however are response codes that start with a 5, and are often referred to in articles as 5XX status codes.
Not all 5XX codes are bad, as if a website is down for maintenance mode – we want to return a “503 Service Unavailable”, as this effectively tells Google to come back later.
It’s also worth mentioning at this point that server errors happen, it’s all a part of the internet and you can never 100% prevent them from occurring… Even Google suffers from them from time to time.
Desirable Server Status Codes
The 200 OK status code confirms that the webpage exists and is able to be served up OK on request.
All your internal links, XML sitemap URLs, HTML sitemap URLs, Hreflang URLs, canonicals… Basically every URL on your site wants to return this – unless you’re in maintenance mode.
301 Moved Permanently
This is used to show that a page is no longer at the requested location and has been permanently moved to another location. If it’s only a temporary change, you’d use a 302 Temporarily Removed.
With a 301, Google knows to start acknowledging the change and to pass authority/PageRank. Whilst a 302 does still pass authority/PageRank, it’s the wrong status code to use for things like HTTPS migrations or other permanent URL changes.
503 Service Unavailable
If you’re putting your website into maintenance mode, it’s critical that the maintenance mode page you put up returns a 503 header. If it doesn’t, and it returns something like a 200, Google will “acknowledge” that’s the new page content and index it – bye bye rankings.
I’ve had a number of discussions with developers surrounding this in the past, and given the amount of literature out there on this (and I’ve seen some websites with awful crawlability take weeks to recover from a maintenance mode page be cached) not doing this is almost negligent to the business.
Detrimental Server Status Codes
500 Internal Server Error
This status code is a general server status error that indicates to both visitors and search engines that the website web server has a problem.
If users and search engines see this error a lot, as previously mentioned, you will lose rankings and organic search performance as a result.
Often 302 temporary redirects are used by mistake, instead of 301 redirects, and this is an argument I still have in 2018 working with other agencies – who seem to be more concerned that the 302 passes link juice…
Rather than on the fact it’s the wrong status code…
404 Not Found
This server status code means that the requested URL has not been found and there is usually a message on-page saying “The page or file you are trying to access doesn’t exist”.
The problem with 404’s are if they are appearing for URLs which previously did exist then search engines will interpret them as the page having been moved or removed.
When removing pages, it’s important to 301 redirect them to the next most appropriate URL, or cause issues.