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.An clear, meaningful and friendly URL alias, which can greatly enhance the display effect of the content in the browser and achieve better visibility in search results.AnQiCMS provides flexible and powerful functions, allowing us to easily customize the URL aliases of documents, categories, tags, and even the pages themselves, thereby optimizing the overall performance of the website.
Why is it so important to customize the URL alias?
Firstly, for search engines, a URL containing 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.其次,for users, a concise and clear URL is not only easy to remember and share, but also allows users to anticipate the content of the page before clicking, thereby enhancing the user experience.yourwebsite.com/news/how-to-optimize-urlsthe link, far moreyourwebsite.com/article.php?id=123&category=45attractive.
AnQiCMS knows this well, therefore the URL alias customization feature is integrated into all aspects of the content.
In AnQiCMS, customize URL alias
AnQiCMS provides multiple places for us to set and manage URL aliases:
Document (article/product) custom URLWhen creating or editing a document, in the "Other Parameters" section of the content editing interface, you will see an option for "Custom URL".AnQiCMS 默认会根据文档标题自动生成一个拼音形式的 URL 别名,这通常已经很不错了。But if we want to use more SEO-friendly or brand-characteristic English aliases, we can enter them manually here.
anqicms-gongneng-jieshaoWe can manually modify it toanqicms-features-guideThe custom URL must ensure the uniqueness across the entire site, if there is a duplicate, the system will automatically add random numbers to ensure its uniqueness.Categorized custom URLIn managing the website 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.
gongsi-xinwenChange tocompany-newsLike the category, the custom URL of the tag also needs to ensure uniqueness.Custom URL for Tag (Tag)The tab 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'.
seo-youhuaChange toseo-optimizationEnglish label's custom URL alias supports letters, numbers, and underscores, and must be unique.Custom URL for a single page: For independent single pages such as "About Us" and "Contact Us
guanyu-womenChange toabout-us.Content Model URL Alias: Except for the alias of individual content instances (documents, categories, tags, pages), AnQiCMS also provides the setting of 'URL alias' at the content model level.This alias is the identifier of the model, which will be used in the pseudo-static rules.
article, the product model isproductIt is usually recommended to use short English lowercase letters here.
The key to making custom URL aliases take effect: pseudo-static rules
Although we have set up beautiful URL aliases in the background, in order for them to truly display on the front end and be accessible, it still depends on the pseudo-static rules of AnQiCMS. The pseudo-static feature can convert dynamically generated URLs (such as?id=123)converted to look like static files (such as.htmlending) into more user-friendly URLs.
AnQiCMS is integrated with various pre-set static rule modes, such as 'number mode', 'model naming mode', and 'category naming mode'.These patterns can meet the needs of most websites and make 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 build URL structures. The core variables include:
{id}: The unique ID of the content{filename}:We set the custom URL alias for the document and single-page settings{catname}:We set the custom URL alias for the category settings{module}:The URL alias for the content model{page}:Page number pagination
To make the custom one{filename}and{catname}take effect, make sure they are included in the custom rewrite rules. For example, if you want the article URL format to be/{module}/{filename}.htmlThen you can set it like this in the custom rulearchive===/{module}/{filename}.htmlSo, the custom URL alias you enter while editing the document will replace the original ID or pinyin, and appear in the final URL.
Optimize URL Aliases Practical Skills
- Concise and Descriptive: URLs should be as short as possible while accurately describing the page content. Avoid long and unnecessary words.
- Include keywordsIncorporate core keywords naturally into URL aliases, but avoid keyword stuffing. This helps search engines understand content relevance.
- Use hyphens to separate words:Always use hyphens (
-) to separate words in URLs, not underscores (_) or spaces. For example,best-practicesBetter thanbest_practices. - Maintain consistencyThe URL structure of the entire website should be consistent. For example, if articles use
/blog/, and products use/products/, they should follow this rule. - Avoid special characters:The URL should avoid using special characters other than hyphens to ensure readability and compatibility.
- Make good use of 301 redirects.If the content or structure of the website changes, the old URL may become invalid.AnQiCMS comes with a powerful 301 redirect management feature, which can help us effectively avoid traffic loss and SEO weight drop, and permanently redirect old URLs to new URLs.This is an indispensable part of the URL optimization strategy.
Through these detailed and flexible custom features and pseudo-static configuration provided by AnQiCMS, we can build URL structures that are beneficial for search engine crawling and enhance user experience, laying a solid foundation for the successful operation of the website.
Common Questions (FAQ)
Q1: Why didn't the custom URL alias work on the front end?A1: The most common reason is that the pseudo-static rules are not configured correctly or not enabled.{filename}or.{catname}Variable. Please go to the "Function Management" -> "URL Rewrite Rules" in the AnQiCMS backend and confirm that you have selected "Custom Mode" and check the corresponding document (archive)Categories(category)or page(page)rule was used{filename}or{catname}variable. For example, if you want to make the custom URL of the article effective, yourarchiverule may need to be set toarchive===/{module}/{filename}.html.
Q2: What should I do if the system prompts "Alias already exists" when customizing URL aliases?A2: AnQiCMS requires that URL aliases be unique throughout the entire site.This means you cannot have two documents, two categories, or two pages with exactly the same alias.your-title-2oryour-title-guide)to ensure its uniqueness.
Q3: Has the URL alias of an existing article been modified, will the previous links fail? Will it affect SEO?A3: Yes, after modifying the URL alias of an existing article, the previous old links will become invalid. Users and search engines will not be able to access the content through the old links, which may have a negative impact on the website's SEO and could lead to a drop in rankings.To avoid this situation, you should immediately set a 301 permanent redirect to the new URL in the 'Function Management' -> '301 Redirect Management' section of the AnQiCMS backend for the old URL.So, when search engines and users access old links, they will be automatically redirected to new links, thus preserving the page's SEO authority.