Every webmaster has gone through the issue of having to deal with a site that must go offline for one reason or another for an extended period of time. Either you need to move servers, a hurricane hit your servers, your site was hijacked or something else. When there are no alternatives, and your site is offline - how do you save your site's rankings in Google?
The answer is to use a 503 Service Unavailable server response code.
But what if the server is down and you can't add the server response code? The answer is to switch the server by editing the DNS record.
John Mueller from Google posted his advice on this at Google+, he wrote:
Dear webmasters, if something goes drastically wrong with your hoster, and you can't host your website anymore, please return a "503 Service unavailable" HTTP result code. Doing so helps search engines to understand what's up -- they're generally more than happy to give your site some time to catch up again.
A simple way to handle that - if the webserver is down - is to change the site's DNS to point to a temporary server that returns the 503 for you.
Once the issue is resolved, we'll generally jump back in and crawl your site to get the indexed information updated. If you weren't able to return a 503, it'll probably take a bit of time for things to settle back down with regards to search, but it'll come back, don't worry. If you need to ramp crawling up slowly, you might also want to adjust the maximal crawl rate in Webmaster Tools (we pick up that setting about once a day).
At any rate, if your site was affected by issues like these, I hope you're able to resolve them (and the other, perhaps more important issues that often go along with disruptions like these) as soon as possible. If there's something Google can do with regards to web-search to help get your site get back on its feet, feel free to post here, in our forums, or join our office-hours hangouts.
This is important advice to be reminded about, because this stuff doesn't come up all that often and when it does, webmasters and SEOs often scramble and are unsure what to do.
Here are some of our other stories on this topic:
- SEO Tip: NoIndex Or 503 Site Coming Soon Pages
- SEO Considerations For SOPA Website Blackouts
- Site Downtime & Worried About Google? Return 503 Status Code
- Site Going Offline For 10 Hours? Google Recommends Returning a 503 Service Unavailable Response
Forum discussion at Google+.