How To Make A 503 Service Unavailable Page
Print Article
How To Make A 503 Service Unavailable Page

It’s inevitable — at some point your site WILL go down. Ideally, the reason will be one of your choosing — you’re performing some sort of maintenance on it or adding some super-functional feature that will distance you even further from the competition. More likely, though, your site will go down because of server issues, heavy traffic, or even a hack or virus. And, when that happens, you don’t want Google’s search engine spiders coming around and crawling your site while it’s not looking its best.
That’s why you need to know how to put an Error 503 page up. The purpose isn’t really to tell users that your site is temporarily unavailable; instead, it’s to tell search engines to come back later. It’s especially helpful if your site relies on your SEO skills to get found — if Google comes by and finds it riddled with spammy links due to an attack from the Gumblar virus, it may de-list your site, thinking it’s an entire page of spam. It’s best, then, to bar access to it temporarily while you get the problem sorted out.
PHP Code — maintenance.php
This code snippet simply sends a message to the interwebs that your site is down for the moment, but will return to full functionality shortly. Create the PHP file as follows:
Then, you’ll want to use an Apache mod_rewrite (aka .htaccess) module to ensure that all requests for your page see the message. The first mod makes sure everyone gets redirected to the error 503 message, while the second allows your IP address (or the site admin’s) access to the page to work on it.


[...] As most of you know, Twitter displays a "Fail Whale" when their servers are overloaded and a 503 page is displayed. Matthew Inman (creator of http://theoatmeal.com/) decided to create a similar page for Tumblr. Its called Tumblbeast and it looks like this: We thought we should make one for our customers…. Just for fun. =). By the way, for those who are interested in making a 503 service unavailable page, here's a decent guide: http://webhostinghelpguy.inmotionhosting.com/web-hosting/how-to-make-a-503-service-unavailable-page/ [...]