What pseudo-static rules are provided by the AnQiCMS backend? How to customize the URL structure to optimize SEO?
As a veteran who has been deeply involved in website operations for many years, I know how important a good URL structure is for the success of a website.It not only allows search engines to better understand and crawl your content, but also enables visitors to clearly understand the page theme at a glance, enhancing user experience.AnQiCMS as a Go language-driven enterprise CMS excels in this aspect, providing a variety of out-of-the-box pseudo-static modes and giving 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 rules mode provided by the AnQiCMS backend, as well as how to cleverly customize the URL structure to inject strong momentum into your website's SEO.
AnQiCMS built-in static rule mode: convenience and efficiency coexist
For users who are new to website construction or those who seek convenience, AnQiCMS backend has thoughtfully preset several types of pseudo-static rule modes, which require no complex configuration. Simply check the options under "Function Management" -> "Pseudo-static Rule Management" and they will take effect. These built-in modes are designed to meet the general needs of different websites:
Numeric patternThis type of URL usually revolves around the unique ID number of the content, for example
/archive/123.htmlIt is concise and clear, easy to manage by the system, suitable for websites with a large amount of content and strong dependency on IDs, or mainly aimed at Chinese users, where English readability of URLs is not a high requirement.The advantage lies in the fixed URL structure, which is not easy to change.Model naming patternIf your website content involves articles (
article), products (productA model with different content types, this pattern allows the URL to clearly reflect the ownership model, for example/article/post-name.htmlThis is a good choice for English websites or websites that need to differentiate content types, as it helps users and search engines better understand the category of the page content.Classification naming pattern 1This pattern usually incorporates the category name of the article into the URL, for example
/category/news/post-title.html. For Chinese websites that need to emphasize the classification level of content, this pattern makes the URL more semantic, allowing users to roughly judge the category of the content through the URL.Classification naming pattern 2Such as
/category/articles/post-title.htmlIt also emphasizes the classification level, but is more suitable for websites with internationalization or English content as the main language.
The advantages of these built-in patterns lie in their "out-of-the-box" nature, greatly reducing the technical threshold, allowing even non-technical operators to quickly have SEO-friendly URLs.
Explore deeply: 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 optimize for specific page types, the custom static function of AnQiCMS really comes into its own.
In the AnQiCMS background "Function Management", you will find the item "Static Rule Management", select "Custom Mode", which is where we can show our skills. Custom mode can be applied toSix 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 categories list page.
- archiveIndex (model homepage): Such as article model homepage, product model homepage.
- page (single page): About us, contact information, and other independent pages.
- tagIndex (tag homepage): List page of all tags.
- tag (detail page of tag): List page of content under a specific tag.
Each page follows the rules of规则名===规则值format. For example:archive===/{module}/{id}.html.
The core lies in the flexible use of AnQiCMS providedVariableto build URLs. Here are some commonly used variables and their SEO value:
{id}(Data ID)This is the unique identifier of the content. Using 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, single page name, etc.) as the default value, but you can manually modify it.In SEO practice, we should integrate the core keywords of the page into{filename}Make it descriptive, an English or pinyin phrase, connected by a hyphen (-) connected. For example, an article about 'AnQi CMS tutorial', its{filename}can beanqicms-tutorial.Key tips:filenameEnsure the uniqueness of the entire site. If a duplicate occurs when manually set, the system will automatically add a random number after it to ensure uniqueness.{catname}(Custom link name for category): Similar to{filename}But it acts on 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): 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 URL, making it convenient 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 very important for SEO because it allows search engines to crawl all page content rather than just the first page.
By flexible