Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: incrediBILL
If you absolutely have to close a site or section temporarily, then you should use a 503 Service Unavailable response code, either generated by the server (eg. Apache or IIS) or by using server-side scripting (PHP, ASP...)
The best method is not to close the site at all - prepare your new pages on a development server and switch directly to the new version when ready.
Any longer than that is unwise.
Far better to do your maintenance offline, then upload the 'new'.
Closing a site for any length of time will kill revisitors, lose you links, damage your rankings ... and give your rivals the best laugh since "Talk Like A Pirate Day" last year.
When I close a site for maintenance, it's a maximum of one hour, so a 404 is unlikely to hurt.
... give your rivals the best laugh since "Talk Like A Pirate Day" last year.
Do not take a site offline using a 404 or a 410 under any circumstances!
There are many ways to do this right. Among the easiest are to make a copy of your 'old site' in a subdirectory, then rewrite all requests to that subdirectory. Upload your 'new' pages to another subdirectory, and rewrite to that subdirectory based on the requesting URL (yours) for testing. When satisfied with the new stuff, remove the condition from the rewrite to the new directory, and delete the rewrite to the old directory. The new site will go live 'instantly' and fully-formed.
Another way to do it is to again upload the new site to a subdirectory, and then rename that subdirectory to the main directory when ready.
Anyway, the only hard part about revising a site has to do with continuity of dynamic content... There is an argument for suspending posting to forums, blogs, etc. for a short period to avoid discrepancies in the database, but as far as shutting down a site to change a few pages, there is little reason to do that.
My highly regarded forum software (that I did not write!) uses mySQL for everything, and can't even deliver a basic page without it. So when you upgrade, do maintenance, or even backup the database, you have to close the forums, and can't even provide read-only access. Fun, huh?
The forums (run by VBulletin. Also they do get indexed by google) go in maintenance for like an hour (or maybe 2 or 3) every day at about 01:00 PST for automatic maintence (which I could disable if I wanted to). It also may do it randomly because of a bug or something in the database, and it seems liek it fixes itself?
Just wondering how much of a problem this is. I've never thought of it as a problem, except for some whiney users.
[edited by: Xapti at 5:51 am (utc) on April 9, 2007]
Also, one hour in 24 is a lot, and I cannot see how that can be necessary. If your visitors are all in one country, that's fine, I suppose. But if you want an international readership, remember the world doesn't take an hour off :)
I'd see essential mainatenance requiring more than seconds offline as a twice a year entity. If you exceed that, you need a good reason. If spiders miss out on you two or three times in a row, they may give up on you.