Nov 5, 2007
My Digital Life Editorial Team

Add NoFollow Relationship to WordPress Blogroll to Increase PageRank

Blogroll in WordPress displays a list of blogger’s favorite blogs in the sidebar of their blog. Blogroll provides links to external blogs in easily managed way. Some webmasters also use Blogroll to display backlinks to other external sites for link exchange or link buying. In reality, links added by WordPress blogroll is actually useless textlinks that are discouraged by Google and most other search engines, especially when the links are paid off or in exchange for a link back.

Thus, linking blindly to external sites MAY (if your blog or website has been caught and labeled by Google machine algorithm as participate in illegal link scheme to boost page rank, although you’re not) severaly negatively discount your own site PageRank (PR) value, or worst, affects your site ranking in search engine results positioning. To avoid any potential backlash from the external links in Blogroll, it’s best to add rel=”nofollow” attribute to the <a> tag in Blogroll as suggested by Google so that no PageRank value is passed through the links, and the links won’t penalize your site ranking.

To automatically add and attach rel=”nofollow” attribute to each and every outgoing links in Blogroll, we need to hack through WordPress core source code file. Go to wp-includes/ directory of your blog root folder, then edit the bookmark-template.php file with any text editor such as vi.

Locate the following line (it’s at line 48 for WordPress version 2.3.1):

$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';

Append the rel=”nofollow” to the line by changing the line to the following:

$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. ' rel="nofollow">';

Save the file when done.

All Blogroll links in blog sidebar will now have rel=”nofollow” attribute tagged with the link, which force search engine spiders and crawlers to stop following the links. Adding the nofollow attribute may not change the fortune of your site immediately, but will surely reduce the risks of been penalized by search engines for excessive linking.

Related posts:

  1. Technorati Incoming Links Plugin for WordPress
  2. Replace Google Blog Search with Technorati for Incoming Links in Dashboard of WordPress
  3. 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin
  4. Integrate WordPress including Comments with bbPress Forum using bbSync
  5. Free Download: WordPress 2.1 with Autosave and Tabbed Editor

22 Comments

  • Good tip to add nofollow without plugins! Thanks

  • At what point would outgoink links have an effect. It is sometimes unavoidable to reciprocate to get a relevant link and blocking this link is not fair or ethical.

  • Thanks for the info. Better and easier then adding the plugin. Simple copy and paste. Thanks, I added it to my blog.

  • Everyone, I have discovered this hack no longer works in WP 2.7 – and fortunately someone developed a plugin to bypass this all together. The plugin allows you to pick and choose which blogroll links you want to add a NOFOLLOW tag to. You can read more about and download the plugin at this link:

    http://wordpress.org/extend/plugins/nofollow-link…

  • Justin Cook had a perfect solution for adding nofollow attribute to any chosen link. But thank you for this post which lead me to there.

    And your solution is good too, but just too overwhelmed. Some blogroll links must be followed, such as your own other blogs and sites.

  • Lo mejor, y para hacerlo selectivo a ciertos enlaces del blogroll es utilizar esto:

    <code>

    <input class="valinp" type="checkbox" name="follow" value="nofollow" id="nofollow" />

    </code>

    De esa forma en cada enlace del blogroll tendremos una casilla por si queremos marcar rel=nofollow

    en la linea 258 del wp-admin/edit-link-form.php

    Saludos.

  • It's not a good idea to hack to the core of WordPress because it maybe causes "hidden" errors when your website runs, and you have to do it once when upgrading website.

    I recommend to use the the Nofollow Blogroll here: http://wordpress.org/extend/plugins/blogroll-nofo…
    It does everything automatically for you without any change in core code of WP.

  • [...] Add Nofollow Relationship To WordPress Blogroll To Increase Pagerank [...]

  • Afortunadamente el pagerank es sólo unas de las cosas a tener en cuenta a la hora de proyectar un sitio web.

  • That's a great suggestion and something everyone should do, but it's also useful to have links to those sites within your content as then it's related to the blog. But, I'm using the Blogroll Links plugin in my wordpress to still give me a page of links to these sites, and not harm my overall pagerank.

  • I meant to say you can now

  • You can not get a proper plugin for this rather than hacking core files.

    wordpress blogroll add nofollow.

  • Awesome tips man… thanks so much. Ideally though, it would be better if in the WP-Plugin format so that you don't have to go back and update every time you have to update to the latest version of WP

  • Takker og bukker:) flott tips!

  • Answer English es una página web que ofrece cursos de inglés en Inglaterra, otorgándole a los alumnos la oportunidad de aprender inglés en situaciones de la vida real.

  • [...] provided me with this nofollow relationship to wordpress blogroll solution from mydigitallife.info. You have to edit a file, nothing complicated, this will add the [...]

  • [...] looked around and found this blog entry which led me to the correct template file but suggests [...]

  • Boa Dica! Obrigado!

  • [...] would add the “nofollow” in the list of rel attributes. You could also try this one by My Digital Life and see if it works for you [...]

  • I found a hack how to do it properly so you can follow or nofollow each individual link in your blogroll.

    Hack

    WP Blogroll to nofollow or follow

    Enjoy,

    Igor

  • I implemented the hack, but I find it really strange on WordPress part that under the BlogRoll Managment Tab there is a rel form field in the link edit mode, but it does not work.

    Looks like it has been disabled intentionally by WP, to give them link juice, when the blog is first born…

    Do you know how to enable this functunality, to be able to assign rel value in the BMT link edit mode?

    Thanks,


    <a href="
    http://www.igorthetroll.com/blog/” target=”_blank”>www.igorthetroll.com/blog/

  • How could I implement this for links that are in my posts???

    I know I could do it by hand, but I also have other writers that probably wouldn't go to that trouble.

Leave a comment

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Subscribe

Free email subscriptions
Get latest updates in email for free:

Translate This Page