Tag Archives: seo

The simplest way to set-up a “we’ll be back shortly” page

If you’re going to have to stop your site for a maintenance or deploy break and care about your users (and SEO!), you should setup a custom 503 page. AskApache provides some documentation on this, but the examples require creating a PHP page. One of the commenters proposed a non-PHP version, but it’s complicated and didn’t work for me.

So, this is the simplest way to set-up a custom “we’ll be back shortly” error page in Apache 2 that also tells Googlebots to retry after 1 hour:

ErrorDocument 503 /503.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/503.html$
Header always set Retry-After "3600"
RewriteRule .* - [R=503]

Read on for explanation and a more advanced example.

Continue reading