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

Calendar 👁️ 89

As website operators, we 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 a "Cannot open" error page on a website would undoubtedly provide a poor user experience, and might even make search engines think that the website has permanently gone offline.

AnQiCMS (AnQiCMS) fully understands this pain point and provides a graceful and flexible solution that allows you to display clear and professional custom prompt information to visitors when the website is closed for maintenance.The process is simple, efficient, and takes into account user experience and search engine optimization.

Anqi CMS shutdown feature overview

In Anqi CMS, implementing this feature is actually very simple, mainly depending on the background "Global Feature Settings".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 during shutdown.

When you need to maintain the website, just switch the "website status" from "normal operation" to "shutdown mode" in the background.Once the website enters the shutdown state, all front-end visits will no longer display normal content, but instead show the shutdown prompt you have set up.

Set your downtime message

The most direct way is to use the "station closure prompt" text box in the background.You can directly enter a concise and clear text here, such as "The website is under upgrade and maintenance, it is expected to recover access at XX time, we apologize for the inconvenience caused to you!"}These words will be directly displayed on your offline page, ensuring that visitors understand the status of the website and estimate the recovery time immediately.

When setting these message texts, try to:

  • 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 you for the visitor's understanding and patience.
  • Guide the user:If there are other contact methods or announcement channels, they can be briefly mentioned.

Advanced customization: create a dedicated landing page

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

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

Inerrors/close.htmlIn the file, you can use template tags to dynamically display the offline prompt content input from the backend:

<!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 used multiple secure 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" %}Get the website logo image address and display it after judgment.
  • {% system with name="SiteCloseTips" %}This is exactly what we entered in the background 'shutdown prompt' text box before.
  • {% contact with name="Cellphone" %}and{% contact with name="Email" %}: Retrieve the phone and email configured in the "Contact Information Settings" backend.
  • {% now "2006" %}: Get the current year for copyright information.

In this way, you can make the shutdown page more recognizable with your brand, provide necessary contact information, even add social media links, and minimize user loss as much as possible.You can design a webpage as you would with CSS, ensuring it displays nicely on any device.

Operation steps: Easily enable the closed site mode.

  1. Log in to the AnQi CMS background.Access the admin panel using your admin account.
  2. Go to the 'Admin Settings'.Find the 'Admin Settings' item in the left menu.
  3. Enter the 'Global Function Settings'.Select "Global Function Settings" from the submenu of "Background Settings".
  4. Toggle "Website Status".Find the "Website Status" option and switch it from "Normal Operation" to "Closed".
  5. Enter the "station closure notice".Enter the maintenance information you want to display to visitors next to the "station closure notice" text box. If you have already customizederrors/close.htmlTemplate, the content here will be called by the template.
  6. (Optional) Custom close station template.If you need a richer display effect, you can use FTP or other file management tools to find the template directory you are currently using undererrors/close.htmlfiles to edit.
  7. Save the settings.Click the "Save" button at the bottom of the page, your website will immediately enter the closed station state and display the prompt information you have set.

Precautions when maintaining the website

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

Related articles

How to ensure that the template file uses UTF-8 encoding to avoid garbled Chinese content?

In website operation, the clear and accurate presentation of content is crucial.Especially when your website contains Chinese content, if you encounter a "garbled code" problem, it not only seriously affects the user experience, but may also damage the professional image of your website.For users of Anqi CMS, ensuring that all template files use the correct encoding, especially UTF-8, is the first step to avoid such problems and is also the most fundamental and critical guarantee.### Why is UTF-8 so important? UTF-8 is the full name of Unicode Transformation

2025-11-09

How to truncate long text content in a template and add an ellipsis for display?

In website content operation, we often encounter scenarios where it is necessary to display long text, such as article abstracts, product descriptions, or user comments.If the complete content is displayed directly, it may cause the page to be long and disorganized, affecting the reading experience of the user.At this time, the long text is intelligently truncated and an ellipsis (...) is added at the end, making it an elegant and practical solution.AnQi CMS as a powerful content management system, its flexible template engine provides a variety of convenient ways to meet this need.### Efficient Core Tool for Extracting Long Text Content

2025-11-09

How to define a temporary variable in a template and use it to display content?

In Anqi CMS, when managing website content, we often find that using temporary variables flexibly in templates can make the code more concise, efficient, easy to understand, and maintainable.The Anqi CMS template system has borrowed the syntax of the Django template engine, which provides a straightforward way to define and use these temporary variables. ### Temporary variables make the template more concise and efficient Why do we need to define temporary variables in the template?

2025-11-09

How to display the content, title, and image of a single page in a custom page?

In website operation, we often need to create unique display methods for specific content, such as designing a unique landing page for product features, service introductions, or company profiles.AnQiCMS (AnQiCMS) with its flexible content model and highly customizable features, makes everything very simple.Today, let's talk about how to easily display the content, title, and images of a custom page, making your website content more personalized.

2025-11-09

How to dynamically obtain and display the current year in the template?

In website operation, it is crucial to maintain the timeliness and accuracy of content, especially information like copyright year, which, if manually updated, is not only cumbersome but also prone to omission.Our company AnQi CMS provides a very convenient way to dynamically obtain and display the current year in templates, ensuring the latest information on the website.

2025-11-09

How to convert multi-line text content into HTML format using a newline character?

In content management, we often encounter situations where we need to enter multiline text, such as product details, service introductions, company profiles, or contact information.This content is typically segmented by pressing the Enter key during backend editing.However, when this content is directly presented on the website front end, you may find that it is 'squeezed' together, with all line breaks disappearing, which not only affects the reading experience but also makes the page look disorganized.AnQi CMS as an efficient enterprise-level content management system, of course, has considered this point and provided a variety of elegant solutions

2025-11-09

How to embed and display a留言验证码in a front-end form?

In website operation, the message board and comment area are often important channels for interaction with users.However, the garbage information and malicious submissions that follow are also a headache.An effective method of integrating captcha functionality to filter out this noise.Today, let's talk about how to easily embed and display a message captcha in the frontend form of AnQiCMS (AnQiCMS), building a defense line for your website.

2025-11-09

How to dynamically filter and display a list of articles through URL parameters or search keywords?

Today, with the increasing refinement of content management, how to make your website content smarter and more considerate in serving visitors is the key to improving user experience and website value.AnQiCMS (AnQiCMS) is an efficient and flexible content management system that provides powerful functions to help us achieve this, especially in terms of dynamic filtering and displaying article lists. The combination of template tags with URL parameters allows for easy construction of highly customizable content presentation methods.This article will give a detailed introduction on how to use URL parameters and search keywords

2025-11-09