As an experienced veteran in website operations for many years, I know how important a good URL structure is for the success of a website.It not only enables search engines to better understand and crawl your content, but also makes it clear to visitors at a glance what the page theme is, enhancing user experience.AnQiCMS as an enterprise-level CMS driven by Go language performs particularly well in this aspect. It not only provides various out-of-the-box SEO-friendly static modes, but also gives us a high degree of freedom in customization, allowing us to create URL structures that are both SEO-friendly and user-friendly according to the actual needs of the website.
Today, let's delve into the pseudo-static rule patterns provided by the AnQiCMS backend, as well as how to cleverly customize URL structures to inject powerful momentum into your website's SEO.
AnQiCMS built-in pseudo-static rules mode: convenience and efficiency coexist
For users who are new to website construction or prefer convenience, AnQiCMS backend has preset several types of pseudo-static rules for you. There is no need for complex configuration. Just simply check the boxes under "Feature Management" -> "Pseudo-static Rule Management", and it will take effect. These built-in modes are designed to meet the general needs of different websites:
Number Pattern: This pattern of URL is usually centered around the unique ID number of the content, for example
/archive/123.html.It is concise and clear, easy to manage by the system, suitable for websites with a large amount of content and strong dependence on IDs, or those mainly targeting Chinese users with low requirements for the readability of URLs in English.Its advantage lies in the fixed URL structure, which is not easy to change.Model naming pattern: If your website content involves articles (
article)、products(product)et al. different content models, this pattern allows the URL to clearly reflect the associated model, for example/article/post-name.htmlThis is a good choice for English websites or websites that need to distinguish content types, as it helps users and search engines better understand the category of the page content.Category Naming Pattern 1: This mode usually incorporates the article category name into the URL, for example
/category/news/post-title.htmlFor Chinese websites that need to emphasize the classification level of content, this pattern makes the URL more semantically meaningful, allowing users to roughly judge the category of the content through the URL.Classification naming pattern 2: And pattern 1 is similar, but may be more inclined towards English words or phrases in naming conventions, such as
/category/articles/post-title.html。It also emphasizes classification levels, but is more suitable for websites with internationalization or English content as the main focus.
The advantages of these built-in patterns lie in their 'out-of-the-box' nature, greatly reducing the technical threshold and allowing even non-technical operators to quickly own SEO-friendly URLs.
Deep Dive: How to Customize URL Structure for SEO Optimization
However, the built-in mode is not always able to meet all the refined SEO needs.When we want URLs to more accurately reflect content keywords, fit the brand image better, or need to perform special optimization for specific page types, the custom rewriting function of AnQiCMS comes into full play.
In the "Feature ManagementSix different types of pagesDefine the URL structure:
- archive (document detail page): Detail pages for articles, products, etc.
- category (document list page):List of various articles, product category pages.
- archiveIndex (model homepage):如文章模型首页、产品模型首页。
- page (单页面):关于我们、联系方式等独立页面。
- tagIndex (标签首页):The list page of all tags.
- tag (Details page of the tag):The content list page under a specific tag.
The rules for each page are followed规则名===规则值format. For example:archive===/{module}/{id}.html.
The core of customization lies in the flexible use of AnQiCMS provided.variableTo build URLs. Here are several commonly used variables and their SEO value:
{id}(Data ID): This is the unique identifier for the content. Using the ID ensures the uniqueness of the URL, but it contributes little to the keywords for SEO. For example:/article/123.html.{filename}(Custom link name for data)This variable is of great value!AnQiCMS will automatically generate a pinyin alias based on your content (article title, product name, page name, etc.) as the default value, but you can manually modify it.{filename}中,使其成为描述性的英文或拼音短语,用连字符(English)连接。例如,一篇关于“安企CMS教程”的文章,其-)连接。例如,一篇关于“安企CMS教程”的文章,其{filename}It can beanqicms-tutorial.重点提示:filenameIt must ensure the uniqueness of the entire site. If a duplicate occurs during manual setting, the system will automatically add random numbers after it to ensure uniqueness.{catname}(Custom category link name): Similar to{filename}But it applies to the category page. Similarly, you can set the core keywords of the category{catname}to enhance the SEO friendliness of the category page.{catid}(Category ID): The unique ID of the category, similar to{id}.{module}(Model table name): Represents the model name to which the content belongs, for examplearticle/product. This helps to semantically represent URLs, making it easier for users and search engines to distinguish content types.{page}(Page number): Used for pagination on list pages, the format is usually(-{page}),indicating that page numbers are displayed when it is not the first page, for example/news-list-2.htmlThis is important for SEO, because it allows search engines to crawl all page content instead of just the first page.
By flexible