Skip to content

Forcing a maintenance page

If you wanted to temporarily prevent visitors to your site while performing maintenance, add the following snippet to your .htaccess file in your domains public_html folder and ensure you have a maintenance.html file.

# Force a maintenance page on all visitors
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ - [R=503,L]
</IfModule>
ErrorDocument 503 /maintenance.html
Header Set Cache-Control "max-age=0,no-store"