Append nofollow attribute to untrusted links

Allowing users to submit comments for your website content can be a valuable source of feedback and also promote discussions. Comments, however, should be treated carefully to avoid undesired content appearing on your website or spam attacks generating extra cleanup work for content editors and forum moderators.

Appending "nofollow" attribute to links in untrusted content

One important aspect where Sitefinity CMS lets you control comments behavior is in determining whether search engines should crawl hyperlinks in untrusted content. Untrusted content represents comments posted by site visitors. For example, comments for News, Blogs, Forum posts and so on. This can help you prevent any undesired SEO ranking "leak" from your domain to other domains.

To control this behavior you go to Administration » Settings » Advanced. In the left pane, expand System and click SEO and OpenGraph properties. There are 2 properties that you can configure:

  • Append "nofollow" attribute to links in untrusted content
    By default this property is checked (enabled) for all new projects created with Sitefinity CMS versions 11.1 and later. When the property is enabled Sitefinity will append a rel="nofollow" attribute to any hyperlinks present in untrusted content. The rel tag has an explicit impact on the search engine robots crawling behavior, and setting it to nofollow guarantees that these links will have no value when crawled.     
  • Trusted domains
    This property lets you specify a comma separated list of domains that Sitefinity CMS should trust. Domains specified in the Trusted domain property will be skipped when screening untrusted content thus any links originating from them will not get a rel="nofollow" appended. For example if you want to promote your products, which are listed on another website, you can add this website's domain in the Trusted domains list.

NOTE: Projects created with Sitefinity CMS versions older than 11.1 will have the Append "nofollow" attribute to links in untrusted content property set to true after an upgrade to 11.1 or newer version. New comments posted on the site will get screened for untrusted links. If any comments already exist in such projects prior to the upgrade, their content will not be automatically processed. You need to republish the comments to have rel="nofollow" applied to the links from untrusted domains. You can do that through the Sitefinity CMS administrative UI by going to Content » Comments.

For more information about the mechanisms Sitefinity CMS exposes to control the behavior of user comments see Administration: Enable comments and ratings. Developers can also refer to For developers: Comments events for a list of extensibility points allowing custom implementation and integration with spam protection services.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.


Was this article helpful?