impworks Logo - a grinning imp in flight

One Page Can Make a Difference

Monday, August 16th, 2010

The original Knight Rider used to end with the refrain of Wilton Knight’s last words to Michael…

One man can make a difference

Tonight I thought I’d share how one page (and a tiny bit of PHP code for WordPress) made a difference to my site.  At least its made a difference for Google.  I’ll apologise for the over stretched Knight Rider references now.

I’d noticed in Google Webmaster tools that around five hundred of my site’s pages were no longer in the Google index that used to be.  I’m not sure if this was the result of Google’s Caffeine launch but the timing of the fall is quite close. I’d also seen a 5% drop in visits to the site but that could be just a random fluctuation in the numbers.

There are some pages I exclude deliberately using robot meta tags like tag index pages and category pages.  They don’t have any useful content so I didn’t want to risk a duplicate content penalty.  Even deducting those from the total number of missing pages and 300+ pages were no longer in the index.

A bit of investigation (the obligatory bit of any Knight Rider episode where Michael would wander round a warehouse filled with cardboard boxes with a torch) and deduction hinted that the missing pages were old blog posts.  The missing ones were buried deep in the blog.  They are in the XML sitemap but Google’s spider just wasn’t getting deep enough through links to think they should be in the index. I’d trusted the sitemap to keep real content in the index but it doesn”t seem to be doing that anymore.  The XML sitemap had become C.A.R.R. to my site’s K.I.T.T!

I can’t just drive into the back of the FLAG mobile unit and get Bonnie to fix the problem.  I had to come up with a solution for myself.  So I added a rather uninteresting Too Many Ideas Contents page that lists every page on my blog by title. It was pretty easy to set up in WordPress with a little bit of code in a plug-in…

  1. function show_all_posts($atts) {
  2. $posts = get_posts('numberposts=-1&orderby=title&order=ASC');
  3.  
  4. foreach($posts as $post)
  5. {
  6. $text.='<li><a href="'.$post->post_name.'">'.$post->post_title.'</a></li>';
  7. }
  8.  
  9. return '<ul>'.$text.'</ul>';
  10. }
  11.  
  12. add_shortcode('show_all_posts', 'show_all_posts');

I dropped the [show_all_posts] shortcode into a page and magically the list appeared.

Then all I had left to do was wait and see if it worked…

The impact was like Michael hitting Turbo Boost – the day after I published the page Google indexed 500+ pages on my site rather than the 200 it was doing in June and July.  Its done that every day for a week now and the number of pages has actually risen slightly to a high of 617 pages.

The 300 missing pages are now back in Google’s index so I think I can safely say…

One Page Can Make a Difference

Leave a Comment

impworks © Copyright Mark Caldwell 1996 - 2018