Does AnQiCMS's `urlize` filter automatically add the `rel="nofollow"` attribute to generated links?

Calendar 👁️ 67

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:

  1. 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.
  2. 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 linksrel="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 uniformlynofollow.

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)

  1. Can I disableurlizeThe 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.

  2. 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.

  3. In what situations should I choose not to filter external links but let the system add them automaticallyrel="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.

Related articles

Does the `urlize` filter support converting email addresses (such as `[email protected]`) into `mailto:` links?

When managing website content, we often need to convert URLs or email addresses in text to clickable links.Manually adding HTML tags one by one is time-consuming and prone to errors, especially when dealing with large amounts of content.Therefore, whether an efficient content management system can provide intelligent link parsing functionality is crucial for content operation efficiency.AnQiCMS as a content management system designed specifically for small and medium-sized enterprises and content operation teams, understands the importance of such needs.It has built-in many utility tools in the template engine to simplify this work, including `urlize`

2025-11-09

How to parse a URL string into a clickable link in the article detail content of AnQiCMS?

In daily website content operations, we often need to display text content containing URL addresses on article detail pages, such as reference sources, recommended links, and so on.If these URL strings cannot be automatically parsed into clickable hyperlinks, users will not be able to jump directly, which not only affects the user experience but also reduces the readability and convenience of the content.

2025-11-09

What is the core function of the `urlize` filter in the AnQiCMS template?

In AnQiCMS template development, handling links in content is a common and important link.The `urlize` filter was born to meet this need, it can greatly simplify the recognition and formatting of links in templates, while also taking into account user experience and search engine optimization.### `urlize` filter is the core function in AnQiCMS templates The core function of the `urlize` filter is to intelligently identify URLs and email addresses contained in a piece of plain text content

2025-11-09

How to automatically identify URLs in text and convert them to clickable `<a>` tags in AnQiCMS?

In content management and website operations, we often need to convert URLs in text into clickable hyperlinks so that users can directly navigate to access.Manual operations are not only inefficient but also prone to omissions, especially on websites with large amounts of content.AnQi CMS understands this pain point and provides an elegant and efficient solution that allows us to easily identify and convert URLs in text.To make Anq CMS automatically identify URLs in text and convert them into clickable `<a>` tags, we mainly use its powerful template filter function.Specifically

2025-11-09

How to ensure that the URL in the original text is not escaped by the `urlize` filter?

In AnQi CMS template development, the `urlize` filter is undoubtedly a very practical tool, which can intelligently recognize URLs or email addresses in text and automatically convert them into clickable `<a>` tags.This is very beneficial for handling user submitted content or importing plain text content from external sources to provide a better user experience and SEO friendliness.However, when using `urlize`, some developers may encounter a confusing issue: why do URLs in the original text, especially those with query parameters or special characters, cause problems

2025-11-09

What are the main differences in functionality between the `urlizetrunc` filter and the `urlize` filter?

In AnQi CMS, we often need to display some URLs or email addresses in the content, and we hope that they can be automatically turned into clickable links for visitors to jump directly.To achieve this function, Anqi CMS provides two very practical template filters: `urlize` and `urlizetrunc`.Although their purpose is to convert text to links, there are significant differences in their specific presentation.Understanding these differences can help us better manage website content and improve user experience.### `urlize` filter

2025-11-09

How to convert a URL to a clickable link while limiting the display text length?

In website content operation, we often need to refer to external links in articles or descriptions, which not only need to be convenient for users to click, but sometimes also need to control the length of the displayed text to maintain the neat layout and good reading experience of the page.Long URLs displayed directly not only affect aesthetics but may also distract users' attention.AnQiCMS provides a flexible and powerful template filter that can elegantly solve this problem.Why do we need to limit the length of displayed link text?When we paste the complete URL directly in the content

2025-11-09

How to precisely set the truncation length of the URL link text for the `urlizetrunc` filter (e.g., 15 characters)?

In website content operation, we often encounter situations where it is necessary to display external links.These links may sometimes be very long, directly displaying them may not only affect the overall aesthetics of the page, but may also damage the layout, especially on mobile devices.Anq CMS knows this pain point and has provided us with a very practical template filter——`urlizetrunc`, which can help us elegantly handle these long URLs, making them clickable while also having a neat display effect.### Get to know the `urlizetrunc` filter

2025-11-09