In today's digital world, a clear, friendly, and easily searchable URL structure is crucial for the visibility of a website.As one of the core functions of a content management system, the ability to customize URL static rules can make your website perform better in search engines.AnQiCMS as a content management system focusing on SEO optimization provides very flexible pseudo-static configuration options, allowing you to easily achieve this goal.
Understanding the importance of URL rewriting
First, let's briefly understand what a pseudo-static URL is and why it is so crucial for search engine optimization.
Dynamic URLs usually contain question marks, equals signs, and various parameters, such asyourdomain.com/article.php?id=123&category=news. Such URLs can correctly point to content, but they are not very "friendly" to search engine spiders, and sometimes may even be mistakenly considered as duplicate content or difficult to parse.
And the pseudo-static URL, through rewriting technology, disguises dynamic links as static links, for exampleyourdomain.com/article/123.htmloryourdomain.com/news/my-first-article.htmlThis form of URL is more readable to users and is also easier for search engines to understand and trust, which helps to improve the inclusion rate and keyword ranking of web pages.AnQiCMS is committed to the design philosophy of SEO-friendliness, built-in powerful static management functions, to help you build a high-quality URL structure.
Configure the pseudo-static rules in AnQiCMS
To start customizing the pseudo-static rules, you need to log in to the AnQiCMS admin interface.In the left function menu, find the "Function Management" section and then click the "Static Rule" option.This is the core area where you define and manage the website URL structure.
AnQiCMS has preset four commonly used static rules for the convenience of users, ready to use out of the box. If you are new to static rules or追求简洁高效, you can directly choose one of them:
- Numeric patternThis pattern usually uses the content ID as the core identifier of the URL, for example
/article-123.htmlIt is concise and clear, suitable for Chinese sites that pay attention to ID recognition. - Model naming pattern: The URL will include the alias of the content model it belongs to, for example
/product/my-awesome-product.html. This is beneficial for websites with multiple content models (such as articles, products), especially English websites, as it better reflects the type of content. - Category naming pattern 1 & category naming pattern 2These patterns will build URLs based on the classification structure of the content, for example
/news/technology/article-title.htmlThey are common on both Chinese and English sites and help users and search engines understand the hierarchical relationship of content.
It is very simple to select these built-in rules, just click the corresponding option to enable, which greatly reduces the trouble of manual configuration.
Deeply customize your URL rewrite rules.
The strength of AnQiCMS lies in its "custom mode", which allows you to finely define the URL format of each type of page according to your own SEO strategy and website structure. The custom mode supports setting up static rules for six different page types, namely:
- Document details page (
archive): Refers to the detailed page of specific articles, products, and other content. - Document list page (
category): Refers to the list page of articles, products, and other categories. - Model homepage (
archiveIndex): Refers to the homepage of a content model (such as an article model, product model). - Single page (
page)Refers to independent pages such as "About Us", "Contact Us", etc. - Tag list page (
tagIndex)Refers to the list page of all tags. - Tag detail page (
tag)Refers to the content list page under a specific tag.
In custom rules, each rule is formed by规则名===规则值in the form. For example,archive===/{module}-{id}.html.
To build these rules, AnQiCMS provides a series of flexible variables for you to call:
{id}The unique ID of the content (document, category, tag, etc).{filename}: Custom link alias for the content. This is the key to high SEO optimization, which is usually automatically generated by the system based on the title of the content, but you can manually edit it to ensure that it contains core keywords and is unique.{catname}The custom link alias of the category, which is also automatically generated by the system and supports manual editing.{catid}Unique ID of the category.{module}The table name of the content model, usually as part of the URL path, for examplearticleorproduct.{page}The page number for pagination. It needs to be enclosed in parentheses in the rules, for example(-{page}), indicating that it is an optional pagination parameter.
Example: How to build custom rules
Suppose you want to set the following pseudo-static rules for the article detail page, category list page, and single page:
- Article detail page:
/articles/我的文章标题.html - Category list page:
/category/我的分类名/第2页.html - Single page:
/about-us.html
Then, you can configure it like this:
archive===/articles/{filename}.html- Here
{filename}The corresponding "custom URL" field you filled in when publishing the article (or the system-generated pinyin alias).
- Here
category===/category/{catname}/(-{page}){catname}The custom URL for the corresponding category.(-{page})Indicates that if pagination exists, it will be displayed/category/我的分类名/2Otherwise, only one page is displayed/category/我的分类名.
page===/{filename}.html{filename}Corresponds to the custom URL for a single page.
Set a custom URL at the content level.
It is not enough to set the global pseudo-static rules in the background; you also need to make full use of the 'Custom URL' field when publishing or editing specific content.
Whether it is publishing articles, creating categories, or adding tags, AnQiCMS will provide the 'custom URL' field on the corresponding edit page.The system will automatically generate a pinyin alias based on the title or name you enter as the default value.In order to maximize SEO effectiveness, we strongly recommend that you manually optimize this field:
- Associated keywordsIntegrate the most relevant core keywords into the URL of the page.
- Simple and easy to understandThe URL should be as short as possible and clearly express the content of the page.
- Use hyphensUse hyphens between words.
-Connect, not underline_Or space. - Ensure uniqueness: The custom URL must be unique within the entire site, otherwise the system will automatically add a numeric suffix to ensure uniqueness.
In addition, for specific links that need to be permanently fixed and not changed with the pseudostatic rules, you can also take advantage of the "fixed link" feature. Simply fill in the relative link (with/Start, you can achieve it.
Important reminder:
Custom static rules belong to advanced settings, please operate with caution.The wrong configuration may cause some pages of the website to be inaccessible.After each rule change, it is recommended that you perform a comprehensive test of the website to ensure that all links can be accessed normally.If your website has gone live and been indexed by search engines, be sure to use AnQiCMS' '301 Redirect Management' feature after making significant changes to your URL structure to avoid traffic loss and SEO penalties.
By using AnQiCMS's flexible pseudo-static rules customization feature, you can build a website with both aesthetic and SEO-friendly URLs, thereby achieving better rankings and more traffic in search engines.
Frequently Asked Questions (FAQ)
1. Can the old links of the website still be accessed after modifying the pseudo-static rules? Will the search engine devalue them?Answer: Directly modifying the pseudo-static rules usually leads to the failure of old links, and users as well as search engines cannot access them.In order to avoid this situation, AnQiCMS provides the "301 Redirect Management" feature.You should redirect all the old URLs that have been collected to the new URL after modifying the rules.This will make the search engine understand that it is a permanent move, passing the weight of the old link to the new link, thereby minimizing the impact on SEO and avoiding demotion.
2. What is the difference between a custom URL and a fixed link? When should they be used?Answer:
- Custom URL: Mainly used to work with rules in pseudo-static URLs.
{filename}or{catname}A variable. It generates a variable URL path based on the rule pattern you set. You can manually optimize this alias part during content editing. This is the most commonly used SEO optimization method. - **fixed