Our main website will be "dark", though Live Chat will still be available, as will the client management and support section of the site.
As always, please be careful when downloading and/or using scripts from unknown sources. Know what you're adding to your site!
- Set your index page to return a 503 status code.
A 503 HTTP code means "service temporarily not available." It tells Google and all other search engines that your site is temporarily down (Like for maintenance), and also doesn't get the text of your blackout page indexed as new content. More on the details of why you'd want to do this are in Pierre Fars' Google+ post Website outages and blackouts the right way.
How to set a 503 code header?
The easiest way is by using PHP. Your page can be plain HTML, all you need to do is change the page extension from
.phpfor this to work. Simple add the following code to the very top of your page, before the DOCTYPE or anything else, like this:
OPENING PHP TAG GOES HERE
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 84600'); // in seconds 84600 seconds in one day
CLOSING PHP TAG GOES HERE
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" (Proper DOCTYPE goes here)
An important note: Don't forget the PHP tags! You'll need an opening PHP tag and closing PHP tag where indicated (the limitations of the blogging software used doesn't allow for displaying scripting tags).
Check your page to make sure it's returns a 503 header.
Upload your blackout page and test the headers using an online server headers checker such as this one. Here's what you should see (with the URL of your website):
#1 Server Response: http://helloworldweb.com
HTTP/1.1 503 Service Temporarily Unavailable
Date: Wed, 18 Jan 2012 04:06:29 GMT
- Turn OFF or pause any server/website uptime monitoring services, such as Pingdom, so you don't spend the 24 hours being alerted that your website is down.
~ Mara Alexander
Hello World Web Design and Hosting