Plugins

WordPress Tips: Turn on DoFollow for Comments, Turn off Internal Pingbacks

January 16th, 2016

The two small tips that we’ll give you today will make your WordPress better and more fair. The first tip deals with the NoFollow HTML attribute in the comments that automatically considers every person that comments a spammer. The second tip turns off the Pingbacks generated by your own WordPress. This way your WordPress won’t annoy you whenever you link to an internal article. But more importantly; the people that comment on your article will be valued a bit more, which they will surely appreciate.

WordPress Tips: Turn on DoFollow for Comments, Turn off Internal Pingbacks

Tip No. 1: Remove the NoFollow Attribute

NoFollow is colloquial for the HTML attribute rel=”nofollow”, which can be used to mark links. It makes sure that Google doesn’t use these links to calculate the linked website’s link popularity. This label for hyperlinks was created by Google in cooperation with MSN and Yahoo, on the 18th of January 2005. Even today, it’s still the cause of controversial debates among webmasters.

The Function of the NoFollow Attribute

This attribute was created to gain control over comment spam on weblogs and forums. Spammers tried over and over to increase their link popularity and page rank with links that are automatically posted in the comments. This was supposed to influence and improve the position of the website within the search results.

However, this type of fighting spam didn’t prove effective, as only manually created comment spam could be reduced. The majority of spam is generated automatically, though.

Every Person That Comments Will Be Treated as a Spammer

Before: NoFollow in the Comment Links.
Vorher: NoFollow

An undesired effect of NoFollow is that every person that comments will be treated as a spammer due to this attribute. Furthermore, many WordPress users aren’t aware of the fact that the people that comment are treated as spammers by WordPress itself. Of course, readers don’t want to see themselves being treated like that. That’s why it’s more than fair to completely remove NoFollow from your comments.

Completely Remove NoFollow From Your Comments

You need to paste the following code snippet into the functions.php of your theme:

A click on the graphic takes you to GitHub, where you can download the code.
DoFollow für die Kommentare

The Result of our Code

After: DoFollow in the Comment Links.
Nachher: DoFollow in den Kommentaren

Tip No. 2: Prevent Internal Pingbacks

Usually, pingbacks are a useful thing. They are an automatic notification that your blog article has been linked in another blog. When you link an article from another WordPress blog in your article, the owner of the linked blog will receive a pingback that appears in the comments. This works for most blog platforms and software.

Vice versa, you will receive a pingback when one of your articles is linked somewhere else. This gives you the opportunity to read the other article and comment when it makes sense to do so. In a nutshell, pingbacks support the network between bloggers.

Own Pingbacks are Created as Well

Unfortunately: Pingbacks are also created when you link one of your articles in another one of your articles. WordPress doesn’t differentiate where the pingbacks come from and treats every pingback equally. This creates the internal pingbacks, which I consider annoying as they don’t make sense.

Turning Off Internal Pingbacks

However, you can turn off internal pingbacks with a couple of lines of PHP code, so only external pingbacks will be displayed. Paste the following code into the theme’s functions.php:

Clicking the graphic takes you to GitHub, where you can download the code.
Die eigenen Pingbacks entfernen

Conclusion

With a few lines of code, you can make your WordPress significantly more fair and less annoying, and this is great. People that comment on articles should receive an added value in the form of a follow link. Internal pingbacks don’t make sense, which is why they should be deactivated.

(dpe)

Andreas Hecht is a journalist and specialist for WordPress and WordPress Security. He roams the web since its inception. He has published an ebook on WordPress Security, which you might want to take a look at.

Leave a Reply

3 Comments on "WordPress Tips: Turn on DoFollow for Comments, Turn off Internal Pingbacks"

Notify of
avatar

Sort by:   newest | oldest | most voted
Pauline
Guest
Pauline
6 months 9 days ago

Hi, I tried to insert the code into my child functions.php and it caused a parse error.

William
Guest
6 months 2 days ago

Good tips, but have a question about pingbacks. What do I need to set up to get pingbacks? Are they for all platforms or only WordPress?

Jay
Guest
4 months 7 days ago

Useful tips here. Although I have seen an increase of spam comments whenever I’ve disabled nofollow.

I actually found your article because I was looking for a way to disable nofollow on my own comments on my blog. Do you know, or can you point me int the direction, of how I can do this?

To me it doesn’t make sense that when I reply to a comment, my author link points to my own homepage, which is also being nofollowed by default.

wpDiscuz