|How Do You Close a Website For Maintenace?|
I'd like to close my entire website for maintenance. How can I redirect all the pages to a 'closed for maintenance' notice?
Use a special 404 page; if the page they want is there, fine, they'll see it.
If not, they'll get a message (with a time and date for return).
A 404 (Not Found) error is bad news in terms of indexing the site - you may well find pages will disappear from search engines if you serve a 404.
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.
Close a site?
No. No. No.
When I close a site for maintenance, it's a maximum of one hour, so a 404 is unlikely to hurt.
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.
Oh, it can hurt badly, and they will laugh even harder than amateur pirates, having just submitted all your 404 URLs to the G Removal Tool...
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.
Crikey; your rivals must be a bit obsessive.
Don't they spend any time on their own sites?
And does Google act on removal requests that quickly?
Why not install a local server on your computer and edit offline? Upload when the changes are made.
I have a good excuse for having to close a site like 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?
I run a website which, due to lazy/missing helpers, has obsolete and not very useful information on it, except in the forums, which is quite popular.
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]
There is a conceivable risk from rivals, as suggested above; you may be able to put a figure on it.
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.
You may want to switch off database related functionality for database maintenance but the whole site? never!
Matt Cutt's recent April Fool hack of his site used a 302 to redirect to the 'hacked' page.
Since I'm not him, I'd still never voluntarily take a site offline.