27
Dec '12

So many of you may use holding pages when you are doing updates to live sites. What many of you may not realise is that this can result in you getting majorly spanked by search engines. In order to prevent this you can use the 503 header to tell search engines that your site is under maintenance and will be back shortly:

header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: Wed, 2 Jan 2013 09:00:00 GMT");

or

header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: 3600");