I've to do some big works to my website, so I've to put it offline for some hours, but I don't want to lose my rank in google. I've read this tutorial: http://www.branded3.com/blogs/handle-googlebot-during-site-downtime/ This is the correct procedure, right?
I've also another question. Where should I put this code?
<?php
header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: 3600");
php?>
In the index.php, ora in a new page named errorpage.php in the root? Google will find this automatically?
Thanks!
Statusheader - that's non-standard and unnecessary IMO. See also these other questions: How do I temporarily disable a website? and How to set restrictions on my website? – MrWhite May 04 '14 at 11:11Statusheader is required for fastcgi – Yogu May 04 '14 at 13:00header("Status: 503 Service Temporarily Unavailable");I'm sorry but I really don't have idea about how these things work. – testermaster May 04 '14 at 21:16Statusheader and FastCGI. However, I think if PHP is configured properly then this should be unnecessary (PHP should convert it as reqd)? See this SO question: http://stackoverflow.com/questions/8828275/still-necessary-to-use-status-404-not-found-for-fcgi – MrWhite May 07 '14 at 22:44HTTP/1.1...andStatus:lines do the same thing but in different server environments. Ideally, you should only need the first one (and PHP should convert it as reqd). (You should still use theRetry-Afterheader.) – MrWhite May 07 '14 at 22:49