How To Put Your Site Into Maintenance Mode

Article By: tommy


Apache Web Server VPS setup and configuration There are times when you want to disable access to your site. You could simply add a 'deny from all' to your .htaccess page but this gives the end user an ugly forbidden page and makes your site look broken.

A better option is to create a nice looking page that explains to the user that your site is undergoing maintenance and will be back online shortly. You can do this easily if your web server supports mod_rewrite (most do) using the following instructions.


  • Web Server with mod_rewrite support
  • Web Server with .htaccess support


  1. Create a page with the desired content, save it as maintenance.html, and upload it to your site.

  2. In the root (public_html/) of your site create (or edit) the .htaccess file and add the following lines. Be sure to change the IP address on the REMOTE_ADDR line to match your IP address. This will allow you to access the site while others are redirected.
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !/maintenance.html$
    RewriteCond %{REMOTE_ADDR} !^$ # Change this to your ip address so that you can bypass the redirect
    RewriteRule .* /maintenance.html [R=307,L]

Your site should now redirect users to the maintenance.html page when they visit your site. Remember that if you added your IP address to the filter that the redirect won't happen when you visit the site. If you want to test the redirect you can comment out that line using a #.

Tags: , , ,

Welcome to the healthcare-only HIPAA - GDPR compliant cloud. Exclusively hosted on a HPC environment!

Learn more or start today by choosing your secure HIPAA - GDPR compliant server's Operating System bellow and pick the package that's best for you.

BIPmd makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine, thousand or more.

Windows VPS options and add ons
Linux VPS options and add ons


Looking for a custom solution?

Our technicians can provide you with the best custom-made solutionss on the market, no matter whether you're a small business or large enterprise.

Get in touch

Leave a Reply