In today’s 24/7 digital world, even online businesses need to take a break once in a while. Whether you need to perform site maintenance, close for the day for religious practices, or you just want to take a vacation, there are times when you might need to temporarily shut down your site.
Sort of like putting a “back in 15 minutes” sign on the door of a physical store.
You might be wondering how shutting down your site might impact your SEO. Fortunately, according to Google Webmaster Trends Analyst John Mueller, there are three simple options available to ensure your site’s search presence isn’t affected:
- Block cart functionality
- Always show interstitial or pop-up
- Switch whole website off
Let’s look at these recommendations in more detail, and tools available in the CodeCanyon marketplace you can use when temporarily closing your site.
Image: Tim Mossholder.
1. Block Cart Functionality
If you run an online store but just want to stop customers from making purchases, the simplest approach is to disable your shopping cart. While there’s no simple way to disable cart functionality for a WooCommerce store, WisdmLabs offers a neat solution using the is_purchasable() function in WordPress.
As Mueller explains, shopping cart pages are usually blocked from search engine crawlers thanks to robot.txt files or blocked from indexing with a robots meta tag. This means that search engines won’t see or index products pages, so you don’t have to worry about any negative impact on your site when disabling your cart, displaying messages that inform customer about why they can’t make a purchase, or if you decide to switch out your cart page for a landing page that explains why your site is closed.
Image: Online shopping concept.
2. Always Show Interstitial or Pop-Up
If you want to shut down your whole site for a period of time, it’s a good idea to display some kind of “We’re closed today!” message, informational page, or pop-up. In this instance, Mueller recommends that your server should return a 503 HTTP result code, i.e. your site is down temporarily and will be back after some delay.
The 503 result code ensure that Google doesn’t index temporary content you’re displaying for users. For example, if you display a pop-up on your homepage that explains to visitors why you’re offline and features a funny gif, that content would be indexed as your website’s content. And you don’t want that!
InMotion Hosting explains how to return a 503 result for your server in this helpful post.
- Create a 503.php file that includes the following PHP code:
header(“HTTP/1.1 503 Service Temporarily Unavailable”);
Lines 2 and 3 define the 503 code. Line 4 defines when the site is expected to be back online. In this case, the number is given in seconds – 3600 seconds is one hour.
In some cases, you might want to give a specific date, so use the following line of code instead:
header(“Retry-After: Fri, 27 May 2016 12:00:00 GMT”);
If you’d rather not mess around with code, you might want to check out WP Maintenance Mode / Coming Soon Page Builder a free plugin that lets you enable an HTTP 503 header for your site. Alternatively, WP Maintenance Mode can add a maintenance page to your site that lets visitors know it’s down for maintenance.
For more on how to use the HTTP 503 header when temporarily disabling your site, check out Yoast’s excellent guide to handling site maintenance.
Displaying a pop-up on your site is an easy way to quickly inform visitors to your site without changing your existing page content. I recently looked at plugins that meet Google’s guidelines for mobile interstitials:
Ninja Popups is the most popular pop-up plugin in our marketplace with 30,000+ sales. With this plugin, you can easily create gorgeous looking pop-ups to inform visitors that your site is temporarily closed and when they can expect it to be back online. There are 70+ beautiful themes you can choose from to get you started.
Master Popups’ powerful and easy-to-use visual editor lets you create stunning pop-ups in no time, which you can use to provide up-to-date information for site visitors as to when your site will be back online. A particularly useful feature is the fullscreen pop-up options, which, if you’re taking your site offline, would allow you to easily hide your homepage or other content.
3. Switch Whole Website Off
Lastly, you can simply turn your server off. This might be the right option if you’re physically moving your server to another location.
For this option, Mueller recommends setting up a temporary server to serve a 503 HTTP result code for all URLs on your site (don’t forget to set up informational pages or pop-ups for those pages!) and switch your DNS to point to the temporary server.
Here’s how to do it:
- Set your DNS TTL to a low time (such as 5 minutes) a few days in advance.
- Change the DNS to the temporary server’s IP address.
- Take your main server offline once all requests go to the temporary server.
- … your server is now offline …
- When ready, bring your main server online again.
- Switch DNS back to the main server’s IP address.
- Change the DNS TTL back to normal.
Closing down your site or making pages offline temporarily doesn’t have to be an additional headache when you need to take time off from your online business. Following the steps above, you can step away from your site and ensure your search presence isn’t negatively affected.
One last thing Mueller advises for physical stores that go offline: Don’t forget to update your opening hours in your Google My Business account settings.
Whether you’re on Team Zuckerberg and support this futuristic technology or you’re on Team Musk and want to ban killer robots, artificial intelligence has already crept into the world of web development. In fact, there are many WordPress plugins that are using artificial intelligence.