Profile picture for user admin
Daniel Sipos
31 Oct 2012

Have you ever wondered how you can automatically add the rel="nofollow" attribute to all the links embedded in the comments users post on your Drupal website? It is quite simple really, but unintuitive to find if you don't know where to look.

You have to go to the Text Formats configuration page and edit the settings of the text format you use for users that can post comments on your website. There, you need to check the box Limit allowed HTML tags and below a new section appears that allows you to select a number of html tags users are allowed to include in their comments. And there you can find the checkbox Add rel="nofollow" to all links. Ticking this will make sure that if users link to something in their comments, search engine robots will not value those links in their rank building.

This is a handy tool to make sure that spammy links do not have a reason to infiltrate your comments, especially if you have anonymous users posting comments. The rel tag is about the only tag found in the anchor search engine robots listen to. Using the rel tag therefore makes sure the value of those links in search engine ranking is relatively null.

Hope this helps.

Profile picture for user admin

Daniel Sipos

CEO @ Web Omelette

Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.

Contact us

Add new comment