In the daily use of AnQi CMS, we often come acrossurl_tokenthis field, especially when dealing with document details and URL structures. It is related to the API interface infilenameThere is a close connection between the parameters. Understanding the relationship between these two is crucial for better managing website content, optimizing user experience, and improving search engine performance.
url_tokenFriendly identity tag of the content:“auto”
url_tokenIn simple terms, it is a 'URL alias' set for various types of content (such as documents, categories, single pages, tags, etc.) in the Safe CMS system.It is not the internal ID of the content, but a more readable and descriptive string used to generate user and search engine friendly links on the website front end.
Imagine if the link of your website article was like this:“auto”yourwebsite.com/article?id=12345It is difficult for users to obtain any valuable information from this link, and search engines also find it hard to determine its subject. But if you haveurl_tokenYou can set it toyourwebsite.com/article/anqicms-features.This link is not only clear and easy to understand, but also convenient for users to share, and it is also a key factor in search engine optimization (SEO).Search engines prefer URLs that contain keywords and have clear structure, which helps improve the ranking of content in search results.
url_tokenThe field allows you to customize these aliases, usually recommended to be a combination of pinyin or English words related to the content title, simple and meaningful.This field can be manually filled in during content publication, or it can be automatically generated by the system based on the title.It stores the external identifier of the content within the system, which is an important part of content accessibility.
filenameConvenient "index" for retrieving content
filenameIt is a frequently occurring request parameter in the Anqi CMS API interface, for example, when getting document details (/api/archive/detail), category details (/api/category/detail)、single page details(/api/page/detail)or tag details(/api/tag/detail)and you will find this parameter. Its function is to serve as a convenient 'index' to retrieve specific content.
According to the document description, when requesting details of the content, you can choose to pass in the contentid(internal unique identifier), or you can choose to pass infilename.) Here,filenameThe parameter is used to receive the one you set in the content.url_tokenThat is to say, if you have set the value for a document.url_tokenFor 'anqicms-beginner-guide', when calling the interface, in addition to usingarchive/detailyou can also directly useid=某个数字, you can also directly usefilename=anqicms-beginner-guideAccurately obtain all the information of this document.
url_tokenwithfilenameClosely related to
Now, their relationship should be clearer.url_tokenIs a "friendly" name that the content itself has, reflecting its presence in the public URL; andfilenameThis is the parameter used to specify this 'friendly' name when we get these contents through the API interface.filenameThe parameter actually refers tourl_tokena reference or query method for field values.
This design brings great flexibility:
- User experience optimizationThe URL displayed on the website front-end is based on:
url_tokenGenerated, more readable and user-friendly. - SEO friendly:User-friendly URL structure helps improve the search engine's ability to crawl and understand the content.
- Convenient API access:Developers can use more readable
filename(i.e.,)url_tokenReplace the value with text (ID) to make debugging and management more intuitive. - Content recognition diversity: AnQiCMS allows to access through internal ID or
url_token(as afilenameUsing a parameter to locate content, meeting the needs of different scenarios.
In conclusion,url_tokenIs one of the core metadata of AnQin CMS content management, which determines the style of your content's 'business card' on the network; andfilenameParameters are the methods used to precisely locate and access content through this "business card". Proper planning and useurl_tokenwill bring better access experience and higher network visibility to your website.
Common Questions (FAQ)
1. If no manual setting is made when publishing content,url_tokenhow will the system handle?The Anqi CMS usually has a default mechanism to handle this situation. It is likely to automatically generate one based on the title of your content.url_tokenFor example, converting Chinese titles to pinyin or English abbreviations. Although the system will try its best to generate them, manually setting a concise, meaningful, and unique oneurl_tokenIt is usually better to do so, which can better meet your SEO and brand display needs.
2. Multiple contentsurl_tokenCan they be the same? If they are the same,filenamehow will the parameters work?Theoretically, in order to ensure the uniqueness of the URL and the accurate retrieval of content,url_tokenShould avoid repetition. If a repetition occurs, the system may automatically add numbers or other identifiers to distinguish, or through the APIfilenameThe parameter search will only return the first matching content, which may not be the result you expect. Therefore, it is recommended to seturl_tokenEnsure that it is unique within the content type (such as documents, categories, etc).
3. Change the published contenturl_tokenWhat impact will it have on the website?Change an already launched and indexed by search enginesurl_tokenIt will directly cause the original URL to become invalid.This may lead to two major issues: one is that users clicking on old links will see a 404 error page, which severely affects user experience; the other is that search engines will find a large number of 'dead links', thereby affecting the website's SEO ranking.If it is indeed necessary to change, it is imperative to set up a 301 permanent redirect, redirecting the old URL permanently to the new URL to retain the original SEO weight and ensure that users' access is not interrupted.