Google has a guide to planning maintenance / downtime: " How to deal with planned site downtime. " in short, you should return the result code 503 HTTP on those pages (pages) that are under maintenance or do not work. here is a sample php code to use on top of these pages:
header('HTTP/1.1 503 Service Temporarily Unavailable');
if you know the exact / approximate time / date of completion of service / downtime, you can use an optional Retry-After header similar to this (along with the above HTTP result code 503):
//when the exact completion time is known. header('Retry-After: Sat, 8 Oct 2011 18:27:00 GMT');
or
//when the length of the downtime in seconds is known. header('Retry-After: 86400');
read google article for more information.
source share