Google Webmaster Central team in its recent blog post, advises webmasters on how to deal with planned site downtimes to avoidnegative effects on your site’s visibility in the search results. The main pointers of the blog are:
- When a page is requested, it is better to return a 503 HTTP result code which means ‘Service unavailable’ instead of returning an HTTP result code 404 (Not Found) or showing an error page with the status code 200 (OK). This informs search engine crawlers that the downtime is only temporary.
- If the length of the downtime is known to the webmasters, they can specify it in an optional Retry-After header. This can be used by Googlebot to determine when to re-crawl the URL. This way, both the visitors and bots can also estimate the time when the site will be back in action and accessible again.
- Returning a 503 HTTP result code could also solve various problems encountered by search engines “with sites that return 200 (OK) result codes for server errors, downtime, bandwidth-overruns or for temporary placeholder pages (“Under Construction”).”
- Have a separate server for actually returning the 503 HTTP result code in case of planned server downtime like hardware maintenance.
- However, 503 is not a permanent solution. If your site prolongs the return of 503 HTTP result code, your URL could be removed from Google’s index.
- “If you set up a 503 (Service Unavailable) response, the header information might look like this – header(‘HTTP/1.1 503 Service Temporarily Unavailable’);
– header(‘Retry-After: Sat, 8 Oct 2011 18:27:00 GMT’); when using PHP.”
- You may also provide a customized 503 message that explains the situation (of your site) to users and inform them when your site will be available again.
You may refer RFC 2616 for any further information related to HTTP result codes.