How does Anqi CMS handle and display external links in content, such as adding the `rel="nofollow"` attribute?

Calendar 👁️ 68

In the operation of a website, the management of external links is an indispensable part of content strategy and search engine optimization (SEO). Particularly likerel="nofollow"Such an attribute, it tells the search engine not to pass link weight to the linked page, which is crucial for managing the link health of the website and avoiding potential SEO risks. AnQiCMS (AnQiCMS) provides various ways to handle and display external links in content, including automatic additionrel="nofollow"Properties, allowing website administrators to flexibly control the behavior of these links.

Background content settings: globally control external link properties.

AnQi CMS provides a global option in the background content settings to manage external links in the content. This setting is located inBackend settings-u003eContent settingsAn area where a key option isDo you want to automatically filter external links.

This option has a direct impact on external links contained in the content:

  • Select “Auto-filter external links”If we check and enable this option, the system will automatically detect and remove all external links from the content at the time of publishing.This means that any links pointing to external domains will not be retained in the final published content.This is usually applicable to those who wish to strictly control the purity of content or avoid any loss of link weight on websites.
  • Select “Do not filter external links”If we do not check or disable this option, the system will retain all external links in the content. But more importantly, Anqi CMS will intelligently manage these retained external linksAutomatically addedrel="nofollow"property.This mechanism is very practical, it allows us to show external resources to users while also indicating to search engines that we do not endorse the quality of these external links, thus avoiding passing on our own link weight.

Through this global setting, we can uniformly handle external links in the content based on the overall operation strategy of the website, whether to completely remove or retain and addnofollowProperty.

Template filter: Dynamically process links in content

In addition to the global settings in the background, Anqi CMS also provides fine-grained control at the template level, especially byurlizeandurlizetruncA filter to process unformatted URLs in text.

Sometimes, our article content may contain URLs or email addresses in plain text, such aswww.example.comor[email protected]And these contents we hope can be automatically converted into clickable hyperlinks. At this time, you can use the template to do so.urlizeorurlizetruncfilter.

  • urlizeFilterThis filter can recognize URLs and email addresses in text and automatically convert them into clickable links with<a>. It is worth noting that Anqi CMS willAutomatically for these byurlizeAdd the generated link plusrel="nofollow"propertyThis is a very convenient feature for websites that need to display a large amount of third-party information sources but do not want to pass SEO weight to these sources.
  • urlizetruncFilter: Function andurlizeSimilar, but it allows us to specify the display length of the link text. When the original URL is too long,urlizetruncit will truncate it and display...ending, while retaining the complete link function. Similarly, these will alsourlizetrunclinks generated willautomatically haverel="nofollow"property.

These filters are particularly important when processing user submitted content, comments, or any other dynamic text that may contain unformatted URLs, as they ensure link availability while also considering SEO practices.

Code example (nofollow will be automatically recognized and added in the content): Assuming your content variablearticleContentContains plain text URL, you can use it in the template like this:

{# 假设 articleContent 包含纯文本 URL,如 "访问我们的网站 www.anqicms.com 获取更多信息。" #}
<p>{{ articleContent|urlize|safe }}</p>

After processing, the output HTML to the page might be something like:

<p>访问我们的网站 <a href="http://www.anqicms.com" rel="nofollow">www.anqicms.com</a> 获取更多信息。</p>

(Please note|safeThe filter is to ensure that HTML tags can be parsed correctly rather than being escaped.)

Additional control of the友情链接

For the specific type of external link such as "friendship link", AnQi CMS also provides a more intuitive control method. In the friendship link management function, each friendship link can be individually set to add or notrel="nofollow"Property.

When we uselinkListWhen calling the friend link in the template, you can decide whether to render according to each link'sNofollowattribute.rel="nofollow"This means we can add友情links without weight for those who trust each other and want to pass on the weightnofollowand for those who do not need to pass on the weight or have not fully trusted yet, we add the linksnofollowRealized a more flexible strategy.

Code example (friend links can be added with nofollow as needed):

{% linkList friendLinks %}
{% if friendLinks %}
<div>
    <span>友情链接:</span>
    {% for item in friendLinks %}
    <a href="{{item.Link}}" {% if item.Nofollow == 1 %} rel="nofollow"{% endif %} target="_blank">{{item.Title}}</a>
    {% endfor %}
</div>
{% endif %}
{% endlinkList %}

In this example, only when the background has explicitly checked a friend linkNofollowOption (i.e.,item.NofollowWith1then the link will be displayedrel="nofollow".

Whyrel="nofollow"So important?

rel="nofollow"The attribute plays a key role in the operation of the website, mainly solving the following problems:

  1. Manage link weightTell the search engine not to pass the 'link weight' (or 'link asset') of the current page to the target page.This helps us control the SEO effect of the website more accurately, avoiding passing valuable weight to irrelevant or low-quality external sites.
  2. Adhere to search engine guidelinesFor content that is not trusted, paid links, user-generated content (UGC) or sponsored content, search engines usually recommend usingnofollow(or more specificugc/sponsoredThis attribute helps avoid being penalized by search engines due to improper links.
  3. Prevent spam comments and contentIn the comment section or forum and other user-generated content areas, usenofollowCan effectively reduce the motivation of spam information publishers to post low-quality content to obtain links.
  4. Enhance the credibility of content: When referencing external materials, if you cannot fully guarantee the long-term validity or credibility of their content, usenofollowis a responsible practice, providing information reference while avoiding potential liabilities.

In summary, Anqi CMS provides a comprehensive and flexible external link management solution through global content settings in the background, intelligent filters in the templates, and independent control for friend links, ensuring that the website can maintain good SEO health and content control while providing rich content.


Frequently Asked Questions (FAQ)

1. The setting of 'Whether to automatically filter external links' and the priority of the filter in the templateurlizeWhich one is higher?

The setting of whether to automatically filter external links in the background is global and has the highest priority. If this option is set to 'Automatically filter external links', then all external links in the content (including those generated byurlizeThe links generated by the filter will be removed,urlizeThe filter will also be unable to create clickable external links. Only when you select "Do not filter external links,"urlizeThe filter will become effective and will automatically add to the external links it identifies and convertsrel="nofollow"Property.

2. Can I add attributes to external links exceptrel="nofollow"other than thatrelCan I? For exampleugcorsponsored.

The core feature of AnQi CMS automatically adds external links by defaultrel="nofollow"Currently, the systemdoes not provide directlyIt can be added automatically in the background or through simple configurationugcorsponsoredetc., more detailed settingsrelProperty.If you need to use these properties, you may need to customize them at the template level or manually add them through the HTML source code mode during content editing.nofollowControl, if you need otherrelProperties, the same needs further processing at the template level.

3. Why are my external links not added automaticallyrel="nofollow"?

This usually has several reasons:

  • The background "Content Settings" is not enabled "Do not filter external linksPlease check:Backend settings-u003eContent settingsIn,“Is the 'Auto-filter external links' option checked? If the 'Auto-filter external links' option is selected, the link will be removed directly instead of added.”nofollow. To add.nofollowYou need to make sure it is not checked (i.e., select 'Do not filter external links').
  • The link is not a plain text URL, it has not been processed byurlizeFiltering processIf the link is manually added through the content editor (rich text editor) and the option 'Do not filter external links' is selected in the background settings, AnQi CMS will automatically recognize and add itnofollowIf your link is in another form, such as through custom fields or certain plugins, you may need to ensure that they are correctly identified or processedurlizeby filters.
  • Set friend links separately: Each friend link has an independentNofollowcheckbox. If a friend link is notnofollow, please check the edit page of the link and confirmNofollowWhether the option has been checked.

Related articles

How to call the backend custom Json-LD structured data in AnQi CMS template and display it?

Today with the rich content on websites, how to make search engines accurately understand web content and display it in a more user-friendly manner has become a key link in website operation.Structured data (usually in Json-LD format) is an important tool to achieve this goal.By embedding Json-LD code in the page, we can provide standardized information for search engines about various content such as articles, products, and reviews, thereby having the opportunity to obtain richer search result displays, which is what we commonly refer to as 'rich snippets' or 'rich results'

2025-11-09

How to implement complex parameter filtering conditions for the dynamic display of the `archiveFilters` tag on the front end?

In website content operation, providing users with flexible and efficient filtering functions is an important factor in improving user experience and helping users quickly locate the information they need.AnQiCMS (AnQiCMS) knows this, making it easy to dynamically display complex parameter filtering conditions on the front end through its powerful template tag system, especially the `archiveFilters` tag.### Core Function and Implementation Principle The core function of the `archiveFilters` tag is to use the custom fields of the content model

2025-11-09

How to implement the sorting display of article list by views (views desc) in AnQi CMS?

How to make a hot article on the website stand out quickly and attract more visitors' attention?This can effectively enhance user experience and is also the key to optimizing content strategy and guiding traffic.For users of AnQiCMS, it is a very practical and easy-to-operate feature to display article lists sorted by page views.The powerful template tag system of AnQi CMS allows you to easily display the most popular content on your website to users.### Core Feature Revelation: Utilize `archiveList`

2025-11-09

How to display the language switch options and hreflang tags on Anqi CMS?

Today, providing multilingual support for websites has become a basic requirement for expanding the market and serving users in different regions.AnQiCMS (AnQiCMS) is fully aware of this need, integrating powerful multilingual functionality to allow website administrators to easily achieve content internationalization.This article will discuss in detail how to effectively display language switch options on AnQiCMS sites and correctly set the `hreflang` tag to optimize the internationalization recognition of search engines.Understanding AnQiCMS' multilingual capabilities AnQiCMS is an efficient

2025-11-09

How to correctly display and load images on the front-end page after the website enables Webp image format?

In website operation, the speed of image loading is crucial for user experience and Search Engine Optimization (SEO).WebP is a modern image format that, with its excellent compression performance, significantly reduces file size while maintaining image quality, thus greatly enhancing website loading speed.AnQiCMS (AnQiCMS) fully understands this and has built-in support for WebP image format in its system, making it easy for users to turn it on and benefit from it.However, after enabling the WebP feature, many users may be confused: how can the front-end page correctly display and load these WebP images

2025-11-09

What basic conventions should the template files of Anqi CMS follow to correctly display the content structure?

In Anqi CMS, template files are the basis for presenting website content.It is not just a simple HTML file, but a set of blueprints that follow specific conventions and rules. Only by accurately adhering to these conventions can the system correctly parse, render, and display the structure of your website content.Understanding these basic conventions can help you customize and manage your website more efficiently, ensuring that content is presented in the way you expect to visitors.### The storage location and basic format of the template file Firstly, Anqi CMS has clear requirements for the storage location of template files

2025-11-09

How to debug template display issues in AnQi CMS, such as using the `dump` filter to print variables?

Aqy CMS template debugging: Use the `dump` filter to easily locate display problems When building a website with Aqy CMS, we sometimes encounter situations where the template content is not displayed as expected.For example, you expect to display the article title at a certain location, but it turns out to be blank;Or the list data is incomplete, the content of a custom field is always unable to be presented correctly.These issues often confuse people, because it is clear that data has been set in the background, but for some reason the front-end does not display.If one can 'penetrate' the real content of the variables in the template, it will undoubtedly greatly improve the efficiency of solving such problems

2025-11-09

How to display the navigation list configured in AnQi CMS and support multi-level dropdown menus?

The website navigation acts as a 'compass' for users visiting the website, and its clarity and ease of use directly affect user experience and the efficiency of information acquisition.For a corporate website, a well-structured navigation system that supports multi-level dropdowns is essential.AnQiCMS (AnQiCMS) understands this and provides an intuitive and powerful backend configuration function, allowing you to easily build a navigation menu with a sense of hierarchy.Next, we will explore how to configure the navigation list in the Anqi CMS backend and make it perfectly present multi-level dropdown effects on the front end.--- ### Step 1

2025-11-09