5XX: Server-Side Error Handling and Maintenance | Lesson 18/34 | SEMrush Academy

You will learn about HTTP header fields, which transmit the parameters and arguments important for the file transfer via HTTP protocol.
Watch the full course for free: https://bit.ly/3gNNZdu

0:19 500 status code
0:28 503 status code
0:44 Maintenance
2:53 Combine a 503 status code with Retry-After header
3:55 Quote from Pierre Far

✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹
You might find it useful:
Tune up your website’s internal linking with the Site Audit tool:
https://bit.ly/2XVxCmL
Understand how Google bots interact with your website by using the Log File Analyzer:
https://bit.ly/3cs0rfC

Learn how to use SEMrush Site Audit in our free course:
https://bit.ly/2Xsb3XT
✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹ ✹

We are talking now about the 5xx status code range, and this is usually a server side error. The most common ones and the most relevant from an SEO perspective is 500. This is an internal server error and a generic error message that is given when something unexpected has happened.

Another one is HTTP 503 which means “service unavailable”. That happens when the service is currently unavailable, for example because of maintenance or if it is overloaded. Generally it should be temporary.

Let’s talk about why maintenance is such a big deal from an SEO perspective.What can happen is, that your site has been indexed and everything is going well, when all of a sudden you need to go into maintenance mode, you might need to update something or change the server infrastructure. Accordingly, the content which you are currently ranked for is not accessible during this period.

Unfortunately, maintenance work can’t always be avoided – in addition to common considerations (like when does it cause the least disruption for users?, employee availability at night?, etc.), there are also some SEO concerns to keep in mind.

While the site can’t be accessed, the HTTP 503 status code (Service not available) must always be used; however, the following solutions are not practicable:

I have seen sites using the HTTP status code 200 while they were actually currently under maintenance. That means that for Google everything is supposed to be alright. What will happen when you serve a very limited amount of totally different content then? They will actually rank you with your under maintenance message.
You also must not block the crawler using robots.txt and other meta robots “noindex“.
Do not redirect requests to a temporary URL / domain, hosting a “currently under maintenance“ site.
All of these scenarios will cause a massive loss in rankings. Make sure that if a URL or the full server is not available for any reason, you respond with a 503 status code. In this case, Google responds by saying – ok, this service is currently not available, so we’ll just come back later and try again. But in the meantime we’ll do nothing, and we especially not re-calculate rankings based on “maintenance” content.

Which you also can do is to combine a 503 status code with retry-after header. The Definition of the 503 status code says “The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client should handle the response as it would for a regular 500 response.”

If you know that your maintenance work is going to take an hour, then you would add a retry-after header with 3600 as a value. That will mean that the crawler who just hit the 503 will understand to come back after an hour and that there is no reason to come back before that timeframe has actually passed. Google respects that. Multiple crawlers sometimes are visiting one domain. They won’t all stop immediately, but still, it takes quite a bit off the load for the server.

The more direct way to stop crawling entirely when you are completely overloaded will be to use a HTTP 503 for your robots.txt. The moment Google hits a robots.txt, and this file returns a 503 status code it actually stops crawling entirely until they can fetch the robots.txt once again.

To see if any pages of your website return 5XX error, you’ll want to use the appropriate check under the Issues tab of the SEMrush’s Site Audit tool.

#TechnicalSEO #TechnicalSEOcourse #5xx #5xxStatusCodes #SEMrushAcademy

You May Also Like