In content operations, link management and search engine optimization (SEO) are inseparable important links. For us who use excellent content management systems like AnQiCMS, understanding the internal mechanism of its link processing, especially likeurlizeDoes this filter automatically addrel="nofollow"property, which is crucial for precise control of the website's SEO performance
AnQiCMS'urlizeFilter: automatically addrel="nofollow"the behind-the-scenes work of the property
To put it directly, according to the document provided by AnQiCMS, itsurlizefilter will indeed automatically identify and make the URLs and email addresses in the text clickable<a>When labeling, it will automatically addrel="nofollow"Property. This design consideration reflects the efforts of AnQiCMS in SEO friendliness, aiming to help us better manage the external link weight of the website.
urlizeThe working principle of the filter is relatively direct: When we use it in a template to process a piece of text, it intelligently scans the text content, identifies strings that match the URL or email address format, and then converts them into standard HTML hyperlinks. For example, a piece of ordinary text containshttps://en.anqicms.comAfterurlizeAfter filtering, the URL in this text will become<a href="https://en.anqicms.com" rel="nofollow">https://en.anqicms.com</a>. It can also handle formats likewww.anqicms.comor[email protected]this common format.
Automatically addedrel="nofollow"Properties, for us content operators, have important SEO significance.nofollowThe tag tells the search engine that we do not want to pass 'link voting' or 'PageRank' to the target pages of these links.This is particularly useful when dealing with user-generated content (such as comments, messages), advertising links, or any external links we do not wish to endorse.It can effectively prevent the link weight of a website from being unnecessarily scattered, avoiding SEO risks that may arise from linking to low-quality or irrelevant content.
urlizeActual application and注意事项 of filters
In AnQiCMS templates,urlizeFilters are usually used in combination with other filters, the most common being|safefilters. Due tourlizeThe filter generates HTML tags, to ensure that these tags are correctly parsed by the browser and not displayed as plain text, we need to use|safeThe filter informs the template engine that the output content is safe HTML and does not require escaping.
Here is a simple application example:
{# 假设content变量中包含一段含有URL的文本 #}
<p>{{ content|urlize|safe }}</p>
In addition, AnQiCMS also providesurlizetruncA filter that performsurlizesimilar functions but adds an extra feature: it can specify the display length of the generated link text. If the URL is too long,urlizetruncIt is very useful to truncate a part of the URL and add an ellipsis at the end while maintaining the validity of the link, which is very practical when there are requirements for the length of the link in page layout or visual. For example:
{# 将URL截取显示为前15个字符 #}
<p>{{ content|urlizetrunc:15|safe }}</p>
Regardless of usingurlizeOrurlizetruncthey will all follow the automatic additionrel="nofollow"rule, which provides a layer of default SEO protection for us when dynamically generating links.
AnQiCMS innofollowGlobal control and strategy selection
excepturlizeFilter automatically added for specific scenariosnofollowIn addition, AnQiCMS also provides external link settings in the global settings.nofollowThe more macro control. In the background "Content Settings", we can find an option named "Whether to automatically filter external links".
This global setting provides two strategies for handling external links:
- If you choose 'Yes' (i.e., enable automatic filtering of external links)The system will automatically remove all detected external links at the time of content publication. This applies to websites that have strict control over external links, or even do not want any external links to exist.
- If you select 'No' (i.e., do not filter external links): The system will retain external links in the content, but willautomatically add these external links
rel="nofollow"Tag.
This isurlizecomplementary to the behavior of the filter.urlizeThe main task is to handle the links identified in dynamic text, while the option 'Do not filter external links' in the content settings applies to all URLs identified as external links, regardless of whether these links are manually entered, imported content, or embedded in content in other ways.
Therefore, we manage links in AnQiCMSnofollowWhen using properties, we can combine:
urlizeFilterUsed to automatically add to dynamically generated URLs (such as links in user comments) during template renderingnofollowIt is a defensive strategy.- The option 'Whether to automatically filter external links' in content settings: Strategically manage external links for the entire site, choose whether to completely remove or retain and add them uniformly
nofollow.
This hierarchical control mechanism provides us with great flexibility, allowing us to finely manage the link flow and weight distribution of the website according to different operational strategies and SEO requirements.
Summary
AnQiCMS'urlizeThe filter will automatically add to the generated linkrel="nofollow"Property, this is a built-in SEO-friendly feature.At the same time, combined with the global content settings of the system backend, we can manage the external link strategy of the website more comprehensively, whether it is through filtering dynamic content or through global configuration to unify manage all external links.This makes AnQiCMS an efficient and SEO detail-oriented content management tool that helps us better control the link health and search engine performance of the website.
Frequently Asked Questions (FAQ)
Can I disable
urlizeThe filter will automatically addrel="nofollow"What behavior?It is explicitly stated in the AnQiCMS documentationurlizeThe filter will be "auto-increased"nofollowof the rel, it does not mention having a parameter that can directly disable this behavior. This meansrel="nofollow"IsurlizeThe default and unchangeable feature of the filter design, intended to provide default SEO protection for dynamically generated external links. If you need to output withoutnofollowThe link, then you need to manually build<a>Tag, or use other nonurlizeway to deal with.urlizeFilter addednofollowWhat is the difference between and the setting of 'whether to automatically filter external links' in content settings?urlizeThe filter is mainly used in templates to automatically add HTML links to URLs or email addresses in plain textnofollow.It is a 'point-to-point' processing that takes effect in the rendering layer.rel="nofollow"In simple terms,urlizeThis is an automatic behavior for output specific to a template, while the global settings are a unified strategy for external links in all content.In what situations should I choose not to filter external links but let the system add them automatically
rel="nofollow"?When your website allows or needs to include external links but does not want to pass the PageRank (link weight) to these external sites, you should choose not to filter external links and add them automaticallyrel="nofollow".This is common in user-generated content (UGC) such as comments, forum posts, or links to advertising, sponsored content, and any external resources you believe should not receive support from your website's weight.This helps maintain the SEO health of your website, avoiding potential negative impacts from linking to low-quality or irrelevant content.