As an experienced CMS website operation personnel for a security company, I am well aware of the importance of every user touchpoint, including those unusual pages, in carrying the brand image and user experience.Customized 404, 500 error pages, and site shutdown notification pages 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 Anqi CMS.
Overview of Anqi CMS template mechanism
Anqi CMS adopts a flexible template engine, supporting Django template syntax, making template creation 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 its file path is usually/template/default/. For templates that need to distinguish between PC and mobile ends, the mobile end templates are stored in the corresponding/mobile/subdirectory, maintaining a directory structure similar to that of the PC end. Template files are uniformly used.htmlas a suffix, and it is recommended to use UTF-8 encoding to ensure correct display.
Custom 404 error page: The Savior of User Experience
When the user visits a page that does not exist on the website, a 404 error is triggered.A generic, unguided 404 page can confuse users and even lead them to leave the website directly.By customizing the 404 error page, we can provide assistance to users when they are lost, guiding them back to the effective content of the website.
In 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.html. If your website has enabled the mobile template and you want to provide different 404 pages for mobile users, you can create them in/template/default/mobile/errors/404.htmlthe path.
When customizing a 404 page, it is recommended to include the following elements: A friendly message, such as 'Sorry, the page you are visiting does not exist';A search box for users to directly search for the content they need; links to the homepage, popular articles or categories, and the website map link;If you need, you can also leave your contact information. 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 any new errors.A valid 404 page can turn potential lost users into an opportunity to explore the website again.
Custom 500 error page: Graceful presentation of internal issues
The 500 error usually indicates that an unknown error occurred on the server.This error is not common, but when it occurs, the user will usually see a technically unfriendly page.Custom 500 error pages are crucial for maintaining a professional website image, even when the system encounters internal failures, as they 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 found in/template/default/mobile/errors/500.htmlthe path.
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 the issue.Due to 500 errors, system deep-level issues may be involved, page content should be as simple as possible, not dependent on complex database queries or external resources to avoid exacerbating problems during outages.Avoid exposing any error details on the page that may leak sensitive information about the server or application.Provide a customer service contact or a link to the website announcement page, which can increase the user's trust and patience.
Custom site shutdown prompt page: clear communication during maintenance
When a website needs to be temporarily closed for maintenance, upgrades, or other reasons, it is essential to provide users with a clear shutdown prompt page.This not only avoids confusion about the website status of the user, but also shows the professionalism of the operator.The AnQi CMS provides a convenient shutdown feature and allows you to customize the prompt content.
The default template file path for the site shutdown prompt page is:errors/close.html. You also need to create it in the directory of the template package you are using, for example/template/default/errors/close.html. The template path for the mobile end is/template/default/mobile/errors/close.html.
To enable the site shutdown prompt page, you need to set the "Website Status" to "Shutdown" in the Anqicms backend "Global Settings" and fill in the specific information you want to display to the user in the "Shutdown Prompt" field. Inerrors/close.htmlIn the template file, you can use{% system with name="SiteCloseTips" %}Tags to dynamically display the shutdown prompt content set in the background. The page content can include the reason for the shutdown, the expected recovery time, brand information, and other actions users can take during the shutdown period (such as following social media to get the latest updates).A rich and brand-consistent close prompt page that can effectively manage user expectations and reduce user dissatisfaction.
**Practice and Precautions
No matter which special page you customize, you need to follow some general principles.Ensure that the code on these pages is as lightweight as possible, loads quickly, and does not contain any code that may cause errors on its own.The page design should be consistent with your brand image, enhancing the sense of belonging of users.For the 404 page, it is still a page that search engines can crawl, so it should ensure basic accessibility and avoid duplicate content.After customization is complete, be sure to thoroughly test these pages by actually accessing non-existent links, simulating server errors (if possible), and setting the site offline status in the background, among other methods, to ensure they work properly in all scenarios and convey the correct information to users.
Frequently Asked Questions
Q1: If I have not created a custom template file for these special pages, how will Anqicms handle it?
A1:If you have not specified the path (such aserrors/404.html/errors/500.html/errors/close.htmlUnder it, create a custom template file, the Aqii 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, not including your brand elements or detailed guidance information, and therefore it is strongly recommended to customize them to improve user experience.
Q2: Under the Anqi CMS multi-site management, can I set different 404, 500, and site shutdown prompt pages for each site?
A2:Yes, definitely. The multi-site feature of Anqi CMS allows each site to use an independent template package.This means you only need to create the files for these special pages in the corresponding template package directory for each site (for example,/template/site_a/errors/404.htmland/template/site_b/errors/404.htmlYou can customize the unique error and close prompt page design and content for each site.
Q3: How to ensure that my site's shutdown prompt page can dynamically display the shutdown information I set up in the background?
A3:In the one you customizeerrors/close.htmlIn the template file, you can use the system tags provided by AnQi CMS{% system with name="SiteCloseTips" %}. This label will directly read the content you enter in the "Global Settings" "Offline Prompt" field and display it on the page.This way, you can conveniently update the shutdown information without modifying the template file.