I know of many architectural mistakes that can totally torpedo a web site's rankings -- using URL-based session IDs, adding duplicate content for fun, etc. But one thing stands out in WordPress blogs as a culprit. I call it "death by pagination," and it's another way to screw yourself.
It's common knowledge that pages buried deeply within a web site, for various reasons, will likely not rank as well as those that are linked from top-level pages. Typically, the solution employed is a site map. This mitigates the problem by creating one link to deeper pages from a page that is only 1 level deep.
Without that, simple "< prev next >" pagination causes certain items (in this case posts), to be buried several pages deep within a site structure that looks like this:
[ A -> B -> C -> D ]
Here, page "D" is 4 levels deep. Usually, it's not linked from anywhere else, either. In a blog, this would occur when the pagination is performed in 10s, and there are >= 31 posts in a category or month. On my blog, that's pretty likely, and the first post in a given month would be on page "D." Categories only get larger over time as well.
There are two approaches to fixing the problem.
1. Don't use simple-pagination. Page with "< prev" and "next >" as well as links to the individual pages.
2. Add a sitemap
Examples of "1" can be seen on this page on one of my sites and also on the SEOmoz blog:
To do this in wordpress, add this little plugin:
<?
/*
Plugin Name: PagerFix
Plugin URI: http://www.seoegghead.com/
Description: Makes the paging in WP more SE-friendly.
Author: Jaimie Sirovich
Version: 1.0
Author URI: http://www.seoegghead.com/
*/
function pager_fix($seperator = ' | ', $after_previous = ' ', $before_next = ' ', $prelabel='« Previous Page', $nxtlabel='Next Page »', $current_page_tag = 'b')
{
global $request, $posts_per_page, $wpdb, $paged;
posts_nav_link('',$prelabel,'');
echo $after_previous;
preg_match('#FROM (.*) GROUP BY#', $request, $matches);
$fromwhere = $matches[1];
$numposts = $wpdb->get_var("SELECT COUNT(ID) FROM $fromwhere");
$max_num_pages = ceil($numposts / $posts_per_page);
if ($max_num_pages > 1) {
for ($cnt = 1; $cnt <= $max_num_pages; $cnt++) {
if ($current_page_tag && $paged == $cnt) {
$begin_link = "<$current_page_tag>"; $end_link = "</$current_page_tag>";
} else {
$begin_link = ''; $end_link = '';
}
$x[] = $begin_link . '<a href="' . get_pagenum_link($cnt) . '">' . $cnt . '</a>' . $end_link;
}
echo join($seperator, $x);
}
echo $before_next;
posts_nav_link('','',$nxtlabel);
}
?>
Then call the function "pager_fix()" in your template somewhere.
To accomplish "2," use this plugin. I use this plugin -- here is my sitemap.
Side Note: You can also use the links generated by the calendar control in WordPress to partially address this; but I feel this introduces other problems, including duplicate content issues. For this reason I do not recommend it.
Of course this concept does not only apply to blogs. I see plenty of other web sites that would benefit from fixing their paging features up like this.












October 11th, 2006 at 9:10 pm
I was about to disagree with you. By adding the numbered links you just add more duplicate content issues when you have every blog post on multiple pages. The category pages, the numbered link pages, and the actual blog post.
Then I noticed you fixed this on your site by only providing a snippet on any page but the home page and the actual blog post. Genius. Now can I please have that plug-in?
Thanks
Jeremy Luebke
October 11th, 2006 at 9:18 pm
Since adding your plugin I get the following error any time I try and activate a new plugin.
Warning: Cannot modify header information - headers already sent by (output started at /home/xurucom/public_html/blog/wp-content/plugins/pagerfix.php:1) in /home/xurucom/public_html/blog/wp-includes/pluggable-functions.php on line 272
October 12th, 2006 at 12:12 am
Make sure you don't have any whitespace in the plugin file, and you want to put it in your plugins directory instead.
So ... put it in wp-content/plugins as filename pagination-fix.php, enable it, then call my function instead of the native pagination control generation functions.
October 12th, 2006 at 2:17 am
Looks like I had some extra spaces in there.
So will we get a chance to know how you did the "Excerpt:" thing in the archives?
October 18th, 2006 at 10:36 am
Hi,
Great plugin but small problem...it breaks my admin section. It doesn't just break it it makes it completely vanish, returning only a blank white screen. Very strange.
The other plugins I have active are:
Advanced WYSIWYG Editor By Assaf Arkin.
Akismet
Dagon Design Sitemap Generator 2.7
Google Sitemaps 2.7.1
Google Analytics 1.7
Ultimate Tag Warrior 3.141592
Search Excerpt 1.2 $Rev: 19 $
Any insight appreciated.
Cheers,
Joe
October 23rd, 2006 at 5:56 am
Hi
I am interested in the functionality of this. I already use a pagination plugin on my site but have one issue.
It produces
>
So I can go forward and back one page.
Your plugin seems to be similar. I have over 500 posts (say) on my site.
When I use your plugin it produces about 125 links (i.e. 500 / 4 per page).
What I really would like is to have
>
Just an idea, not sure if you can do that with your plugin.
October 23rd, 2006 at 6:01 am
Well my previous reply didnt work too well, translated the less than and greater than into html
Try again without less than and greater than
My point was - I would like a plugin that does something like this
Prev 1-10, 11-20, 21-30 Next
October 23rd, 2006 at 5:46 pm
[...] Posts Pagination Related Entries Customizable Post Listings Landing Sites Plugin Cu mai multe pluginuri aici Site-ul e in germana si deci am fost nevoit sa il traduc cu Altavista. Link-ul normal e acesta: WP - Landingsites de (Plugin) Subscribe to Comments 2.0 [...]
November 14th, 2006 at 10:08 pm
[...] Your default WordPress blog has a problem. Your posts slowly get pushed into "pagination death" as they age; your older trusty content gets buried deeper and deeper internally. Furthermore, duplicate content issues plague your category and main listing pages. [...]
November 16th, 2006 at 6:09 pm
[...] A wordpress must-have. http://www.seoegghead.com/blog/seo/stop-seo-death-by-pagination-p118.html [...]
December 7th, 2006 at 10:54 am
[...] Also, here is a link to pagination for wordpress: http://www.seoegghead.com/blog/seo/stop-seo-death-by-pagination-p118.html Bookmark to: [...]
December 14th, 2006 at 4:18 pm
[...] Re: Blog Settings for SEO - Today, 04:18 PM Brian, I assume you're talking about your front page. It's fine that you have excerpts leading to articles. But I would link to more article pages or the comments section using the blog's simple pagination rules. Here's an article on this: SEO Egghead by Jaimie Sirovich » Stop SEO Death By Pagination As far as adsense goes, I have found that adding them is benign or negligible. In fact, adding adsense forces google to crawl your blog. Michel Fortin TheCopyDoctor.com [...]
January 19th, 2007 at 10:29 am
This great plugin seems to be broken in WordPress 2.1 RC1. I really hope dev continues! Thanks.
January 23rd, 2007 at 11:05 pm
Yeah, I'm now getting this error with WP 2.1 and need some help:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT COUNT(ID) FROM
January 29th, 2007 at 2:58 pm
I have been able to successfully implement the Pagerfix plugin as well as your duplicate content hack and your suggested site map into my site. However, the Pagerfix plugin is having issues with WordPress 2.1. The error message I get is:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT COUNT(ID) FROM
I was getting the same error message from the MW 1.1 theme by Javier GarcĂa at http://www.monetizingtheweb.com/wordpress-theme-mw/ but he has fixed the theme by adding:
if ($wp_query) $max_page = $wp_query->max_num_pages;
else{
to his pagination. I tried to use his fix to make a similar change but apparently they are different problems. I do not know if that will be any help.
I know you are busy and not fealing well, but if you get a chance, perhaps you can take a look at this and give us some suggestions.
Thank you for your consideration.
February 5th, 2007 at 1:16 pm
I believe I have found a solution in a plugin by Lestor Chan, WP-PageNavi 2.10 at http://www.lesterchan.net/wordpress/readme/wp-pagenavi.html
February 5th, 2007 at 2:06 pm
Do SE's follow drop down box option links?
April 18th, 2007 at 4:52 am
[...] old documentation/blog post is here. These icons link to social bookmarking sites where readers can share and discover new web [...]
April 18th, 2007 at 8:49 am
[...] Stop SEO Death By Pagination [...]
April 22nd, 2007 at 11:23 am
[...] Links: - WordPress subpages going supplemental: the fix - Stop SEO Death By Pagination - 3 WordPress Hacks For SE-Friendly Blog Archives - Professional Search Engine Opimization with [...]
August 21st, 2007 at 7:34 am
It's a good idea, but SEOmoz was not doing it for that purpose. When they had those links on SEOmoz they were rel=nofollowed...
September 3rd, 2007 at 4:38 am
[...] eliminate the built-in death by pagination flaw –also outlined here–, you install PagerFix from Richard’s buddy Jaimie Sirovich. [...]