In website operation, a clear and friendly website address (URL) not only enhances user experience but is also an indispensable part of search engine optimization (SEO).The original dynamic URL, often containing complex parameters and symbols, is not very friendly to search engine spiders and user understanding.The pseudo-static feature is to convert these complex dynamic URLs into simple, readable URLs that are similar to static pages, thereby optimizing the website's performance on both the visual and technical levels.
AnQiCMS (AnQiCMS) understands the importance of URL structure for website SEO, and therefore has built-in powerful pseudo-static and 301 redirect management features.This feature is designed to help users optimize the URL structure of their website, making it more semantically meaningful and easier for search engines to understand and index, thereby significantly enhancing the overall SEO performance of the website.
Understand the pseudo-static feature of Anqi CMS
In the Anqi CMS backend, you can find the 'URL Rewrite Rule' option under the 'Function Management' menu.This is the core area for configuring the display method of the website URL.The AnQi CMS provides various flexible rules for pseudo-static settings, including ready-to-use preset modes and highly customizable options to meet the personalized needs of different websites.
1. Select the predefined pseudo-static mode
For users who are new to the system or want to go live quickly, Anqi CMS provides four default pre-generated static modes, which are carefully designed for direct use to reduce the complexity of configuration:
- Digital Mode:This is a concise pattern, usually using the ID number as the core identifier of the URL. For example, the article detail page might be
/archive/123.html. This pattern is easy for system internal management, but has slightly weaker semantics. - Model Naming Pattern:In this mode, the name of the model (such as "article
/article/123.htmlThis helps users and search engines understand the type of page content. - Classification naming patterns 1 and Classification naming pattern 2:These two patterns will construct URLs based on the category to which the content belongs, the difference may lie in whether the parent category path is included or different delimiters are used. For example,
/news/industry/latest.htmlor/category-news-id-123.htmlThis pattern clearly displays the hierarchical structure of the website.
Select these preset modes, and the system will automatically generate the corresponding URL based on the content type, without any additional complex configuration. Just click to select in the background, and it can be applied immediately.
2. Flexible Custom Mode
When the preset mode cannot fully meet your SEO or brand needs, the 'Custom Mode' of Anqi CMS can really shine.The custom mode allows you to define URL structures for the six core page types of the website (document details, document list, model homepage, single page, tag list, tag details).
In custom rules, you can use a series of built-in variables to construct a unique URL:
{id}:Unique ID of the content.{filename}:The custom filename (alias) of the content.{catname}:The custom name (alias) of the category.{catid}:The unique ID of the category.{module}:The name of the model to which the content belongs (e.g., “article”, “product”).{page}:Page number for pagination, usually used on list pages.
Example: How to build a custom URL
Assuming you want the URL of the article detail page to be/news-title.htmlwhere,newsis the model name,titleis the custom filename for the article, and you can configure it like this in custom mode:
archive===/{module}-{filename}.html
For example, you want the URL of the category list page to display as/category/category-name/page-2.html:
category===/category/{catname}(-{page})
Here are the(-{page})Indicates that the page number is optional, and it will not be displayed if it is the first page/page-1to maintain the simplicity of the URL.
Optimize the display of URLs in content
The effectiveness of pseudo-static rules cannot be achieved without your cooperation during content editing. Anqi CMS provides a 'Custom URL' field when publishing documents, managing categories, and setting tags.
- Document Details Page:When publishing articles or products, the editing interface will have a 'Custom URL' field.The system will automatically generate pinyin based on the title you input as the default value.To better optimize for SEO, you can manually modify this field to include core keywords while keeping it concise and memorable.
- Document classification page:When creating or editing a category, there is also a 'Custom URL' field. It is recommended to set it to the pinyin or English abbreviation of the category name, including the core keywords.
- Document Tab:Tags as another way to categorize content, their URLs can also be customized to ensure that the tab addresses are semantically meaningful.
Ensure the uniqueness of the custom URL across the entire site to avoid SEO issues caused by duplicate URLs.If the manually entered URL is duplicated with an existing URL, the system will automatically add random numbers at the end to ensure uniqueness.
Key strategies for improving SEO
The static URL feature is just one part of SEO optimization, and to achieve **effect**, it still needs to be配合 other strategies:
- The readability of URL and keywords:Choose URLs that include keywords, are concise, and user-friendly. Avoid long URLs and meaningless numeric codes. For example,
/product/anqi-cms-features.htmlis/p/?id=123&cat=456more advantageous. - Maintain URL structure consistency:Once the static rules have been selected or customized, they should be maintained as stable as possible. Frequent changes to the URL structure may confuse search engines, affecting crawling and ranking.
- Using 301 Redirect:If you inevitably need to change the old URL structure, the 301 redirect feature of Anqi CMS is particularly important.It can permanently redirect the old URL to the new URL, informing search engines that the page has been migrated, thus passing the SEO weight of the old page and avoiding loss of traffic and rankings.Find '301 Redirect Management' in 'Feature Management' to set it up.
- Canonical Tag:Even with pseudo-statics, there may still be issues with duplicate URLs in some cases (such as multi-version content, different parameter combinations leading to the same substance). Anqí CMS supports setting the 'standard link' field in the TDK (title, keywords, description) tag settings, which can be called in the template
canonicalTags, clearly tell the search engine which is the main version, avoid duplicate content penalties. - Complement with advanced SEO tools:The URL after pseudo-static optimization, which can better work with the advanced SEO tools built into the Anqi CMS, such as Sitemap generation (helping search engines discover all pages), Robots.txt configuration (controlling the scope of search engine crawling) and so on, forming a complete SEO optimization system.
Additional configuration for web servers:
It is worth noting that the mechanism of dealing with pseudo-static in AnQi CMS is completed internally in the system.This means that your web server (such as Nginx, Apache) needs to be configured with a general rule to forward all requests for non-existent files or directories to the Anqi CMS for processing, and then the Anqi CMS will parse them according to its internal pseudo-static rules and return the correct page content.try_files $uri $uri/index.html @AnqiCMS;Such instructions are to achieve this forwarding mechanism