Msg#: 4068686 posted 3:12 am on Jan 27, 2010 (gmt 0)
In the test for webmaster, this question
29. Your server has limited bandwidth resources and you would like Google only to crawl at night. What should you do?
* a) Send an email to firstname.lastname@example.org * b) Add "Allow: 11pm-7am" to your robots.txt file * c) Have your server respond with HTTP result code 503 to all users when it's bogged down * d) Dynamically change your robots.txt to disallow crawling during the day
Msg#: 4068686 posted 6:06 pm on Jan 27, 2010 (gmt 0)
"* c) Have your server respond with HTTP result code 503 to all users when it's bogged down" is technically correct.
10.5.4 503 Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
See that "Retry-After" header they mention? There's the direct answer to the question posed in the subject line of this thread. However, I can't comment on whether this approach is advisable, having never tried it.