HTTP 503 header for site maintenance mode - SEO

A best practice while disabling entire site for maintenance is to render a HTTP 503 error along with a  Retry-After header which will help the to keep indexing your website after downtime is over.

header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600'); //Retry 1 hour
PHP Code sample

Other things to consider:

✔️ Use static HTML with minimum off-page resources; using inline CSS is recommended

🔴 Do not block robots.txt with 503 error; Also do not allow robots to crawl entire site too.

🔴  Do not use any robots blocking techniques