In the operation of a website, for reasons such as maintenance, upgrades, or emergency handling, it is sometimes necessary to temporarily set the website to a shutdown status.An excellent content management system (CMS) should not only provide this basic function, but also allow you to display custom prompts to visitors during closed periods to maintain a good user experience and convey necessary notifications.AnqiCMS (AnqiCMS) provides such a flexible and practical mechanism.

Why is it necessary to shut down and display a custom prompt?

The closure of a website does not simply mean the interruption of services, but is an important operational strategy. Common use cases include:

  • System upgrades and maintenance:When performing operations such as updating the AnqiCMS version, optimizing the database, or migrating the server, it is necessary to temporarily close external access to avoid data inconsistency or display errors.
  • Content大规模调整:When the website undergoes a major redesign, content structure adjustment, or batch import/export of data, the site shutdown can ensure that users do not access half-finished products or erroneous data.
  • Emergency issue handling:When encountering unexpected situations such as security vulnerabilities, malicious attacks, or service failures, shutting down the site can gain time for troubleshooting and repair, while also preventing the problem from escalating.

In these cases, if the user encounters a blank page or an error page, they may feel confused and even lead to user churn.If a friendly custom prompt is displayed, it can clearly inform the user of the current status of the website, the expected recovery time, or provide other contact methods, thereby effectively managing user expectations and reducing negative impacts.

How to implement a custom shutdown prompt in AnQi CMS

The Anqi CMS provides two main methods to implement custom prompts during website shutdown: quick configuration through the background settings, as well as deep customization through modifying template files.

1. Through the background global settings, configure the shutdown prompt.

This is the most direct and fastest way, suitable for most scenarios where a temporary shutdown and simple prompt are required.

First, log in to your Anqi CMS backend management interface. Find and click on the menu in the left navigation bar.“Backend Settings”Then, select the menu option.“Global Settings”.

In the global settings page, you will see an option named“Website Status”. By default, it may be set to “Normal Access”. When you need to shut down the site, switch it toStation Closed Status.

Immediately afterwards, a message will appear belowStation Closure Notice

After configuration is completed, save the settings, your website will immediately enter the closed site status and display the customized prompt message you have set.

2. Deeply customize the closed site page through the template file

If you are not satisfied with the default closure prompt page or would like to display an independent page that conforms to your brand image and contains more interactive elements when closing the site, Anqi CMS also supports deep customization through modifying template files.

In the template structure of Anqi CMS, there is a dedicated template file for handling site shutdown, the path is usually the theme you are currently using.errors/close.html.

You can find and edit this template.close.htmlFile, design it into a complete closed station prompt page. In this template file, you can:

  • Fully customize the page layout:Introduce your website's logo, brand colors, navigation elements (if you wish to display some navigation on the closed page), even add background images or videos.
  • Integrate dynamic information:Utilize the powerful template tags of the Anqi CMS to dynamically display the content from the backend settings. For example, you can use{% system with name="SiteName" %}to display the website name,{% system with name="SiteLogo" %}Show the logo image. The most critical part is that you can input the content in the "Offline Notice" text box on the backend through{% system with name="SiteCloseTips" %}Labels are dynamically embedded into your custom page. This way, you can quickly update the prompt text in the background without modifying the template file, even if the overall design of the page remains unchanged.
  • Add additional features:For example, you can add a countdown timer to inform users when the website will be restored, or provide a simple subscription form so that users receive notifications after the website is restored.

Through this approach, even when the website is in a closed station status, users will not see a shoddy page when they visit, but a beautifully designed, informationally complete, and brand-element-rich professional page, which greatly enhances the user experience and helps maintain the brand image during maintenance.

Summary

The shutdown feature of AnQi CMS, from simple backend text prompts to flexible template file customization, can meet your needs in different scenarios.It ensures that you can maintain effective communication with users and minimize negative impact while managing the visibility of the website during important maintenance or upgrades.Whether it's a quick release of a maintenance announcement or displaying a meticulously designed shutdown page, Anqi CMS provides you with a convenient solution.


Common Questions (FAQ)

Q1: Will the shutdown of the website have a negative impact on search engine optimization (SEO)?A1: If a website remains closed for a long time and the server returns a 200 OK status code, search engines may consider that your website content has disappeared, which could affect your ranking.However, the shutdown feature of Anqi CMS usually configures the server to return a 503 Service Unavailable status code (service unavailable), which tells search engines that the current website is temporarily closed for maintenance and not permanently offline.Search engines usually understand this situation and will recrawl your website after a period of time.To minimize the impact, it is recommended to specify the expected recovery time in the shutdown notification and try to shorten the duration of the shutdown.

Q2: Can the custom closed station page be set to automatically redirect, so that it returns to the homepage after the website is restored?A2: There is no built-in 'auto-redirect after recovery' option in the background settings of Anqi CMS. But if you modifyerrors/close.htmlThe template file comes from a custom shutdown page, and you can write logic in this file using JavaScript to achieve similar functions.For example, you can set a script to refresh the page or check the website status at regular intervals. Once the website is restored, it will automatically jump back to the homepage.But this requires a certain knowledge of front-end development to implement.

Q3: I have set up an offline notice in the background, but the front-end still displays blank or outdated content after refreshing. How should I investigate?A3: This is usually caused by a caching issue. You can try the following steps:

  1. Clear the cache of the Anq CMS system:Log in to the backend, find and click the 'Clear Cache' feature, and clear all the cache.
  2. Clear browser cache:Force a refresh of the page in your browser (Ctrl+F5 or Cmd+Shift+R), or clear the browser cache and cookies.
  3. Check CDN or server cache:If your website uses CDN (Content Delivery Network) or Varnish and other server-side caching, you also need to log in to the corresponding management interface and manually clear the cache.
  4. Confirm the template file path is correct:If it is a customerrors/close.html, make sure the file exists in the theme directory of the currently enabled template, and the file name is spelled correctly.