As an experienced CMS website operation personnel in the information security field, I am well aware of the importance of every user touchpoint, including those unusual pages, in conveying brand image and user experience.A carefully customized 404, 500 error pages, and site shutdown prompt pages, which not only enhance the professionalism of the website but also provide guidance to users when they encounter problems, effectively reduce the bounce rate, and maintain a good search engine impression.
Next, we will discuss in detail how to customize these special pages in the Anqi CMS.
Auto CMS Template Overview
The Anqi CMS adopts a flexible template engine, supporting Django template syntax, making template creation both intuitive and efficient. All website template files are stored in the root directory under the/templateIn the folder, each independent template package has its own directory. For example, if you are using a template package nameddefault, then the file path is usually/template/default/. For templates that need to differentiate between PC and mobile versions, the mobile templates are stored in the corresponding/mobile/subdirectory, maintaining a directory structure similar to that of the PC templates. Template files are standardized to use.htmlas a suffix, and it is recommended to use UTF-8 encoding to ensure the correct display of content.
Custom 404 error page: Savior of user experience
When the user accesses a page that does not exist on the website, a 404 error is triggered.An unguided 404 page can make users feel confused and even lead them to leave the website directly.By customizing the 404 error page, we can provide assistance when users are lost, guiding them back to the effective content of the website.
In the AnQi CMS, the default template file path for the 404 error page is:errors/404.html. You need to create this file in the directory of the current template package, for example/template/default/errors/404.htmlIf your website has enabled a mobile template and you want to provide different 404 pages for mobile users, you can create them in the/template/default/mobile/errors/404.htmldirectory.
自定义404页面时,建议包含以下元素:一句友好的提示语,如“抱歉,您访问的页面不存在”;一个搜索框,方便用户直接搜索所需内容;指向网站首页、热门文章或分类的链接,以及网站地图链接;如果您有需要,也可以留下联系方式。The design should maintain consistency with the overall style of the website, but avoid loading too many complex scripts or large images to ensure fast page loading and prevent the occurrence of new errors.An effective 404 page can convert potential lost users into an opportunity to explore the website again.
Custom 500 error page: Graceful presentation of internal issues
500 error usually indicates that an unknown error has occurred on the server.This error is not common, but when it occurs, users will usually see a technically-oriented and unfriendly page.Customizing the 500 error page is crucial for maintaining a professional image of the website, even when the system encounters internal failures, it can convey appropriate information to users.
The default template file path for the 500 error page in AnQi CMS is:errors/500.html. You need to create this file in the directory of the current template package, for example/template/default/errors/500.htmlSimilarly, the mobile template can be/template/default/mobile/errors/500.htmldirectory.
When designing a 500 error page, the most important principle is simplicity and clear information.The page should include an apology for the inconvenience caused to the users, and inform them that the technical team is actively working on this issue.Due to the possibility of a 500 error involving deep system issues, the page content should be as simple as possible, not dependent on complex database queries or external resources, to avoid exacerbating the problem during a failure.Avoid exposing any error details on the page that may leak sensitive information about the server or application.Provide a customer service contact method or a link to the announcement page of the website, which can enhance users' trust and patience.
Custom site closure prompt page: Clear communication during maintenance
When a website needs to be temporarily closed for maintenance, upgrade, or other reasons, it is essential to provide users with a clear shutdown notification page.This not only avoids the confusion of users about the website status, but also shows the professionalism of the operator.The CMS provides a convenient shutdown feature and allows you to customize the prompt content.
The default template file path for the site closure prompt page is:errors/close.html。You also need to create it in the directory of the template package you are currently using, for example/template/default/errors/close.html。The path to the mobile template is/template/default/mobile/errors/close.html.
To enable the site shutdown prompt page, you need to set the "Website Status" to "Offline" in the "Global Settings" of the Anqi CMS backend, and fill in the specific information you want to display to users in the "Offline Prompt" field.errors/close.htmlTemplate file, you can use{% system with name="SiteCloseTips" %}Tag to dynamically display the offline notice content set in the background.The page content can include the reason for closure, the expected time for recovery, brand information, and other actions that users can take during the closure period (such as following social media for the latest updates).An informative and brand-consistent close prompt page that can effectively manage user expectations and reduce user dissatisfaction.
**Practical Tips and Considerations
No matter which custom special page you create, you need to follow some general principles.Ensure these pages' code is as lightweight as possible, loads quickly, and does not contain any code that may cause errors by itself.The page design should be consistent with your brand image to enhance users' sense of belonging.For the 404 page, it is still a page that search engines can crawl, so it should ensure its basic accessibility and avoid duplicate content.After customizing, it is essential to thoroughly test these pages by accessing non-existent links, simulating server errors (if possible), and setting the site to offline status in the background, etc., to ensure they work normally in various scenarios and convey correct information to users.
Frequently Asked Questions
Q1: If I have not created a custom template file for these special pages, how will Aqara CMS handle it?
A1:If you have not specified the path (such aserrors/404.html/errors/500.html/errors/close.html)Create a custom template file under, and the CMS will usually display its built-in default error page or the general error information generated by the system.These default pages may be quite simple and do not include your brand elements or detailed guidance information, therefore it is strongly recommended to customize them to enhance the user experience.
Q2: Can I set different 404, 500, and site shutdown pages for each site under the multi-site management of Anqi CMS?
A2:Yes, absolutely.The multi-site feature of AnQi CMS allows each site to use an independent template package./template/site_a/errors/404.htmland/template/site_b/errors/404.html),即可为每个站点定制其独特的错误和关闭提示页面设计和内容。
Q3: How can I ensure that my site closure prompt page can dynamically display the closure information I set up in the background?
A3:In the one you customizederrors/close.htmlTemplate files can use the system tags provided by the Anqi CMS{% system with name="SiteCloseTips" %}.This label will directly read the content you input in the "Global Settings" "Offline Notice" field in the background and display it on the page.Here, you can conveniently update the offline information through the backend without modifying the template file.