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
- What if I’m not using WordPress?
- What if I want to be able to see the site myself, but block other people?
- How can I learn more?
Disabling your site if you’re using WordPress
- Login to your WordPress dashboard
- Click Plugins in the left-hand-column
- Click Add New at the top of the screen
- In the “Search Plugins” box, type Maintenance and press enter
- Make sure you’ve found the plugin called simply “Maintenance”, by author “fruitfulcode”
- Click Install Now
- 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?
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 .* http://www.example.com/page.html
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 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 126.96.36.199 Deny from all
That “188.8.131.52” 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.