temporarily-disable-your-website

How to temporarily Disable Your Website

In many cases, updates and modifications can be made to your WordPress site without requiring downtime. However, there may come a time when you need to temporarily disable your website.

For example, your e-commerce business can't carry out orders as required or has too little inventory to continue selling online for a period. Or you might be planning a redesign, migrating servers, and need to put it on hold for a while.

If it's a temporary situation and you expect to reopen soon, you should put your site on hold to minimize long-term impacts.

In this post, we'll explore how to temporarily disable your website. We'll cover how to create an effective maintenance page, reduce SEO impacts, and set your website up for smooth sailing when the time comes to relaunch it. Let's get started!

 

Can you temporarily disable your website without paying for hosting?

What matters most to answer this question is to realize that even if you're not actively using your website, it still occupies server space. And if it occupies space, you'll have to pay for hosting. So, the answer is no. Remember that there's no way to temporarily turn it off and then reactivate it later without incurring some monthly charges with most web hosts.

However, in some cases, some web hosts like Earth Girl Hosting might reduce your monthly charge to better accommodate you as you take a break from your website. Talk to your hosting company and find out what options they have.

 

Is it advisable to take down the entire website?

Taking a website fully offline for over a few days carries major risks of significant visibility declines that are difficult to recover from. We suggest displaying a temporary maintenance page rather than shutting down the site completely. This method allows search engines to crawl your site if you implement it properly.

 

Best ways to disable your website

This section explores different ways to put your website on hold temporarily. It is important to note that we will prioritize maintaining search visibility and minimizing user disruption while employing these methods.

 

Create a 503 Maintenance page via cPanel

Generally, a 503 Service Unavailable response indicates that the server is temporarily unable to handle the request due to a temporary resource overload or maintenance of the server.

Common reasons for a 503 status include:

  • The server is experiencing high volumes of traffic and temporary overload. This downtime could be due to a spike in traffic or a distributed denial of service (DDoS) attack.
  • The website is undergoing scheduled maintenance or upgrades that require it to be temporarily taken offline. Common maintenance includes security patches, software updates and hardware changes.

Search engines receiving a 503 response will typically retry the request later, understanding that the error is temporary. Note that this differs from 500 series errors like 500 Internal Server Error, indicating a more permanent problem with the server or website.

To create a 503 status via cPanel:

  1. Log in to your cPanel dashboard and click on File Manager.
  2. Navigate to the public_html folder via the left-side panel.
  3. Select the +File button from the toolbar.
  4. Name the file “503.php” and click the Create New File button.
  5. Edit the file, copy/paste the following code, and save it.

<?php
http_response_code(503);

header("Retry-After: 172800");// 2 days in seconds
?>
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding:160px; }
h1 { font-size:60px; }
body { font:24px Helvetica, sans-serif; color:#333; }
article { display: block; text-align: left; width:640px; margin:0 auto; }
a { color:#dc8100; text-decoration: none; }
a:hover { color:#ffffff; text-decoration: none; }
</style>

<article>
<h1>We&rsquo;ll be back shortly!</h1>
<div>
<p>Our apologiesfor the interruption, but we are doing some backend updates at the moment.If anything urgent comes up, do not hesitate to <a href="mailto:#">contact us</a>. We will be back in business in no time, so sit tight!</p>
<p>- The Team</p>
</div>
</article>

Search engines won't be able to properly determine when the page is back "online" if you don't consider the Retry-After header function in your 503-status page. Without the estimated downtime in the Retry-After header, search engines cannot know when it's appropriate to index the page again.

In the above example, we considered 172800 seconds (about 2 days) for bots and search engines to wait before retrying.

You can customize this value and the HTML code based on your needs. The above code is optimized for PHP 8. Also, you can test it before launching your 503 page in a sandbox like https://onlinephp.io/.

  1. Now, you need to set a redirection from .htaccess to the 503.php file. While you are in the public_html folder, find and select .htaccess.
  2. From the cPanel toolbar, select the Edit button to modify your .htaccess file.
  3. Add the following code to your file and save it.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^00\.00\.00\.00
RewriteCond %{REQUEST_URI} !^/503/php [NC]
RewriteRule .* /503.php [L,R]

Note: Instead of “!^00\.00\.00\.00” in the above code, you can add your IP address to access the website while maintaining your website.

 

Enable maintenance mode for your OpenCart store

There are some other easier ways. If you're running your website using OpenCart, read this section. OpenCart comes with a built-in Maintenance Mode, which lets you temporarily disable your website while you're working or improving behind the senses.

To turn this option on, you need to:

  1. Log in to your OpenCart admin dashboard.
  2. Navigate to Systems > Settings.
  3. Click on the Edit icon next to the store you want to turn the option on.
  4. Open the Server tab.
  5. Toggle on the Maintenance Mode.
  6. Click on the Save icon on the upper right side of the page.

Note: When activated, this will show all visitors a message informing them the store is temporarily down for maintenance. However, administrators will still be able to access the store's dashboard and content as usual.

 

Install a WordPress maintenance mode plugin

If you're using WordPress, there are various plugins that can help you set up maintenance mode and present it in an attractive way. Here are 2 options:

 

LightStart: It is an easy-to-use WordPress plugin that helps you build maintenance and coming soon pages.

The plugin offers an intuitive page builder with multiple sections and elements you can drag and drop. You can also access various pre-built templates and designs to save time and effort.

The maintenance mode feature allows you to show a customized message to your visitors when your site is down.

You can personalize the maintenance page with text, images, and videos. This ensures your users have all the right information during website maintenance, and they know when to expect the site to be back up again.

 

SeedProd: This plugin is one of the most popular, enabling you to notify visitors professionally when updating or repairing your WordPress website.

With just a few clicks, you can enable a customized 'Under Maintenance' page informing people about your site status during downtime.

The plugin's maintenance page builder gives you full control over the look and messaging. You can upload a header image matching your site's branding, choose a background color and font style, and write a notice detailing the work performed.

SeedProd also allows you to schedule maintenance mode, so it automatically turns on and off at predetermined times.

 

Create a backup and close your hosting account

If it is not feasible to temporarily disable your website, you still have the option to shut it down completely and restore it later. Creating a backup is extremely important even if you're not planning on disabling your website.

This method allows you to create a physical copy of your website that you can restore on another compatible hosting service if needed. Remember that you may need to update your website to work with the supported technology versions when you decide to relaunch your website. Additionally, note that you will completely lose your SEO rankings.

I recommend saving the backup on your computer and another storage source.

When you want to bring your website back online, follow these steps:

  • Contact your web host and let them know you have a website backup and want to make it live again.
  • Make sure your domain name is correctly linked to your hosting account. You can ask for assistance from the support team.
  • Upload the backup to a file hosting service like OneDrive, Dropbox, Box, or Google Drive, and give the hosting support team access.

 

Consider whether disabling your website is the right choice and weigh the long-term benefits vs the drawbacks. Disabling your website may or may not reduce your monthly charges, but it will damage your SEO ranking and traffic if you have an established website. And, you will also confuse and lose regular visitors.

We hope the above teaches you some methods to disable your website properly.

About Navid Nekouee

I'm Navid, a happiness ninja and the digital marketing manager at Earth Girl Hosting with years of experience in e-commerce. I am passionate about creating digital marketing strategies integrated with cutting-edge web solutions and enjoy blogging about practical problem-solving approaches in this area.

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.