Martin Abrahams Team : Web Development

Implementing an SEO friendly maintenance page

Martin Abrahams Team : Web Development

In my last blog I explained the importance of planning for downtime. I've decided to follow on from this and explain how to practically implement a maintenance page.

Downtime can be scheduled maintenance or a serious failure of the website or key component, but if you place yourself in the user's shoes - it makes no difference to them. I have my suspicions that most companies show the same downtime message for all cases and will always claim that the downtime is planned in an attempt to save face. It's fair to say that customers will be more empathetic to "important system upgrades" than a disaster/failure message of some kind. However you're still leaving them with next to nothing. As I mentioned in my last blog, providing some useful content on the downtime page can help the situation.

Having your website unavailable for a period of time can lead to disgruntled customers and loss of revenue and/or leads during the period of downtime. This in itself is bad enough, however the real less immediate concern is the potential for harm to your search engine ranking. If you are unfortunate enough to have a visit from googlebot during a period of downtime, your search engine rankings may take a temporary beating which could have a greater affect on your business in the long term.

The key to staying on side with google, is to be honest with it - yes we can actually tell google that the site is undergoing maintenance, we do this through the use of HTTP status codes.

Usually a downtime page is actually a separate standalone website which can be switched on and off in place of the real website. This site usually consists of a single static page explaining the situation. This page can exist on the same webserver (common for scheduled maintenance scenarios) or on a different physical server which can be switched to at the DNS level. This standalone website will not contain the same page hierarchy as the real website - this is where the trouble starts. When users and/or googlebot enter your website via a deep link, the downtime website will display a 404 "page not found" error for that page, not the downtime page that you would see when going straight to the domain. This is a major problem because the user will see the page not found error and nothing about the downtime, leading them to believe that they've clicked on a broken link. This is exactly how google will see it aswell, dead links should be pruned from the search index.

There are two things which you need to do at a minimum on your downtime website. You need to capture 404 requests and redirect them to the website root (homepage/downtime page). In this scenario we want to forward the requests using HTTP status code 302 which indicates that the page as moved temporarily. This does two things, firstly it allow the downtime page to be displayed inplace of the requested page and secondly it tells google to leave it's index in place. If you were to use the regular 301 redirect in this case it would be telling google that the requested page no longer exists that this location and it has been replaced by the redirect URL (the home page in this case). Suddenly you have a one page website in the eyes of google!

The next step is to change the downtime page to output the status code of 503 which is "Service Temporarily Unavailable". As far as the end user is concerned they will see the downtime page, but as far as googlebot is concerned it will treat the website as temporarily unavailable, so it will ignore everything and come back another time.