In website operation, friendship links are an important means to enhance website authority and obtain external traffic.However, not all friendship links should pass on weight.rel="nofollow"Properties become particularly important.nofollowThe attribute tells the search engine not to pass on the ranking weight of the current page to the target page, which is very useful when linking to some non-core content, ad pages, or third-party websites that cannot be fully trusted, and can effectively avoid SEO risks caused by low-quality links.
AnQi CMS as a fully functional content management system, fully considers this need. The system has built-in convenient link management functions and supports flexible control in templatesnofollowAdding properties, allowing you to easily implement a refined link management strategy.
Understanding the importance of friend links and the Nofollow attribute.
Friendship links were a symbol of mutual benefit between websites in the early days of the internet, and could increase relevance and traffic between websites.From an SEO perspective, high-quality external links can bring valuable "link votes" to a website, thereby improving the website's ranking in search engine results.
However, if the quality of the website pointed to by the friendship link is not high, the content is irrelevant, or even exists fraudulent behavior, then these links may反而 have a negative impact on your website.rel="nofollow"The appearance of properties is to solve this problem. By adding specific friendship linksnofollowYou can explicitly tell the search engine that these links do not represent any recommendation or endorsement by this website, thus avoiding unnecessary SEO risks and maintaining the quality and authority of your website links.
Manage friend links in Anqi CMS backend
AnQi CMS provides an intuitive and easy-to-use backend interface for managing友情链接 friendship links.You can find the "Friend Links" entry in the function management module on the backend.Here, you can add new links of friendship, edit existing links, including link names, URL addresses, notes, and other information.
When adding or editing a friend link, the system usually provides an option for you to decide whether to add the linknofollowProperty. Check this option and the background will mark the link asnofollowThis tag is reflected in the specific field when obtaining friend link data in the template, allowing us to dynamically generate links withnofollowthe attribute.
Retrieve the friendship link in the template and apply the Nofollow attribute
Retrieve the friendship link data in the Anqi CMS template and add it according to the backend settingsnofollowAttribute, we need to use the system built-inlinkListtag. This tag can help us traverse all the configured friend links.
First, in your template file (for examplefooter.htmlor use the template part that contains friend links inlinkListLabel to get the list of friendship links. Usually, we will assign the obtained link data to a variable, such asfriendLinks.
Next, through aforto loop throughfriendLinksEach link item. Each link item (usually in a loop) isitemrepresented) and includes the link title, URL address, as well as a key boolean field.Nofollow.Nofollowthe value of the field is1Indicates that the background is checkednofollowwith a value of0Indicates that it is not checked.
We can make use of thisNofollowfield to generate the link,<a>Add conditionally when labelingrel="nofollow"Property. At the same time, in order to improve user experience and security, we usually also add to the friendship link.target="_blank"Property, to open in a new window or new tab. In this case, **the practice is to add simultaneouslyrel="noopener noreferrer"to avoid potential security vulnerabilities.
This is an example of the template code for implementing this function:
{% linkList friendLinks %}
{% if friendLinks %}
<div class="friend-links">
<h4>友情链接</h4>
<ul>
{% for item in friendLinks %}
<li>
<a href="{{item.Link}}" {% if item.Nofollow == 1 %} rel="nofollow noopener noreferrer"{% else %} rel="noopener noreferrer"{% endif %} target="_blank">{{item.Title}}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endlinkList %}
In this code block:
{% linkList friendLinks %}Get all the background friend links and store them infriendLinksthe variable.{% if friendLinks %}Check if there is a friendship link existing, to avoid displaying an empty friendship link area when there are no links.{% for item in friendLinks %}Loop through each friendship link.href="{{item.Link}}"Set the link URL.{% if item.Nofollow == 1 %} rel="nofollow noopener noreferrer"{% else %} rel="noopener noreferrer"{% endif %}This is the core logic. Ifitem.NofollowThe value is1Add ifrel="nofollow noopener noreferrer"Otherwise, only addrel="noopener noreferrer"To maintain the safety**practice of opening the link in a new window.target="_blank"Open the link in a new tab.{{item.Title}}Display the link's title text.
By making such settings, you can ensure that each friend link is controlled precisely according to your SEO strategy, both utilizing the advantages of friend links and avoiding potential risks.
**Practice and Precautions
- Regularly review the link:Even if used
nofollowIt is also recommended to regularly review the quality and relevance of the link. Over time, some websites may change their content or operational strategies. - Use with caution.
nofollow:Do not add for truly high-quality, highly relevant, and trusted friendship links to your websitenofollowIt is usually a better choice because it can pass on weight, benefiting both parties' SEO.nofollow主要用于thoseyoudon'twanttopassweightortoallytrustedinformationlinks. - Noteglobalsettings:In addition to the friendship link, the Anqi CMS content settings also provide the function of 'whether to automatically filter external links'. If this function is enabled, the system will automatically add external links to all the content of the article.
rel="nofollow"Properties. This relates to the friend link'snofollowThere are two different management dimensions, but both serve the SEO health of the website.
Provided by AnQi CMSlinkListtags and theirNofollowField, combined with flexible template syntax, allows you to easily implement precise friendship link management on the front end.By mastering these features, you can better control the SEO performance of your website and provide solid technical support for your content operation strategy.
Frequently Asked Questions (FAQ)
1. The friend link'snofollowWill the property affect my website ranking?
nofollowThe attribute itself will not directly negatively impact your website's ranking.Its main function is to inform the search engine not to pass the "weight" of the current page to the target page.nofollowThe website linked is to be considered. Use reasonably.nofollowHelp you avoid the negative impact that may arise from linking to low-quality or irrelevant websites, thereby indirectly maintaining the SEO health of your website.
2. Besides the friend link, where else does AnqiCMS automatically add?nofollow?Besides manually setting in the background friend link management interface?nofollowOutside of options, AnqiCMS also provides a feature in the content settings called "Whether to automatically filter external links". If you enable this feature in the background, the system will automatically add external links to the content of articles, pages, and other content detected in the main text.rel="nofollow"Property. This is a global setting designed to prevent weight loss or SEO risk caused by the appearance of non-official or uncontrollable external links in the article content.
3. I have already added the friend link and set it up in the backgroundnofollowbut it does not show up in the front-end template ornofollowthe property is not effective, what could be the reason?If this situation occurs, you can check from the following aspects:
- Check the template file:Ensure that your template file uses correctly:
{% linkList friendLinks %}and{% for item in friendLinks %}Loop to retrieve and traverse the friendship link data. - Code logic confirmation:Carefully check the judgment in the template
item.Nofollow == 1whether the conditional statement is written correctly, as well asrel="nofollow"whether the attribute is in<a>correctly added in the tag. - Cache problem:After modifying the template or background settings, be sure to clear the system cache of AnqiCMS and the local cache of your browser to ensure that the latest content is loaded. You can find the "Update Cache" feature in the AnqiCMS backend.