Are you serious about search engine optimization (SEO) of your Wordpress blog? Then you might want to pay attention to the details and squash yet another of Wordpress’ SEO-bugs. Read the instructions in this article to fix it - quick ‘n’ easy!
If you want a page to rank well in Google you need to have descriptive keywords in the anchor texts of backlinks (both internal and external) pointing to that page. What you don’t want: too many words in your link texts that are not relevant to the content of the page.
Yes, it’s important to have a natural word pattern including relevant keywords in your anchor text, but it makes absolutely no sense to have ‘read more‘ links pointing to every post of your blog! Now that’s exactly what most Wordpress index pages do. They link to posts using two separate links, one containing the post’s title and another one with ‘read more‘ or something similar.
Of course you need the ‘read more‘ link in order to display excerpts from your posts. But you don’t want Google or any other search engine to include those links in their ranking algorithms!
Luckily fixing this is really easy, simply have Wordpress add the nofollow link attribute to the excerpt links. You won’t observe massive improvements in your rankings (if any!), but since it’s so easy to fix, it’s well worth the 2 minutes it takes to edit a single line in a Wordpress file. Here’s how you do it:
Wordpress 2.3
Changes to the file /wp-includes/post-template.php in function ‘get_the_content‘ on line 124 as highlighted:
$output .= ‘ <a href=”‘. get_permalink() . “#more-$id\” class=\”more-link\” rel=\”nofollow\”>$more_link_text</a>”;
Wordpress 2.1 & 2.2
Changes to the file /wp-includes/post-template.php in function ‘get_the_content‘ on line 102 as highlighted:
$output .= ‘ <a href=”‘. get_permalink() . “#more-$id\” class=\”more-link\” rel=\”nofollow\”>$more_link_text</a>”;
Wordpress 2.0
Changes to the file /wp-includes/template-functions-post.php in function ‘get_the_content‘ on line 92 as highlighted:
$output .= ‘ <a href=”‘. get_permalink() . “#more-$id\” rel=\”nofollow\”>$more_link_text</a>”;
Wordpress 1.5
Changes to the file /wp-includes/template-functions-post.php in function ‘get_the_content‘ on line 86 as highlighted:
$output .= ‘ <a href=”‘. get_permalink() . “#more-$id\” rel=\”nofollow\”>$more_link_text</a>”;
Save the changes, upload the file and you’re done. You might want to check your blog’s index page with the SEO for Firefox extension: it displays links with the nofollow attribute highlighted in red.