In website operation, the URL (Uniform Resource Locator) is not only the entrance for users to access content, but also an important basis for search engines to understand and crawl website content.An URL with clear structure and friendly semantics, which can significantly improve user experience and the performance of the website in search engines.And one of the key factors to achieve this goal is to skillfully utilize the pseudo-static technique.

AnQiCMS as an efficient and customizable content management system, fully considers the needs of SEO optimization and provides powerful and flexible pseudo-static rule configuration functions.Today, let's delve into how to use the pseudo-static rules of AnQiCMS to optimize the display structure of article URLs, thereby effectively improving the SEO performance of the website.

What are the things about website structure and SEO?

When we browse the web in our daily life, we may encounter two types of URLs. One is dynamic URLs, which usually contain question marks, equal signs, and a series of seemingly random numbers or letters, such asyourdomain.com/article.php?id=123&category=techThis kind of URL can be accessed normally, but it is not very friendly to search engines and users.

Another one is a pseudo-static URL, which looks like a static HTML file, simple and meaningful, for exampleyourdomain.com/tech/anqicms-seo-tips.htmlThis kind of URL is not only easier to remember and share, but also allows search engines to clearly understand the theme and hierarchical relationship of the page content, thereby improving the crawling efficiency and ranking potential.

AnQiCMS's pseudo-static feature is to help us convert complex dynamic parameters into this concise and friendly pseudo-static URL.

AnQiCMS pseudo-static feature overview

AnQiCMS built-in pseudo-static feature is located in the "Function ManagementThis provides a variety of preset rules and highly customizable options, allowing us to flexibly adjust the URL structure according to the specific needs of the website.

The system provides four default rewrite rules to meet the initial needs of most websites, saving the trouble of manually writing complex rules: English

  1. Digital Mode:This is the most common pattern, document details, lists, single pages, and tabs all use{id}As the basis for generating URLs. For example, articles may be/article/123.htmlThis pattern is concise and clear, suitable for Chinese websites with a large amount of content and the need to quickly index through IDs.

  2. Model Naming Pattern:It is usually used for English websites. It will include the content model (such asarticleorproduct)of the alias, followed by the custom link name or ID of the content. For example,/article-anqicms-seo-tips.html. This helps users and search engines understand the type of the content.

  3. Category naming pattern 1:Similarly often used on Chinese websites. It incorporates the custom link name or ID of the category into the URL, followed by the custom link name or ID of the content. For example,/tech/anqicms-seo-tips.htmlThis mode can well display the hierarchical structure of the website.

  4. Category naming pattern 2:Similar to the model naming pattern, but more focused on the category hierarchy, often used in English websites. For example,/technology/anqicms-seo-tips.html.

Selecting an appropriate preset mode can quickly get you started, but when pursuing the ultimate SEO effect, we often need more precise control.

Customize the pseudo-static rules to create a unique URL structure

AnQiCMS's “Custom Mode” gives us the greatest flexibility, allowing us to design unique URL structures according to content types (documents, categories, single pages, tags, etc.).This is like customizing a set of door numbers for each content module of the website.

The configuration of custom rules uses规则名===规则值format. The system has predefined six main rule names corresponding to different page types of the website:

  • archive: Document detail page (articles, products, etc.)
  • category:Document Classification List Page
  • archiveIndex:Home Page of Content Model (e.g., list page of all articles)
  • page:Single Page Detail Page
  • tagIndex:List Page of All Tags
  • tag:Document List Page Under a Specific Tag

In these rule names corresponding to规则值, we can cleverly combine multiple variables to construct meaningful URLs. AnQiCMS provides the following core variables:

  • {id}:内容的唯一ID,如文章ID、分类ID。
  • {filename}Custom link name of the content.When editing documents, categories, single pages, and tags, you can enter this value in the 'Custom URL' field. The system will default to generating pinyin based on the title, but you can manually modify it to better suit SEO and brand image in English or pinyin.
  • {catname}:分类的自定义链接名。同样在编辑分类时设置。
  • {catid}The unique ID of the category.
  • {module}:Content model's URL alias. Set in content model management, usually the English name of the model, likearticle/product.
  • {page}:Page number. This variable usually needs to be enclosed in parentheses, like(/{page}),so that it is displayed in the URL./page/2or/2such as this form, and it only appears when actual pagination is in effect.

Let's take a few examples of custom rules to see how these variables can be combined:

  • Concise and clear document URL (recommended for English site): archive===/{module}/{filename}.htmlThis will generate such as/article/anqicms-seo-tips.htmlURL, directly displaying the model type and article theme, very clear.

  • Document URL with classification hierarchy: archive===/{catname}/{filename}.htmlIf the hierarchy of your website is important, this rule can make the URL more structured, for example/tech/anqicms-seo-tips.html.

  • Optimize pagination list URL: category===/{catname}(-{page})This will generate such for category list pages/tech/(first page) and/tech-2/(Second page)of the URL, beautiful and easy for search engines to understand pagination relationships.

  • Create a concise and powerful URL for a single page: page===/{filename}.htmlFor a page like 'About Us', the URL can be/about.html,Concise and forceful.

In the settings{filename}and{catname}Remember to edit the document, category, single page, and tag interface in the background, and find the 'Custom URL' field to fill in.A well-crafted custom URL should include core keywords, be short and easy to read, which is very beneficial for search engine keyword recognition and user memorization.

Apply and manage the rules of pseudo-statics in practice

Configuring rewrite rules is a process that requires careful planning.Once the rules are confirmed, you can select the 'Custom Mode' on the 'Function Management' -> 'Static Rule' page of the AnQiCMS backend and fill in your rules one by one.

The key steps are:

  1. Formulate the rules:Thoroughly plan the most ideal URL structure for each page type, ensuring they have good readability, contain keywords, and reflect the hierarchy of the website.
  2. Entry system:In the background custom mode, fill in the rules you have designed.
  3. Save and observe:After saving the rules, visit the website's front end and check if the URL is generated as expected.
  4. 配合301重定向:如果你的网站已经上线,并且正在更改现有的URL结构,那么Be sure toCooperate with the "301 Redirect Management" feature of AnQiCMS.Redirect the old URL accurately to the new URL, which can effectively avoid 404 errors and losses of traffic and SEO weight caused by URL changes.AnQiCMS provides a convenient 301 redirect setting, which is an important tool to ensure a smooth transition of the website.

提升SEO的关键思考点

Optimizing URL structure is not just a technical configuration, it is also a content operation strategy. When using the pseudo-static rules of AnQiCMS, it is recommended that you:

  • Integrate keywords:Embed core keywords closely related to the content theme into the URL, which helps enhance the search engine's understanding of the page topic.
  • Maintain conciseness:The shorter the URL, the better. Avoid redundant information. A long URL is not only unattractive but may also reduce the willingness of users to click.
  • Ensure readability:Even if it includes keywords, make the URL look natural and easy to understand, as if it can describe the content in one sentence.
  • Reflect the hierarchical structure:The URL path should as far as possible reflect the actual content hierarchy of the website, helping search engines build the website map.
  • Maintain consistency:Once the URL structure is determined, try to maintain consistency across the entire site and avoid frequent changes. If a change is indeed necessary, please be sure to set up 301 redirects.

Through AnQiCMS's flexible pseudo-static rules, we can make the optimization work of seemingly complex URLs easily accessible.Reasonable planning and meticulous configuration will help our website stand out in search engines and attract more targeted users.


Common Questions (FAQ)

1. What happens to the old URL after modifying the pseudo-static rules? What do I need to do?

Yes, after modifying the pseudo-static rules, the website's URLs will be generated according to the new rules. The old URLs will no longer be directly accessible, and accessing the old URLs may result in a 404 error.To avoid the loss of traffic and SEO weight, you need to immediately use the '301 Redirect Management' feature in the AnQiCMS backend.Redirect all important old URLs one-to-one or in bulk to their corresponding new URLs, inform search engines that the pages have been permanently migrated, thus maintaining SEO rankings and user experience.

2. How can I set a custom URL alias (i.e.{filename}and{catname})?

In AnQiCMS backend, when you edit articles, categories, single pages, or tags, there will be a field named 'Custom URL' in the corresponding editing interface.The system usually generates a pinyin alias automatically based on the title you enter, but you can manually modify this field, inputting a personalized, meaningful English or pinyin alias that you want to display in the URL.Make sure that this alias is unique across the entire site, and is concise and includes keywords for SEO benefits.

3. What are the differences and usage scenarios of pseudo-static rules?{filename}/{catname}and{module}What are the differences and usage scenarios of variables?

  • {filename}指的是单个内容项(如文章、单页面、标签)的自定义链接名,由您在对应内容的“自定义URL”字段中设置。It focuses on describing the theme of a single page.
  • {catname}指的是分类的自定义链接名,由您在分类编辑页的“自定义URL”字段中设置。它用于表示内容所属的分类层级。
  • {module}It refers to the URL alias of the content model (such as "article

In terms of usage,{filename}Commonly used in document details and single pages, directly reflecting the content theme;{catname}Commonly used in category lists and document details to show the category level to which the content belongs; whereas{module}Then it is more commonly used on the model homepage or as a general prefix for URLs, to distinguish between different types of content.Based on the structure and SEO strategy of your website, you can flexibly combine these variables to build the most suitable URL.