How to display a custom shutdown notice to visitors when the website is under maintenance?

As website operators, we will always encounter situations where we need to maintain and upgrade the website. Whether it is database optimization, system updates, or content adjustments, these operations sometimes require temporarily shutting down the website to prevent unexpected errors or incomplete content display during maintenance.However, simply displaying an "Unable to open" error page on the website would undoubtedly provide a poor experience for visitors, and it might even lead search engines to mistakenly believe that the website has been permanently taken offline.

AnQiCMS (AnQiCMS) fully understands this pain point, providing a graceful and flexible solution that allows you to display clear and professional custom reminder information to visitors when your website is under maintenance.The process is simple and efficient, and also takes into account user experience and search engine friendliness.

Anqi CMS shutdown feature overview

In the Auto CMS, implementing this feature is actually very simple, mainly depending on the 'Global Feature Settings' on the backend.The system is built with core options such as "Website Status" and "Shutdown Prompt", allowing you to easily control the open status of the website and the content displayed when it is closed.

When you need to maintain the website, simply switch the 'Website Status' from 'Normal Operation' to 'Closed Site' mode in the background.Once the website enters the closed site state, all front-end visits will no longer display normal content but instead show the closed site notice you have preset.

Set your offline notice information

The most direct way is to use the "site-unavailable" text box in the background.You can directly enter a concise and clear text here, such as "The website is undergoing upgrade and maintenance, it is expected to be restored at XX time, please forgive the inconvenience caused!EnglishThis text will be directly displayed on your landing page, ensuring that visitors understand the status of the website and estimate the recovery time at their first visit.

When setting these prompts, please try to do the following:

  • Clear and concise:Directly state that the website is under maintenance.
  • Provide expectations:If possible, inform the expected recovery time or date.
  • Express apologies:Thank the visitor for their understanding and patience.
  • Guide the user:If there are other contact methods or channels for announcements, they can be briefly mentioned.

Advanced Customization: Create a dedicated shutdown page

The prompt showing only plain text may seem monotonous, especially for corporate websites that pay attention to brand image. Anqi CMS provides stronger customization capabilities, allowing you to modify the template files specifically used for closed stations.errors/close.html.

This file is usually located in the directory of the template you are currently using (for example:/template/default/errors/close.html)under. By editing it, you can add HTML structure, CSS styles, and even embed images or other dynamic content, just like designing a regular page.

Inerrors/close.htmlIn the file, you can use template tags like this to dynamically display the background input of the closure prompt on the page:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>{% system with name="SiteName" %} - 网站维护中</title>
    <style>
        body { font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'Microsoft YaHei', Arial, sans-serif; background-color: #f8f8f8; color: #333; text-align: center; padding: 50px; }
        .container { max-width: 600px; margin: 0 auto; background-color: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        h1 { color: #007bff; margin-bottom: 20px; }
        p { line-height: 1.6; margin-bottom: 15px; }
        .contact-info { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
    </style>
</head>
<body>
    <div class="container">
        {% system siteLogo with name="SiteLogo" %}
        {% if siteLogo %}
            <img src="{{ siteLogo }}" alt="{% system with name="SiteName" %}" style="max-width: 150px; margin-bottom: 20px;">
        {% endif %}
        <h1>网站正在维护中</h1>
        <p>
            {% system with name="SiteCloseTips" %}
        </p>
        <p>给您带来的不便,我们深感抱歉!</p>
        <div class="contact-info">
            <p>如有紧急事宜,请联系我们:</p>
            <p>电话:{% contact with name="Cellphone" %}</p>
            <p>邮箱:{% contact with name="Email" %}</p>
        </div>
        <p style="margin-top: 30px; font-size: 0.9em; color: #999;">&copy; {% now "2006" %} {% system with name="SiteName" %}. All rights reserved.</p>
    </div>
</body>
</html>

In this example, we use multiple security CMS system tags to dynamically retrieve information:

  • {% system with name="SiteName" %}: Get the website name you set in the background.
  • {% system siteLogo with name="SiteLogo" %}English: Get the website logo image address and make a judgment display.
  • {% system with name="SiteCloseTips" %}English: This is exactly the content we entered in the "shutdown prompt" text box in the background before.
  • {% contact with name="Cellphone" %}and{% contact with name="Email" %}:Separately obtain the phone and email addresses configured in the "Contact Information Settings" on the backend.
  • {% now "2006" %}:Retrieve the current year for copyright information.

Through this method, you can make the closed page more brand identifiable, provide necessary contact information, even add social media links, and minimize user loss as much as possible.You can add CSS styles to it just like designing a regular page, ensuring it displays-friendly on any device.

Operation steps: Easily enable the website shutdown mode.

  1. Log in to the Anqi CMS backend.Use your admin account to access the background management interface.
  2. Go to 'Background Settings'.Find the 'Background Settings' item in the left menu.
  3. Enter 'Global Feature Settings'.Select "Global Function Settings" from the submenu of "Background Settings".
  4. Switch "Website Status".Find the "Website Status" option and switch it from "Normal Operation" to "Closed."
  5. Fill in the "Shut Down Tip".In the adjacent "Shut Down Tip" text box, enter the maintenance information you want to display to visitors. If you have already customizederrors/close.htmlTemplate, here enter the content to be called by the template.
  6. (Optional) Customize the shutdown template.If you need a richer display effect, you can use FTP or other file management tools to find the directory of the template you are currently using undererrors/close.htmlfile inside to edit.
  7. Save settings.Click the 'Save' button at the bottom of the page, your website will immediately enter a shutdown state and display the prompt information you have set.

Points to note when maintaining the website

  • Search engine friendliness:When your website enters closed mode, search engine crawlers may still access your site.The shutdown feature of AnQi CMS handles HTTP status codes properly (usually 503 Service Unavailable), indicating to search engines that this is just a temporary maintenance, which helps to avoid negative impacts on SEO.This means that the search engine knows that your website is just taking a break and not disappearing permanently.
  • Pre-communication:Before conducting long-term maintenance, inform users in advance through other channels (such as social media, email notifications, website bulletin boards) can effectively reduce user confusion and dissatisfaction.Clear communication always wins the understanding and support of users.
  • Test shutdown page:Before going live, make sure to test the shutdown page on different browsers and devices to ensure normal display, accurate information, and style