In this tutorial, you’ll learn how to automatically add rel=”nofollow” to all your Blogroll links. WordPress Blogroll is an amazing feature in WordPress CMS. It lets you to share your favorite blogs and websites on your blog. Most of the time, webmasters use this feature to link-exchange with other websites by showing Blogroll as a widget in sidebar or footer bar.
This feature is amazing as well as damaging from SEO (Search Engine Optimization) point of view. Linking blindly to other websites without rel=”nofollow” attribute in anchor tag can put your PR (Page Rank) down. If there is no rel=”nofollow” in anchor, then the valuable link juices from your website will flow to those links, effectively making your own links on the page less valuable.
When you add rel=”nofollow” attribute in anchor tag i.e. <a> while linking to other websites, this tells the search engines like Google, Yahoo, Bing etc. that the link is not so valuable. Search engines take rel=”nofollow” seriously and ignore those links. As the name suggests nofollow means the search engines would not follow those links from your page.
How to automatically apply rel=”nofollow” to Blogroll Links
This trick will automatically make all your Blogroll links on your WordPress blog, equipped with rel=”nofollow”. Let’s learn how to apply this nofollow relationship in very easy steps.
The solution is as simple as 123. Follow these steps carefully :
- Access your website’s FTP account by logging into it and download the file bookmark-template.php present in wp-includes folder.
- Open bookmark-template.php file in your favorite text editor. In line number 99 (My WordPress Version is 3.4.1), look for the following line. Remember that the line number can be different if you are using some other version.
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target . '>';
- Replace this line with the following line.
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target . ' rel="nofollow">';
- Save the file.
- Upload the modified file into wp-includes folder by overwriting the older file.
provides you here, the screenshots of the original and modified bookmark-template.php file. Look at the images demonstration below to easily follow this important SEO tutorial.