What is the correct HTTP status code to send when a site is down for maintenance?
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-05-07T06:21:37Z
Indexed on
2010/05/07
6:28 UTC
Read the original article
Hit count: 186
Is there a HTTP status code to tell Google (and others) to go away, index me again later?
Basically, one that semantically tells clients that the site is down for maintenance?
The ones I have considered are
304 => Not modified
307 => Temporary redirect
410 => Gone
503 => Service Unavailable
I'm leaning towards the last one, but was just curious as to which one was proper choice.
Thanks
Update
Is this the correct way to send it with PHP?
header('Status: 503 Service Unavailable');
© Stack Overflow or respective owner