How to customize the document URL alias to optimize its display in browsers and search results?

Calendar 👁️ 60

In website operation, the URL is not only the address of the content, but also the first step for users and search engines to recognize the website.A clear, meaningful, and friendly URL alias that greatly enhances the display effect of content in the browser and achieves better visibility in search results.AnQiCMS provides flexible and powerful features, allowing us to easily customize documents, categories, tags, and even the URL aliases of the pages themselves, thereby optimizing the overall performance of the website.

Why is it so important to customize URL aliases?

Firstly, for search engines, a URL that contains keywords and clear structure can help them better understand the content of the page, which is helpful for improving the ranking of the page in relevant search results.Secondly, for users, a concise and clear URL is not only easy to remember and share, but also allows for an expectation of the page content before clicking, enhancing the user experience.Imagine, a display ofyourwebsite.com/news/how-to-optimize-urlsThe link, is much moreyourwebsite.com/article.php?id=123&category=45is more attractive.

AnQiCMS fully understands this, therefore integrating the URL alias customization feature into all aspects of content.

Customize URL aliases in AnQiCMS

AnQiCMS provides multiple places for us to set and manage URL aliases:

  1. Custom URL for (article/product) documentWhen creating or editing a document, in the "Other Parameters" section of the content editing interface, you will see an option for "Custom URL".AnQiCMS will automatically generate a pinyin URL alias based on the document title, which is usually very good.But if we want to use more SEO-friendly or brand特色的 English alias, we can enter it manually here.For example, an article about "AnQiCMS feature introduction" may be generated by the systemanqicms-gongneng-jieshaoWe can manually modify it toanqicms-features-guideIt should be noted that the custom URL must ensure that it is unique throughout the site. If it is duplicated, the system will automatically add random numbers at the end to ensure its uniqueness.

  2. Custom category URLIn managing the website's categories, whether it is article categories or product categories, there will also be a 'Custom URL' field when editing category information.This is similar to the custom way of the document, the system will also automatically generate pinyin aliases based on the category name, and we can also manually modify them.For example, to set the URL of thegongsi-xinwenis modified tocompany-newsLike the document, the custom category URL also needs to ensure uniqueness.

  3. Custom URL for Tag (Tag)The tab page of the website is also an important entry point for users and search engines.In AnQiCMS's document tag management, each tag can also be set to a 'custom URL'.For example, the URL alias of the "SEO optimization" tag can be obtained fromseo-youhuais modified toseo-optimization. The custom URL alias for tags supports letters, numbers, and underscores, and must be unique.

  4. Custom URL for a single page.: For "About Us", "Contact Us", and other independent single-page websites, the customization of their URL aliases is also done during page editing. For example, the URL of the "About Us" page can be changed fromguanyu-womenis modified toabout-us.

  5. Content Model URL AliasIn addition to the alias of a single content instance (document, category, tag, page), AnQiCMS also provides a 'URL alias' setting at the content model level.This alias is the identifier of the model, which will be used in the pseudo-static rules.For example, the URL alias of the article model is default toarticle, Product Model isproduct. It is usually recommended to use short English lowercase letters.

The key to enabling custom URL alias: pseudo-static rules

Although we have set up beautiful URL aliases in the background, in order to make them truly display and accessible on the front end, we still need to rely on the pseudo-static rules of AnQiCMS. The pseudo-static feature can convert dynamically generated URLs (such as?id=123Converted to look like static files (such as).htmlending into a more friendly URL.

AnQiCMS is built-in with various pseudo-static rule patterns, such as 'number pattern', 'model naming pattern', and 'category naming pattern'.These patterns have already met the needs of most websites, making it convenient for us to select with one click.However, if we want to make full use of the custom URL alias, we must select and configure the 'custom mode'.

Under the "Custom mode", we can flexibly combine various variables to construct URL structures. The core variables include:

  • {id}: The unique ID of the content
  • {filename}Custom URL alias for document, single page setting
  • {catname}Custom URL alias for category setting
  • {module}URL alias for content model
  • {page}Page Number

To make custom{filename}and{catname}take effect, make sure they are included in the custom static rule. For example, if you want the article URL format to be/{module}/{filename}.htmlThen you can set it like this in custom rulesarchive===/{module}/{filename}.html. So, the custom URL alias you enter in document editing will replace the original ID or pinyin and appear in the final URL.

Practical Tips for Optimizing URL Aliases

  1. Concise and Descriptive: URLs should be short and accurately describe the page content. Avoid long and unnecessary words.
  2. Contains keywordsIn URL aliases, naturally integrate core keywords, but avoid keyword stacking. This helps search engines understand content relevance.
  3. Use hyphens to separate wordsAlways use hyphens (-) to separate words in URLs, not underscores (_) or spaces. For example,best-practicesis preferredbest_practices.
  4. Maintain consistencyThe entire website's URL structure should be consistent. For example, if articles use/blog/, products use/products/, this rule should be followed.
  5. Avoid special characters: Avoid using special characters other than hyphens in URLs to ensure readability and compatibility.
  6. Make good use of 301 redirectsIf the website content or structure changes, the old URL may become invalid.AnQiCMS has built-in powerful 301 redirect management features that can help us effectively avoid traffic loss and SEO weight decline, permanently redirecting old URLs to new ones.This is an indispensable part of URL optimization strategy.

By providing these meticulous custom features and flexible pseudo-static configuration through AnQiCMS, we can build URL structures that are beneficial for search engine crawling and enhance user experience, thereby laying a solid foundation for the successful operation of the website.


Frequently Asked Questions (FAQ)

Q1: Why did I set a custom URL alias, but it didn't take effect on the front end?A1: The most common reason is that the pseudo-static rules are not configured correctly or are not enabled..{filename}or.{catname}Variable. Please go to the "Function Management"->"Static Rule" in the AnQiCMS backend and confirm that you have selected the "Custom Mode" and check the corresponding document (archive)、Category(category) or page (page) was used in the rule{filename}or{catname}Variable. For example, if you want to enable the custom URL of the article, yourarchiverule may need to be set toarchive===/{module}/{filename}.html.

Q2: How to deal with the system prompt 'The alias already exists' when customizing the URL alias?A2: AnQiCMS requires that URL aliases be unique across the entire site.This means you cannot have two documents, two categories, or two pages using the same alias.If you encounter this prompt, you can try choosing a different, more distinctive alias, or adding a number or a brief modifier (such asyour-title-2oryour-title-guide) to ensure its uniqueness.

Q3: Will the previous link become invalid after modifying the URL alias of an existing article? Will it affect SEO?A3: Yes, after modifying the URL alias of an existing article, the previous old links will become invalid, and users and search engines will not be able to access the content through the old links. This will have a negative impact on the website's SEO and may result in a drop in rankings.To avoid this situation, you should immediately set up a 301 permanent redirect to the new URL in the 'Function Management' -> '301 Redirect Management' section of the AnQiCMS backend.This will automatically redirect search engines and users to the new link when they access the old link, thus preserving the SEO weight of the page.

Related articles

How to set the recommendation attribute to affect the display priority of the front-end content when publishing a document?

How to effectively guide visitors to focus on key information when managing content in AnQi CMS, and enhance the visibility and interactivity of the content, is a common concern for operators.By setting the recommended properties of the document reasonably, we can finely control the display priority of the front-end content, thereby achieving this goal.This not only helps to optimize the user experience, but also better serves the overall operation strategy of the website.### Backend settings recommended attribute: clear content positioning When we publish or edit a document, the content editing interface of Anqi CMS provides a feature area named "Recommended Attribute".

2025-11-08

How to format timestamps and display them on the page as a readable date and time?

In website operation, the timeliness of content is often the key to attracting readers' attention.Whether it is the release date of the article or the update time of the product, these pieces of information, if presented in a clear and easy-to-understand manner on the page, will greatly enhance the user experience.However, you may find that the time information recorded by AnQiCMS backend, when directly called in the template, often appears as a long series of numbers, which is what we usually call a timestamp.These original timestamps are convenient for internal system processing, but they lack readability for ordinary users.It's lucky that

2025-11-08

How to iterate over list data in a template and display it one by one?

Managing and displaying content in Anqi CMS is one of its core advantages.When we need to display dynamic list data on the front end of a website, such as the latest articles, popular products, and content collections under categories, understanding how to efficiently iterate through these data in templates and display them one by one is an essential skill for website operators and template developers.The Anqi CMS template system adopts syntax similar to Django, which is intuitive and powerful, making the transformation of technical information and practical application extremely convenient.### Core Loop Syntax: `{% for %}`

2025-11-08

How to use conditional judgment logic in a template to control the display and hiding of content?

In the presentation of website content, we often need to decide based on different situations which information should be displayed to visitors and which should be temporarily hidden.AnQiCMS (AnQiCMS) provides flexible template conditional judgment logic, making content display and hide intuitive and efficient.By these judgments, you can easily implement personalized page layouts, content display under permission control, and adjustment of page elements based on data status, which greatly enhances the dynamicity and user experience of the website.The Anqi CMS template system uses a syntax similar to the Django template engine

2025-11-08

How to use the scheduled publishing feature to automatically go live and display documents at specified times?

## Precisely Control Content Rhythm: A Practical Guide to AnQi CMS Scheduled Publishing Function In today's increasingly refined content operation, how to ensure that content reaches the target audience at the most appropriate time is a core challenge faced by every operator.Manually publishing is inefficient and is prone to delays or errors due to temporary affairs or time differences.Fortunately, AnQi CMS provides a powerful and practical feature - scheduled publishing, which can make content going live automated and precise, bringing unprecedented flexibility and efficiency to website operations.The timing release function of Anqi CMS, as the name implies

2025-11-08

How to add multiple Tag tags to documents and associate them for display and filtering on the front end?

In AnQiCMS, adding Tag tags to documents and associating them for display and filtering on the front end is an effective way to enhance the organization of website content and user experience.Tag labels can not only help users find the content they are interested in faster, but also optimize the keyword layout of the website from the SEO level, increasing the exposure of the content.Next, we will discuss in detail how to implement this feature in AnQiCMS. ## One, add Tag label to document in the background Adding a Tag label to the AnQiCMS backend is a straightforward and convenient process. First

2025-11-08

How to use Markdown formatting in document content and ensure it is correctly rendered as HTML?

AnQi CMS provides flexible content editing methods for content creators, among which the support for Markdown format greatly improves the efficiency and expressiveness of content creation.Understand how to use Markdown correctly in document content and ensure that it is perfectly rendered as HTML on the website front-end is the key to bringing this feature into play. ### Enable and Use Markdown Editor To start using Markdown in AnQiCMS, you first need to make simple configurations in the background.This is usually completed in **Global Settings -> Content Settings**

2025-11-08

How to set a custom template for categories to change the overall display style of the category page?

AnQi CMS provides great flexibility for website content management, and customizing the display style of category pages is a very practical feature.By setting custom templates for different categories, you can easily allow news, products, cases, and other types of category pages to present unique design and content layouts, thereby better meeting users' browsing needs and brand display strategies.Why do you need a custom category template? By default, AnQi CMS uses a generic list template for all categories (usually `{modeltable}/list.html`)

2025-11-08