Core Feature Revelation: Implementation of Custom Error Pages

The AnQi CMS fully supports customizing the style and content of 404 (Page Not Found) and 500 (Internal Server Error) pages.These error pages exist in the template file form in the template package you are currently using.Under the template root directory:errors/FolderFind the corresponding file inside:404.htmlUsed for customizing 404 errors,500.htmlThen used to customize 500 error.

If you adopt a flattened file organization pattern in template design, then the corresponding error page file will be namederrors_404.htmlanderrors_500.htmlMoreover, AnQiCMS also supports customizationerrors/close.htmlorerrors_close.html, used for the prompt page when the site is closed, further expanding the management scope of error pages.

Content and style: infinite possibilities

Since these error pages are standard HTML template files themselves, this means you have a high degree of freedom to design their display styles and content.You can use the powerful template tags and filters of AnQiCMS just like you would design other normal pages.

For example, you can utilize{% system %}tags to obtain general information about a website, such as the website name, Logo, or contact information, ensuring that error pages also reflect the brand identity. By{% navList %}Tags can be displayed on the error page to show the main navigation menu, making it convenient for users to quickly jump to other valid pages. Furthermore, you can also embed{% archiveList %}Tags, recommend some popular articles, the latest products, or related content, transforming the user's moment of 'loss' into an opportunity to discover new information.

When designing, it is common to abstract the common page header (header) and footer sections into independent code snippets. When customizing error pages, through{% include "partial/header.html" %}and{% include "partial/footer.html" %}Such labels allow you to easily integrate these common elements into 404 and 500 pages, ensuring they maintain consistency with the overall design style of the website and uphold a unified brand image, avoiding a jarring experience for users when errors occur.

Enhance user experience and SEO value

A well-designed custom error page, its value goes beyond just aesthetics.A friendly 404 page can explain to users why they are seeing this page and provide clear guidance (such as returning to the homepage, providing a search box, recommending popular content, displaying contact information, etc.), rather than simply displaying a cold error code, making users feel frustrated and leave directly.

For the 500 error page, although users cannot directly solve the internal server issue, by customizing the page, you can inform them that the problem is being addressed and provide customer service phone number or email address, which is crucial for maintaining user trust and reducing negative emotions.

From the perspective of SEO, even error pages can effectively reduce the impact of dead links on website authority through reasonable internal link layout and hints.For example, adding links to the homepage, category pages, or popular content on the 404 page can help search engines better understand and crawl your website structure, avoiding negative impact on overall ranking performance due to a few dead links.