Making RSS Feed Links no-follow in WordPress Sidebar
If you use the RSS widget in WordPress to bring in a Feed with multiple external links that go to external content and that update in the sidebar. You may notice that all these links have the attribute set to ‘follow‘ by default.
This can be detrimental to your page’s SEO status in terms of page authority and distribution of PageRank – the best thing is to switch these links to the attribute of ‘no-follow’. This is done by editing one of the core WordPress files, the only thing you have to remember is to check when you upgrade WordPress that the change is not overwritten in which case you will have to apply the change again.
Open default-widgets.php in the document root under wp-includes/
public_html/wp-includes/default-widgets.php
The link attribute we need to add in 3 times is:
rel='nofollow'
Either replace the whole line or just add in where it is positioned below:
Line 768 needs it twice
$title = "<a class='rsswidget' href='$url' rel='nofollow' title='" . esc_attr__( 'Syndicate this content' ) ."'><img style='border:0' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' rel='nofollow' title='$desc'>$title</a>";
Line 886 needs one occurrence
echo "<li><a class='rsswidget' href='$link' rel='nofollow' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";