Nofollow tag cloud for WordPress
I love the tag cloud widget that comes with WordPress. There’s just one thing that bugs me: it floods every post or page with lots of internal links that a search engine crawler will follow. The SEO community says that this could be seen as some sort of artificial link generation by a search engine and eventually lead to a disadvantage in a site’s SERP ranking. Having fewer internal links on a post should also pass a higher page rank to linked posts as well. See this post from Matt Cutts detailing how it makes sense to nofollow non-essential internal links:
There’s no stigma to using nofollow, even on your own internal links; for Google, nofollow’ed links are dropped out of our link graph; we don’t even use such links for discovery. By the way, the nofollow meta tag does that same thing, but at a page level.
Unfortunately, it’s not possible to instruct the built-in WordPress tag cloud sidebar widget to use nofollow tags for the generated links.
I enhanced the tag-cloud widget with a configurable nofollow-enhancment and I’m trying to submit this to the WordPress repository. The default setting will not insert the nofollow tag. The option has to be checked in the tag cloud widget’s configuration area. You’ll find my WordPress Trac ticket here in case you want to vote for it and/or check the current state. It probably will take a couple of months until the changes are tested and make it into an official WordPress release (if at all).
Follow-up:
Since my change request has been denied, a smart head provided a pretty sleek solution to add the nofollow tag in the tag cloud widget by using an API filter. Just add this code at the end of your wp-config.php file and you’re all set.
add_filter( 'wp_generate_tag_cloud', 'my_nofollow_tag_cloud_example' );
function my_nofollow_tag_cloud_example( $text ) {
return preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text);
}
You may also be interested to read:
- How-to: Change all internal WordPress links from www to non-www
I recently changed my website’s WordPress URL from its www-version to the non www-version: www.trick77.com changed to just trick77.com. As this may will confuse search... - WordPress Plugin/Widget for Must Read Posts
Today, I was looking for a simple WordPress widget that allows me to statically display links to certain posts in the sidebar. I could have... - Watch page load times when using WordPress social bookmark plugins
I’d like to make my blog posts more share-friendly by adding buttons at the end of every post for the most popular bookmarking/sharing web sites...
Comments(2)









Unfortunately, my change request has been denied by the WordPress repository managers stating that it is too complicated for the average user to know what a nofollow setting does. I have to agree with that.
[...] started looking for a solution and find this one. A very interesting solution. Jan has made a patch to edit the Tag cloud widget to add an option [...]