Using NoFollow Makes A Lot of Sense
A lot of bloggers have been up in arms about WordPress forcing them to use nofollow on comment hyperlinks. There are a number of plugins that turn follow back on. This post by John H. Gohde, however, has nothing to do with nofollow hyperlinks in comments. Using NoFollow selectively throughout your blog can make a lot of sense, when done correctly.
The Add Link Attribute Plugin
There are a lot of hyperlinks on your blog that make absolutely no sense to have Google crawl them, such as the Register and Login page. A few of them can be manually fixed, such as the trackback hyperlinks, by simply inserting rel=”nofollow” in your code on the Single Post (single.php) template. But anything involving a WordPress or plugin function, is next to impossible to add a nofollow tag to.
This is where the Add Link Attribute plugin, version 0.3, by Kaf Oseo comes to the rescue. It is a little known plugin that gets the nofollow job done correctly.
NoFollow Will Improve Your Crawability
Selectively using nofollow will improve the crawlability of your blog. You never ever want to give Google a hyperlink that ends up in a dead end. For example, the print page plugin that was recently reviewed on this blog creates dead end pages because the plugin itself automatically adds a noindex, nofollow meta tag to them.
Customizing Your Sidebars
Some types of coding is usually located in one of your sidebars; such as sidebar.php, leftbar.php, or sidebar2.php.
The following rather complex PHP code will prevent Google from crawling the print pages on your blog.
<div class="printer"><?php add_link_attr(‘print_link’,”,‘target="_blank" rel="nofollow"’); ?></div>
<?php } ?>
And, here is how you can prevent Google from crawling your login and Register page. The correct coding is more complex than most beginners would probably figure out on their own.
<?php if (function_exists(‘add_link_attr’)) { ?>
<li><?php add_link_attr(‘wp_register’, ”,‘rel="nofollow"’); ?></li>
<li><?php add_link_attr(‘wp_loginout’, ”,‘rel="nofollow"’); ?></li>
<?php } else { ?>
<li><?php wp_register(); ?></li>
<li><?php wp_loginout(); ?></li>
<?php } ?>
</ul>
Here, is how you can list out Categories on a sidebar.
<?php add_link_attr(‘wp_list_cats’,‘optioncount=1′,‘rel="nofollow"’); ?>
<?php } ?>
And, the ever popluar tag cloud would take this type of coding.
<?php add_link_attr(‘wp_tag_cloud’,‘number=40&smallest=10&largest=20′,‘rel="nofollow"’); ?>
<?php } ?>
Customizing Your Center Column
Also, if you are using teasers on your home or post page, then most WordPress Themes will have Google crawl basically the same post three different ways: first by Post Title, next by the Read More link, and again with the Comment link. This makes absolutely no sense. The following coding snippets that are edited in the Main Index Template (index.php) is how you can avoid having Google crawl the same post more than once.
First comes the Read More teaser coding.
<?php add_link_attr(‘the_content’,‘Read More …’,‘rel="nofollow"’); ?>
<?php } else { ?>
<?php the_content(‘Read More …’); ?>
<?php } ?>
And, here is the coding to cause Google to skip crawling your comments.
missing code goes here
Links to your categories and tags are probably all over the place on your blog. Why have Google follow the same categories and tags over and over again in an endless maze? John H. Gohde would advise that you add nofollow to most of your category and tags links, except for those on your posts. A good place to start would be in the Main Index (index.php) Template followed by your category, tag, and archive templates. In other words, have Google crawl your categories and tags just on your single post page. Everywhere else Google should be blocked from crawling your categories and tags. This approach will radically cut back on the number of hyperlinks that Google will crawl on each page of your blog.
The following coding will do the trick for categories.
<?php add_link_attr(‘comments_popup_link’, array(__(‘Comments’), __(‘1 Comment’), __(‘% Comments’), ‘commentslink’, __(‘Comments off’)),‘rel="nofollow"’); ?>
<?php } else { ?>
<?php comments_popup_link(__(‘Comments’), __(‘1 Comment’), __(‘% Comments’), ‘commentslink’, __(‘Comments off’)); ?>
<?php } ?>
And, here is the coding for tags.
<?php add_link_attr(‘the_category’,‘ • ‘,‘rel="nofollow"’); ?>
<?php } ?>
Nofollow can Increase The Crawlability of Your Blog
By the correct use of nofollow on your blog, all your categories and tags will be followed, and you will improve your overall Web site crawlability by not sending Google to dead ends and on an endless circular maze of hyperlinks. No longer bogged down by going in endless circles, Google will be able to crawl each of your webpages faster. Thus, increasing the probability that more of your posts and pages will be indexed faster.