The importance of website URL structure in website operation is self-evident.A clear, meaningful URL not only helps users better understand the content of the page but is also a key part of search engine optimization (SEO).Especially for content management systems, reasonably setting the pseudo-static URL structure can significantly improve the display effect and user experience of the website in search engines.
AnQiCMS as a content management system that focuses on SEO optimization, provides strong and flexible support in this aspect.It not only comes with various commonly used pseudo-static rules, but also allows users to highly customize according to their own needs, making your website URL both beautiful and beneficial for search engine crawling.
What is a pseudo-static URL and why is it important?
Firstly, let's briefly understand what pseudo-static URLs are. In the early days of websites, many pages were dynamically generated by scripts, and their URLs typically contained question marks, equal signs, and a long string of parameters (for example: yourdomain.com/news.php?id=123&category=techThis type of URL is called a dynamic URL.
Compared to pseudo-static URLs, which use server URL rewriting technology to convert dynamically generated page addresses to look like static page addresses (for example:)}]yourdomain.com/news/tech/your-article-title.html).
The importance of pseudo-static URLs lies mainly in the following reasons:
- Search engine friendlinessThe search engine's crawler prefers to crawl static or pseudo-static URLs.A clear, hierarchical URL structure helps the crawler understand the architecture and content relevance of the website, thereby improving the page inclusion efficiency and weight assessment.The inclusion of keywords in the URL can also directly indicate the content of the page to search engines, enhancing relevance ranking.
- Enhancing user experienceUsers find it easier to understand and remember concise, meaningful URLs.When the URL contains descriptive text, users can roughly understand the content of the page when viewing the link, which increases the willingness to click and also makes it convenient for users to share and spread.
- Avoiding duplicate content issuesThe dynamic URL may produce multiple URLs pointing to the same content due to issues such as parameter order and case sensitivity, which may be considered duplicate content by search engines, thereby affecting the overall SEO performance of the website.The pseudo-static URL helps to avoid such problems.
AnQiCMS was designed with these factors in mind from the beginning, committed to providing users with a SEO-friendly URL structure.
The setting entry for pseudo-static URLs in AnQiCMS
In the AnQiCMS backend, the entry design for the pseudo-static feature is very intuitive. You just need to log in to the backend management interface, find it in the left navigation bar.Function Management, and then click.Static rulesYou can enter the static rules settings page. This is the core area where you can centrally manage and configure the website URL structure.
AnQiCMS provides four built-in static rules
In order to facilitate different types of websites and operational needs, AnQiCMS is built-in with four commonly used pseudo-static rules. This means you do not need to perform complex configurations, just select a mode suitable for your website to quickly enable pseudo-static:
- Number PatternIn this mode, the URLs of pages such as document details, document list, single page, document tags, etc. will use the ID of their content as the main identifier. For example:
/article/123.htmlThis pattern is concise and clear, suitable for sites with a large amount of content and does not emphasize the semantics of the URL itself. - Model naming patternIf your website focuses more on content model categorization, such as product (product) or article (article), this pattern will include the model name in the URL. For example:
/article-123.htmlor/product-your-product-name.htmlThis is very useful for distinguishing different types of content, especially on English sites. - Category Naming Pattern 1: This pattern highlights the category name in the URL, for example:
/分类名称/文档标题.htmlIt emphasizes the hierarchical ownership of website content, suitable for Chinese websites, and can directly display the classification path of content. - Classification naming pattern 2Similar to category naming pattern 1, but may be more inclined towards the concise expression of English sites, for example
/category-name/document-title.html.
You can choose the built-in rules that best meet your needs based on the main audience of your website, the type of content, and your future development plan.
Customize the rewrite rule: Create a unique URL structure
If the built-in rules cannot fully meet your specific needs for URL structure, AnQiCMS's custom mode will provide you with high flexibility.This belongs to advanced settings, by combining different variables, you can build a unique URL format.
In custom mode, you can set independent rewrite rules for the following six different types of pages:
- Document Details Page (archive)
- Document List Page (category)
- Model Home Page (archiveIndex)
- Single Page (page)
- Tag List Page (tagIndex)
- Tag Details Page (tag)
Each custom rule is composed in the form of "Rule Name===Rule Value." For example,archive===/{module}-{id}.html.
In the rule value, AnQiCMS provides a variety of available variables, and you can combine them like building blocks:
{id}The unique ID of the content (such as document ID, category ID, single page ID).{filename}This is the custom link name of the content. It is usually the alias that you can manually input while editing documents, single pages, or tags in the background, or it can be automatically generated by the system based on the title.{catname}Custom link name for category, and{filename}Similar to that, used for categorization.{catid}: ID of the category.{module}: Model table name for the content (such asarticle/product).{page}Page number. Please note that the page number must be placed within parentheses, for example.(-{page}).
For example, if you want the URL of the article detail page to be.域名/文章模型别名/分类别名/文章自定义名称.htmlYou can configure it like this:archive===/{module}/{catname}/{filename}.html
As for, if you want the URL of the article list page to display as域名/分类别名/page-页码.htmlyou can set it like this:category===/{catname}/page-{page}.html
Through the flexible combination of these variables, you can achieve almost any URL structure you want.However, it is particularly important to note that the configuration of custom rules needs to be very rigorous.Any minor error can cause the page to become inaccessible, so thorough testing is essential after making changes.
Custom URLs for documents, categories, tags, and single pages
in the custom pseudo-static rules,{filename}and{catname}The sources of these variables are the "Custom URL" fields manually or automatically generated when you edit content on the AnQiCMS backend.
- Document Custom URLIn publishing documents, there is a "Custom URL" field.You can fill it in manually, or let the system generate the pinyin based on the document title.
{filename}Appears in your pseudo-static URL.