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;">© {% 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.
- Log in to the AnQi CMS background.Access the admin panel using your admin account.
- Go to the 'Admin Settings'.Find the 'Admin Settings' item in the left menu.
- Enter the 'Global Function Settings'.Select "Global Function Settings" from the submenu of "Background Settings".
- Toggle "Website Status".Find the "Website Status" option and switch it from "Normal Operation" to "Closed".
- 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 customized
errors/close.htmlTemplate, the content here will be called by the template. - (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 under
errors/close.htmlfiles to edit. - 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.