Emergency Off-Line Mode

[Important]Important

This feature uses .htaccess files which are only compatible with Apache, Litespeed and a very few other web servers. Some servers (such as NginX and IIS) are incompatible with .htaccess files. If we detect a known to be incompatible server type this feature will not be shown at all in Admin Tools' interface. It should be noted that even if you do see it in the interface it doesn't necessarily means that it will work on your server. This depends on your server's capabilities. If you are unsure or believe it doesn't work please consult your host.

If you have reasons to believe that your site is under active attack you can use this feature to cut off all access to your site at the web server level. Only your current IP address will have access to the site. The Emergency Off-Line Mode feature carries out the following actions:

  • It creates —if it doesn't already exist— a static HTML page named offline.html in your site's root. This page contains the offline message to show to visitors.

  • It creates a backup copy of your site's .htaccess file, if there was one, under the name .htaccess.eom.

  • Finally, it creates a .htaccess file which will temporarily redirect all access attempts to the offline.html page. It will allow only your IP address to have access to the site.

In order to put your site in Emergency Off-Line Mode, simply click on the Emergency Off-Line button in Admin Tools' Control Panel page. This will get you to the following page:

The Emergency Off-Line Mode page

Clicking the Set Offline button will attempt to perform the steps outlined above. Should any of those steps fail, for example due to insufficient file permissions, you can still put your site in Emergency Off-Line Mode by taking out the following procedure:

  1. Keep a copy of your site's .htaccess file, e.g. renaming it to htaccess.bak.

  2. Create a new .htaccess file in your site's root with its contents being what displayed in the last part of the Emergency Off-Line Mode page.

If your Internet IP address changes before you disable the Emergency Off-Line Mode —i.e. your connection drops or you switch to another computer which connects to the Internet through a different Internet router— you will be unable to log in to your site. In this case, follow these steps:

  1. Using an FTP application of your liking remove the .htaccess file, or upload a blank .htaccess file overwriting the old one.

  2. Go to your site's administrator back-end and relaunch Admin Tools' Emergency Off-Line mode. Clicking on the Set Offline button will create a new .htaccess file with your current IP address. Your backup .htaccess.eom file will not be overwritten.

If you want to set your site back on-line, just visit the Emergency Off-Line page and click on the Set Online button. This will replace the off-line .htaccess file with the contents of the .htaccess.eom backup file and remove the backup file. If this doesn't work, follow this manual procedure:

  1. Using an FTP application of your liking remove the .htaccess file, or upload a blank .htaccess file overwriting the old one.

  2. Rename the .htaccess.eom backup file back to .htaccess

Will I be able to use FTP or my host's control panel file management when I enable this feature?

Of course! This feature only protects web (HTTP/HTTPS) access. It can't and won't touch FTP access or your hosting control panel's file management.

Should I use the emergency off-line mode when I want to temporarily put my site off-line, e.g. for maintenance?

It's not recommended. This feature is designed for emergencies. Also note that when you use it nobody can use permalinks (URLs which do not contain index.php in them), not even you.

The offline.html page Admin Tools creates is horrid. Can I change it?

Thank you for asking. It's horrid on purpose (we want you to provide a page which better fits your brand and doesn't look like every other site's out there). Of course you can change it. Simply upload an offline.html of your liking to your site's root. You can link to JPG, GIF, PNG, BMP, SWF, CSS and JS files —on the same or a different server— from inside the HTML of this file. Do not try to link to other file types, it will not work.

Won't the redirection to offline.html screw up my SEO ranking?

No. The redirection to offline.html is made using the 307 HTTP status code which tells search engines that this redirection is temporary, they should not index the page now, but come back later when the problem will have been restored.

Help! I have been locked out of my site! Fix it!

Read a few paragraphs above. You just have to remove a file using FTP.

The redirection doesn't work! I test it from another device connected on the same WiFi / network and I can still see my site!

Well, yes, that's the whole point. You are supposed to be able to see your site only from your IP address. Which is shared by all devices on the same network.

If you want to test that this feature really works please try accessing your site from another computer, connected to the Internet from a different router / network connection. One good idea is to use your cellphone, as long as it connects to the Internet over a cellular connection (e.g. 3G or 4G), not over WiFi. If you did that and still don't see the redirection happening, make sure that your server supports .htaccess files and that it has mod_rewrite enabled. Some servers, like IIS, do not support .htaccess files at all. If this is the case, consult your host about taking your site completely off-line.

Help! As soon as I clicked on "Put Offline" I got a white page or Internal Server Error 500 page.

Don't panic! You have a really old version of Apache —1.3 or 2.0— which doesn't support a feature used in the .htaccess file generated by Admin Tools. You can easily work around this issue by editing the .htaccess file in your site's root, using an FTP application. Replace [R=307,L] in the last line with [R,L] (that is, remove the =307 part) and save back the file. That's all.

My Internet connection drops all of the time. Will I get continuously locked out of my site if I use this feature?

It depends. If you have a static IP address, no, you will never get locked out. If you have a dynamic IP address, most likely yes. Some ISPs will assign you the same IP address if your connection only dropped for a couple of minutes. Other ISPs will change your IP address every hour, even if your connection never drops. It all depends on how your ISP assigns IP addresses to its clients. The only way to find out is the hard way: trial and error.