How do I temporarily disable my website?

Customers occasionally ask how they can temporarily disable their website, for legal or other reasons.

Disabling your site if you’re using WordPress

If you’re using WordPress, a plugin called Maintenance can show visitors a custom or blank page, while still allowing you to edit and test the site:

  1. Login to your WordPress dashboard
  2. Click Plugins in the left-hand-column
  3. Click Add New at the top of the screen
  4. In the “Search Plugins” box, type Maintenance and press enter
  5. Make sure you’ve found the plugin called simply “Maintenance”, by author “fruitfulcode”
  6. Click Install Now
  7. Click Activate Plugin

Your dashboard will then show the words “Maintenance is On” along the top, letting you know that normal visitors see only a generic page saying something like “Maintenance mode is on: Website will be available soon”. You can modify that text or disable it by clicking the “Maintenance is On” text along the top.

(If you want to redirect visitors to another site instead of showing text, try a different plugin called CGC Maintenance Mode.)

What if I’m not using WordPress?

The instructions below explain how to do this if you’re comfortable editing files on your site. However, if you’re a hosting customer of ours, we’ll be glad to do this for you at no charge: just contact us and we’ll take care of it within one business day.

For non-WordPress sites, first create a file named error403.html at the top level of the site. This file must be larger than 256 bytes in size to make it appear in Internet Explorer (you can add spaces to the end of the file if necessary).

Then add this single line to a .htaccess file in the directory you want to disable (or at the top level of your site if you want to disable all of it):

Deny from all

After doing this, all visitors will see the contents of the “error403.html” page you created.

If you want all visitors to your site to be temporarily redirected to a different page, you could instead use this single line (with the URL changed to the page you want people to see instead):

RedirectMatch .*

If you’re a customer of ours and you’re unable to follow these steps, contact us and we can do it for you (this may take up to one business day).

What if I want to be able to see the site myself, but block other people?

If you’re using WordPress, the Maintenance plugin described above does exactly this.

If you’re modifying your site’s .htaccess file instead of WordPress, the “Deny from all” line in the instructions above blocks all visitors, as you would expect.

You can add an “Allow From” line specifying your own IP address to allow that IP address. Just make your .htaccess file look like this:

Allow from
Deny from all

That “” is the IP address of the computer you’re currently using to view this Web page. You can change it to whatever IP address you want to allow, or add multiple “Allow from” lines if you need to allow multiple IP addresses. Just don't forget the “Deny from all” line at the end to block everyone else.

How can I learn more?

The Apache Web server documentation describes the Allow, Deny and ErrorDocument commands in more detail if you’re interested.