As a website operator who is well-versed in the operation of AnQiCMS, I know that every page, including error pages, plays an indispensable role in user experience and search engine optimization.A well-optimized 404 page can not only effectively retain potential lost users but also convey positive signals to search engines, maintaining the overall health of the website.Next, I will elaborate on how to set TDK (Title, Description, Keywords) for error pages (especially 404 pages) in AnQiCMS.


AnQiCMS page not found TDK setting strategy

In the AnQiCMS system, the 404 error page is not a regular content publishing page, and therefore its TDK settings are different from those of ordinary articles or product detail pages. AnQiCMS provides special error page template files (such aserrors/404.htmlOr in flat modeerrors_404.htmlThis is the entry point for our TDK configuration.

Firstly, we need to clarify the core goal of the 404 page: inform the user that the page does not exist, guide them back to valid content, and minimize negative experiences. Based on this, the TDK settings of the 404 page should follow the following principles:

The setting of the (Title)

The Title tag of the 404 page is crucial, as it will display in the browser tab and search engine results (although the 404 page should not be indexed).A good 404 page title should clearly convey the error message, while including the brand name of the website to enhance recognition and guide users.

in AnQiCMS'serrors/404.htmlIn the template, we can directly in<head>The title is defined within the tag. Since the 404 page does not have specific article or category content to provide a dynamic title, we usually use static text combined with the website name. For example:

<title>很抱歉,您访问的页面不存在 - {% system with name="SiteName" %}</title>

Here, we use a user-friendly prompt such as "Sorry, the page you are visiting does not exist" and by{% system with name="SiteName" %}The tag dynamically retrieves the global name of the website. This way, no matter how the website name changes, the Title of the 404 page will remain consistent and professional.

Description (Description) settings

Description meta tag provides a brief summary of the page content to search engines and users.For the 404 page, the description should focus on explaining the error, providing solutions, and guiding the next steps to retain users.Avoid using language that is too technical or confusing.

in AnQiCMS'serrors/404.htmlDescription can be set like this in the template:

<meta name="description" content="您正在寻找的页面可能已被移动、删除或输入了错误的网址。请返回网站首页,或尝试使用站内搜索功能找到您需要的内容。">

This description clearly points out the possible reasons why the page cannot be found, and provides the two most direct solutions of 'return to the homepage' and 'use the internal search'.You can also consider adding contact information to enhance the user experience.

Keyword (Keywords) settings

For the 404 page, the importance of the Keywords meta tag has greatly decreased.Modern search engines rarely, if ever, rely on the Keywords tag when determining page relevance.Therefore, for the 404 page, we usually recommend:

  • Leave blank:This is the most common practice, as there are not many valuable keywords to fill in.
  • Use very general words: If you insist on filling it, you can include some common terms related to errors and the website name. For example:
<meta name="keywords" content="404, 页面未找到, 错误, 网站错误, {% system with name="SiteName" %}">

But remember, this is more about habit than actual SEO benefits.Focus your energy on optimizing the Title and Description, as well as the 404 page content, which will bring greater returns.

Example 404 template TDK structure

Considering the above suggestions, the basic TDK structure of an AnQiCMS 404 error page header may look like this (located aterrors/404.htmlorerrors_404.htmlof<head>Area):

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>很抱歉,您访问的页面不存在 - {% system with name="SiteName" %}</title>
    <meta name="description" content="您正在寻找的页面可能已被移动、删除或输入了错误的网址。请返回网站首页,或尝试使用站内搜索功能找到您需要的内容。">
    <meta name="keywords" content="404, 页面未找到, 错误, 网站错误, {% system with name="SiteName" %}">
    <!-- 其他CSS样式、JS脚本等 -->
</head>
<body>
    <!-- 404页面内容,例如提示信息、搜索框、返回首页链接等 -->
</body>
</html>

In addition to TDK, an excellent 404 page should also include clear error messages, a link back to the homepage (using{% system with name="BaseUrl" %}), there may also be a search box, even some recommended popular articles or products to maximize user retention, which can be done through AnQiCMS'sarchiveListImplement content tags. Even error pages can bring positive value to the website.


Frequently Asked Questions (FAQ)

Can I directly set the TDK for the 404 page in the AnQiCMS backend?Cannot. The 404 page is a system error page, not a content entity that can be directly edited by the background (such as articles, categories, or single pages).Therefore, you cannot find the TDK setting option specifically for the 404 page in the AnQiCMS backend management interface.The TDK of the 404 page needs to be edited directly through the corresponding template file (such aserrors/404.html)to achieve this.

2. Does the TDK of a 404 page really affect SEO? Will it be indexed by search engines?An optimized 404 page TDK is mainly for improving user experience and providing clear page information.For search engines, the standard 404 response code (HTTP status code) explicitly tells the search engine that the page does not exist, and is usually not indexed.However, a poorly designed 404 page that does not provide clear TDK may confuse users and cause them to leave quickly, thereby increasing the website's bounce rate.Although the 404 page itself is not indexed, a good user experience indirectly benefits the overall SEO performance of the website.

3. What types of links should I include on a 404 page to help users?To effectively guide users, a 404 page should at least include the following types of links:

  • Home page link:This is the most basic and important navigation.
  • In-site search box:Allow users to directly enter keywords to find target content.
  • Links to popular content or recommended articles:Can attract users to explore other parts of the website.
  • Contact us page link:It is very important to provide users with channels to seek help, especially for corporate websites.
  • Sitemap link (optional):A Sitemap can help users who want to fully understand the website structure navigate.