My
Ideal
Host
We do more than just host websites
Customer login
HOME
WEB
HOSTING
RESELLER HOSTING
CUSTOMER SUPPORT
TUTORIALS
COMPANY
View source
for
The best way to perform your site maintenance and handle downtime
<div align=justify>There are cases when your site can experience 'planned' downtime. Yes, you have got it right. Not the server downtime, but the one caused by the planned site maintenance. By this we mean making changes to your site or simply updating it. This is as easy as it may seem and required some pre-maintenance actions. Read this article further and you'll get informed on what has to be done prior to planned downtime. So, before taking your site off from the web you should make sure both site visitors and search engines are aware that the downtime is temporary. This is required due to the following factors: * when a site visitor see something like 'This page not found', he thinks that the page no longer exists and won't come back to your site; * taking a site down may cause search engine ranking loss. That is why you need to inform them that it is a temporary thing and provide the date the site is on-line again. Also, do not make the two most common mistakes in this case: '''1.''' don't make your site visitors disappointed by seeing 'Not found' page and no more explanation; '''2.''' explain the reason of the site being down. Every time you browse the net, a message from the website's server is sent to your browser. This message is called a HTTP Status code. There are a lot of them, however we'll need the following ones: * '''200 OK''' - This status is self-explanatory. The page was found and can be viewed from any browser. * '''404 Not Found''' - Appears when the requested page isn't found or no longer exists. * '''503 Service Unavailable''' - This code means that the server is temporary unavailable but will be back on-line soon. This is the proper status to use when taking down a site for maintenance. You may ask: but how to use this status and what exactly should I do with it? Don't worry, just read further =). To inform search engines you must create a file that returns a 503 status code and place it under your account. This can be done by copying the lines below into a new file and saving it as 503.php: ''header('HTTP/1.1 503 Service Temporarily Unavailable');'' ''header('Status: 503 Service Temporarily Unavailable'); ''header('Retry-After: 7200'); // in seconds'' The first and the second line state that this is a 503 status code, and the last one tells the search engines when the site is expected to be on-line. You should either provide the number (in seconds) or the exact date (e.g. ''header('Retry-After: Fri, 17 Feb 2012 17:30:00 GMT');''). '''''Note:''''' the time should be entered in GMT/UTC. But you should also redirect all pages on your site to 503.php as you will receive requests from different people to different site pages. You can redirect the pages by adding the following code to your .htaccess file: ''Options +FollowSymLinks'' ''RewriteEngine On'' ''RewriteBase /'' ''RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.89'' ''RewriteCond %{REQUEST_URI} !^/503\.php [NC]'' ''RewriteRule .* /503.php [R,L] '' This will allow you to view the site from your IP address (be sure to replace 123\.45\.67\.89 in the example above with your actual IP, which can be obtained '''''[http://whatismyipaddress.com/ here]''''' ) and everyone else will get the 503 HTTP status. Now we'll tell you about the proper way to inform the site visitors of the downtime reason. Simply edit the above mentioned 503.php file and add a message containing short explanation of the situation (e.g. ''Site is temporary unavailable due to maintenance. We are expected to be back in 2 hours'' or something of the kind). The code for this message will look like this: {{#icon: 503 message.png|503 status message}} Now both humans and search engine robots are informed to come back later. This is the best way to perform site maintenance in order to prevent Google from indexing the temporary site version, experiencing possible ranking loss and losing potential site visitors.</div>
Return to
The best way to perform your site maintenance and handle downtime
.
Navigation
Hosting Issues
Cloud Hosting
Billing Issues
FAQ
Articles
News
Interesting from the web
Search
Subscribe to our newsletters