In website operation, Search Engine Optimization (SEO) plays a vital role, and a friendly URL structure is a key factor in improving a website's performance in search engines.A clear and meaningful URL can not only help search engines better understand the content of the page, but also allow visitors to see the theme of the page at a glance, enhancing the user experience.Traditional dynamic URLs often contain parameters that are difficult to understand, which is not friendly to SEO and users. 幸运的是,SafeCMS provides powerful pseudo-static rule configuration features, allowing you to easily optimize your website's URL structure.
Understanding the importance of URL rewriting
A pseudo-static URL, as the name implies, it looks like a static HTML file, but it is actually generated dynamically by the server. For example, a dynamic URL might beexample.com/article.php?id=123&category=newsAfter pseudo-static, it may becomeexample.com/news/article-123.htmlOrexample.com/news/article-anqicms.html.
The benefits brought by this change are obvious:
- Improve the efficiency of search engine crawling:Search engine spiders prefer to crawl static or pseudo-static URLs with clear structure and path.
- Improve keyword ranking:Including keywords in the URL helps search engines understand the page topic and may improve the ranking of relevant keywords.
- Enhance user experience:A concise and readable URL is more convenient for users to remember and share, and it is also easier to judge the content of the page.
- Increase click-through rate:In search results, a clear URL is more likely to attract users to click.
AnQi CMS understands the importance of static URLs for content operations and therefore has incorporated it as one of the core features from the initial system design, committed to helping small and medium-sized enterprises and content operation teams efficiently carry out SEO optimization.
Overview of static functionality in AnQi CMS
AnQi CMS provides users with two ways to configure static rule: one isBuilt-in preset rulesenabling you to quickly apply common URL patterns; secondlyhighly flexible custom rulesenabling you to design a unique URL structure according to specific needs.
No matter if you are a novice operator or a senior SEO expert, you can find a static configuration scheme suitable for yourself in Anqi CMS.
Built-in static rules, ready to use
If you want to enable pseudo-static quickly, or have no particularly complex requirements for URL structure, the four built-in pseudo-static rules provided by Anqi CMS will be your ideal choice:
- Numeric mode:This is a simple and intuitive pattern, the details of the document, document list, single page, tags, etc. will all use their respective IDs as the basis for generating the URL. For example,
/article-123.htmlThis pattern is especially suitable for Chinese websites, with a concise and clear structure. - Model naming pattern:In this mode, the URL will include the English alias of the model (such as articles, products). For example,
/article/anqicms-tutorial.htmlThis is very useful for creating English websites or for websites that want to distinguish content models through URLs. - Category naming pattern 1:The URL will include the alias of the category. For example,
/news/anqicms-update.htmlThis pattern is also common on Chinese websites, which can clearly show the ownership of the content. - Category naming pattern 2:It is also based on category naming, but it may be slightly different in structure from pattern 1, providing more choices. It is also often used on English sites.
To use these built-in rules, you just need to enter the Anqi CMS backend management interface, find the "Function Management" in the left menu, and then click on "Static Rule Setting".Here, you can directly select one of the built-in rules and save.The system will automatically generate a URL that conforms to the rule.
Custom static rules, flexible control.
If you have a deeper understanding of website structure and SEO, or want to create unique URLs for specific types of pages, then the Anqi CMS custom pseudo-static rules will be your weapon. It allows you to define pseudo-static rules separately for the six main page types of your website:
- Document Details (archive):Such as articles, product detail pages.
- Document List (category):Such as article lists, product lists pages.
- Model homepage (archiveIndex):Such as the homepage of all articles or all products.
- Single page (page):such as "About Us", "Contact Us", and other independent pages.
- Tag list (tagIndex):List page of all tags.
- Tag details (tag):Single tag detail page.
Each custom rule follows规则名===规则值Format. In rule values, you can combine multiple variables provided by Anqin CMS to construct URLs:
{id}Data ID, such as document ID, category ID.{filename}This is a custom link name for data. It is usually manually entered when publishing documents, creating single pages, or tags, or generated by the system according to the title in pinyin.{catname}Custom link name of category. It is the English alias or pinyin automatically generated when you create the category.{catid}: Category ID.{module}: Model table name, such as "article" or "product".{page}Page number.Please pay special attention, the variable for pagination page number needs to be enclosed in parentheses, for example,(/{page})When the page does not have pagination, the page number part of the URL will not be displayed, keeping it concise.
For example, you may want the URL of the article detail page to include the model name, article ID, and end with.htmlThen you can configure it like this:archive===/{module}-{id}.html
If you want the URL of the article list page to include the category name and support pagination, you can configure it like this:category===/{catname}(/{page})
When you configure{filename}or{catname}Remember when customizing this kind of link name variable:
- AnQi CMS will automatically generate the pinyin as the default custom URL based on the Chinese title you enter.
- You can manually modify these custom URLs, but you must ensure that they are unique across the entire site. Otherwise, the system will automatically add random numbers at the end to ensure uniqueness.
- It is best to use letters, numbers, and underscores for custom URLs entered manually, to avoid special characters and spaces, ensuring the friendliness of the URL.
Configure custom rules and don't forget to click save, andEnsure your website is fully testedMake sure all links can be accessed normally.
Brief guidance on configuration steps
- Enter the backend:Log in to your AnQi CMS backend management interface.
- Navigate to Function Management:Find and click on "Function Management" in the left menu.
- Select the static rule:On the feature management page, click the 'Static rules' option.
- Select or customize:
- Select built-in rules:Directly select the pattern you need from the preset rules and then click save.
- Custom rules:Select "Custom mode" then in the input box of the corresponding page type (such as "Document Details", "Document List", etc.), follow
规则名===规则值Enter your pseudo-static rules. Please refer to the variables and examples mentioned above.
- Save and test:Click Save after filling in.It is a very important step to: After saving, be sure to carefully check all pages of the website (including article details, lists, single pages, tag pages, etc.), to ensure that the URL has been generated according to your configuration and can be accessed normally.
Optimization Practice Suggestions
- Keep the URL concise:Try to shorten the URL length as much as possible, remove unnecessary words.
- The URL contains keywords:Use core keywords related to the page content in the URL, but avoid stacking.
- Use hyphens
-Word separation:The hyphen is the recommended word separator for URLs by search engines, better than the underscore_More popular. - Manage your custom URL (
{filename}and{catname}):Ensure these aliases are descriptive, concise, and unique.If the content title changes, consider whether you need to update the custom URL, but also pay attention to the configuration of 301 redirects to avoid the failure of the old URL. - Make good use of 301 redirects:If your URL structure is