Dealing With Duplicate Content Issues on WordPress Comments Pages

I saw a tweet today about WordPress comment page duplication issues related to SEO. While the word is still out as to just how much damage it does or doesn’t do to your ability to get found by the Great G, this specific problem is relatively easily fixed — and not by disabling the paged comments feature that the Wizards of WordPress have so kindly coded for us (you ever had a post with 300 comments? you’ll understand what I mean…).

All it takes is a little bit of code in the functions.php file in your theme. If you’re uncomfortable editing your theme files or don’t know how, leave a comment and I’ll whip up a little plugin. This may be a good time to learn to edit your files, though 🙂

This little bit of code doesn’t affect anything but WordPress comment pages. If you use WordPress for something other than a plain-vanilla blog, you may need the horsepower of Yoast’s Canonical URLs plugin for WordPress.

So in your functions.php file, insert the following code (I split the echo lines up for clarity, normally they’d be all on one line):

function canonical_for_comments() {
 global $cpage, $post;
 if ( $cpage > 1 ) :
  echo "\n";
  echo "<link rel='canonical' href='";
  echo get_permalink( $post->ID );
  echo "' />\n";
 endif;
}
add_action( 'wp_head', 'canonical_for_comments' );

Make sure you paste the code before the last ?> characters at the end of the file.

For those of you who care, here’s a quick explanation of what the above code does — you’ll get a short intro into the behind-the-scenes functioning of WordPress.

When a visitor navigates beyond the first page of comments, the variable $cpage contains the page # that’s being displayed. The $post variable contains all of the information about the post. The function tests to see if we’re on a comments page greater than 1, if so, it spits out the <link rel=…./> characters. But where does it spit them?

That’s controlled by the add_action line. We’re telling WordPress that when it’s building the head section (‘wp-head’), to add our special ‘canonical_for_comments’ function.

Simple, easy schmeezy.

Moving Your RSS Feed From FeedBurner to Google

If you blog and you’ve burned your RSS feed to FeedBurner, you’ll be interested in this.

Since Google’s acquisition of FeedBurner, Inc. on June 1, 2007, we have been moving the FeedBurner application to Google hardware, software, and data centers. This allows the application to scale and perform like most Google applications and integrate easily with other Google platforms. It also means more reliability in delivering your content, analytics, and monetization, as well as a more secure and consistent experience for your users.

Google is requiring that you move your existing FeedBurner feeds to your Google Account by February 28. If you don’t, your feeds will return either 404 – Not Found or 301 – Moved response.

Google Account required

If you don’t have a Google account, you can create one at the time of your move.

I just finished moving all of mine — really, it’s painless. It takes a little time (mine took about 25 minutes for 8 blogs, some new, a couple with 3+ years of posts) but you don’t have to monitor it if you don’t want to. The transfer status page will periodically update, but you can actually close the page if you want to once the process is started.

Roll your own

You also have the option of snatching back your feed and serving it yourself. If you mistrust Google like some people do, that may be an option for you.

No more FeedBurner Networks

Alas, a handy feature of FeedBurner is not making the move — FeedBurner Networks. Networks was a mechanism that basically let you make a mashup of different RSS feeds and funnel them into one feed that you could then put on your web site. A couple of my clients were making use of Networks; I guess it’s time to write a custom plugin for them.

API Changes

For those of you who may have plugins or widgets (or custom programming) that makes use of the FeedBurner Awareness API, be aware that the endpoint address has changed.

More Information

For more information on the FeedBurner move, you can vist the remnants of FeedBurners Burning Questions blog, or see the Transferring FeedBurner Accounts to Google Accounts FAQ.