The structure of the website link plays a crucial role in search engine optimization (SEO).An clear, meaningful, and keyword-rich URL not only helps search engines better understand the page content, but also improves user experience.filenameandcatnameThe variable is the key to achieving this goal.
Why is the structure of the URL important for SEO?
Before delving into the pseudo-static rules of AnQi CMS, let's briefly review why it is worth investing effort in optimizing the URL structure.Search engine spiders prioritize the clarity and relevance of URLs when crawling and indexing website content.An URL containing keywords with a reasonable hierarchy structure, which can help search engines quickly identify the page topic and possibly achieve a better ranking in search results.At the same time, users can also get a general idea of the page content from the URL before clicking on the link, which undoubtedly will improve the click-through rate and trustworthiness of the website.
AnQi CMS lists 'Static and 301 Redirect Management' and 'Advanced SEO Tools' as core features, which reflects its design philosophy of being SEO-friendly. Through static conversion, we can transform dynamically generated URLs (usually with question marks and a series of parameters) into static page-like URLs,yourwebsite.com/news/industry-trends.htmlThis is not only beautiful, but also conforms to the preferences of search engines.
Anqi CMS built-in static rules and custom options.
Auto CMS provides a series of built-in pseudo-static rules, such as number patterns, model naming patterns, and category naming patterns, which usually meet the needs of general websites.But for users who pursue ultimate SEO effects or have specific URL structure requirements, custom static rule provides infinite possibilities.
To set custom rewrite rules, we need to enter the "Function Management" menu of the Anqi CMS backend and find the "Rewrite Rules" option.Here, you will see an area where you can customize the URL format.
Understandingfilenameandcatname: The core of building SEO-friendly URLs.
in the custom pseudo-static rules,filenameandcatnameThese are two very practical variables that can help us create highly customizable and SEO-friendly URLs.
{filename}This variable usually represents the content filled in the 'custom URL' field of the document (article, product, etc.), single page, or tab page.When you are editing an article, a single page, or a tag in the background, there will be an input box called 'Custom URL'.The system will automatically generate pinyin based on the title, but you can manually modify it to a more descriptive, keyword-containing English or pinyin phrase.filenamecan be set toanqicms-tutorial.{catname}This variable is used to represent the content filled in the 'Custom URL' field on the category page.Similarly, when creating or editing a category, you can set a unique, keyword-containing custom name for it.catnamecan be set towebsite-operation.
By using these variables, we can get rid of relying solely on IDs ({id})to identify the page in a way that the URL itself has content meaning.
How to design and apply custom rewrite rules?
The custom rewrite rules of Anqi CMS are规则名===规则值The form of construction, for different page types (document details, document list, model homepage, page, tag list, tag details) provides independent configuration options.
Here are some based onfilenameandcatnameThe design concept and examples of variables:
Document details page(
archiveRule):- EnglishThe custom phrase in the URL includes the category name and article title.
- Example Rule:
archive===/{catname}/{filename}.html - ExplanationThis will generate something similar to
yourwebsite.com/website-operation/anqicms-tutorial.htmlThe URL. Search engines and users can clearly see the category and topic of the article from the URL. - OperationIn the background, make sure the category is set
catnameand the article itself is setfilename.
Category list page (
categoryRule):- English: The custom phrase in the URL includes the category and supports pagination.
- Example Rule:
category===/{catname}(-{page}).html - Explanation: This will generate
yourwebsite.com/website-operation.htmloryourwebsite.com/website-operation-2.htmlThe URL of (the second page). The category name is directly reflected in the URL, which is concise and clear. - OperationWhen editing the category in the background, set it
自定义URLto the expected onecatname.
Single page (
pageRule):- English:URL directly reflects the theme of a single page.
- Example Rule:
page===/{filename}.html - Explanation:For example, the "About Us" page.
filenamesetabout-us,it will generateyourwebsite.com/about-us.html. - Operation:When editing a single page in the background, set its
自定义URLto the expected onefilename.
tag detail page (
tagRule):- English:The custom phrase included in the URL with tags.
- Example Rule:
tag===/tag/{filename}.html - Explanation:For example, the “SEO optimization” tag's
filenamesetseo-optimization,it will generateyourwebsite.com/tag/seo-optimization.html. - Operation:When editing tags in the background, set their
自定义URLto the expected onefilename.
Design principles tips:
- Simplicity:URL should be as short as possible, avoiding redundant information.
- Readability:Use words or phrases that are easy to understand, rather than random numbers or garbled characters.
- Keywords:Naturally integrate target keywords but avoid keyword stuffing.
- hyphen:Use hyphens (
-) to separate words in URLs instead of underscores (_). - lowercaseThe URL should ideally have all lowercase letters to avoid potential duplicate content issues and compatibility issues.
Implementation and Precautions
- Plan firstIn changing the pseudo-static rules, it is best to plan the entire website's URL structure first. Once changed, the old URLs may become invalid.
- Enable custom rulesIn the 'Function Management' -> 'URL Rewrite Rule' page, select 'Custom Mode', then enter the rule you designed.
- Fill in the custom URL fieldEnsure that you fill in the information carefully when publishing or editing documents, categories, single pages, and tags.
自定义URL字段。These fields will be used directly to generate URLs. Anqi CMS will usually generate pinyin automatically based on the title, but it is recommended to optimize it manually to make it more valuable for SEO. - Test verification:After changing the pseudo-static rules, it is essential to comprehensively test all page links of the website, including article details, category lists, single pages, tag pages, and pagination links, to ensure that all links can be accessed normally.
- 301 RedirectIf the website has been running for a while and the URL structure has changed, it is strongly recommended to use the 301 redirect function built into the AnQi CMS to permanently redirect the old URL to the new URL, in order to retain search engine weight and avoid traffic loss and 404 errors.You can find '301 Redirect Management' in 'Feature Management'.
Through careful design and application of includingfilenameandcatnameThe pseudo-static rules, your CMS website will have a more structured, more conducive to search engine crawling and user understanding of the URL, thereby laying a solid foundation for the SEO performance of the website.
Common Questions and Answers (FAQ)
1. Why does the front-end page URL not change even though I have set up custom rewrite rules?Firstly, please confirm that you have selected the "Custom Mode" and saved in the background "Function Management" -> "URL Rewrite Rule".The newly released articles, categories, or single pages can directly apply the new rules.For the old content, if you have not made any changes to the 'Custom URL' field on the content editing page, the system will continue to use the old URL generation logic or the original URL alias.Suggest to re-edit and update the "custom URL" field for all pages that need to apply the new static rule after changing the static rule, and check whether the system cache has been cleared.
2. UsefilenameorcatnameWhat if multiple articles/categories have the same content filled in the 'Custom URL' field?Security CMS requirements自定义URL(Whether it is)filenameOrcatnameIt must be unique throughout the entire station.If the same custom URL is set for different content in the background, the system usually adds a random number or character automatically when saving to ensure its uniqueness.Therefore, it is recommended to ensure the uniqueness of these fields when filling them out, to avoid the system automatically adding suffixes to maintain the simplicity and beauty of the URL.
3. What impact does changing the pseudo-static rules have on my website's SEO? What should I pay attention to?Changing the URL rewrite rules will have a direct and significant impact on the website's SEO.If not handled properly, it may cause the existing search engine to lose its inclusion and ranking to drop.
* **规划先行**:在实施前做好充分的URL结构规划。
* **301重定向**:对于所有发生变化的旧URL,务必设置301永久重定向到新的URL。这是保留原有SEO权重、避免404错误的唯一有效方法。
* **提交Sitemap**:更新伪静态规则后,重新生成并提交新的Sitemap给各大搜索引擎,引导它们抓取新的URL结构。
* **测试**:部署新规则后,对所有关键页面和链接进行全面测试,确保没有死链或访问问题。