How to Paginate Comments in WordPress and How It Can Help Your SEO

How to Paginate Comments in WordPress and How It Can Help Your SEO

If you get a lot of comments on your posts, then you may want to think about paginating them – i.e. breaking them up into different pages after a certain number.

Paginating comments is super easy. In fact, it’s built into the admin area.

Just go to Settings > Discussion > Other comment settings, and you will find the settings.

paginate-comments

Your theme will determine the style of the links.

paginated

* Don’t stop here. Make sure you read below to see the problem this may cause and how to fix it.

Advantages of Paginating Comments

If you have a lot of comments (not 10 or 20, but a lot), then there are a number of potential benefits to paginating your comments.

Page Speed

The first is page load speed, especially on mobile devices.

A post with 100 comments will slow down your page load speed. Improving your page load speed is not only good for your human visitors, it’s good for SEO.

Page speed is one factor that search engines look at when they’re ranking the quality of a page.

Leaking PageRank

Another possible SEO benefit has to do with leaking PageRank (PR).

Matt Cutts, head of Google’s spam team, has said that any link on a page leaks PR – not just do-follow links, but nofollow links too.

While the nofollow links don’t pass the PR to the page being linked to, it does sap it from the page linking out.

Why that’s so, I don’t know. But supposedly, that’s the way it is. And of course many commenters leave a link with their comment, so 100 comments will mean close to 100 links on the page.

Keyword Density

One final thing to consider is keyword density.

There’s no telling how much this plays into things, but if you have lots of comments, and they don’t happen to be using the keywords you’d like to rank the page for, it may decrease your keyword density ratio.

Of course Google has supposedly gotten better about finding relationships between words, and you wouldn’t think this shouldn’t be such a big deal, but Google can surprise – both in good ways and bad. Better safe than sorry.

To be honest, if this were the only advantage to paginating comments, I probably wouldn’t worry about it. But as it’s another possible straw to throw on the stack, of course it doesn’t hurt.

One SEO Problem – And a Fix

And so there you are – a number of potential SEO advantages to paginating lots of comments.

But all those advantages get balanced out by one very big negative – duplicate content.

There is, however, a fix for this problem.

First, the Problem

When you turn on comment pagination in WordPress, as you might expect, you now get multiple pages. When you click to the second page of comments, that page looks exactly the same as the first page, except for the different comments.

That, of course, could look like duplicate content — i.e. content that is either exactly the same or extremely similar.

The way to fix this is with something called canonical URLs. A canonical URL in the header of a page tells the search engines which page should be considered the original/main page.

WordPress actually has canonical URLs built in; however, they don’t do what you’d like them to do for paginated comments. In fact, they do the opposite.

When you look at the source code for your original post page, you will see a canonical URL in the header. It will point to itself and look something like this:

<link rel='canonical' href='http://me.com/post/' />

When you click to the second page of your comments, you will also have a canonical URL in the header of that page; however, that URL will also point to itself and look something like this:

<link rel='canonical' href='http://me.com/post/comment-page-2/#comments' />

What you want in that second page is a canonical URL that is the same as in the first page.

In other words, that second page needs to be pointing back to the first page with the canonical URL and telling the search engines, “Hey, I’m not the guy you’re looking for. The guy you’re looking for is back there.”

The Fix

As said, however, there is a fix for this. Some SEO plugins will fix that for you. One that will is the All in One SEO plugin.

In the All in One SEO plugin, go to the settings, and just make sure that the canonical URLs box is check. (I believe it probably should be by default.)

all-in-one-seo

After you’ve done this, refresh your second page of comments and check the header to make sure the canonical URL is pointing back to the first page and not pointing to itself.

To Paginate or Not

Paginating comments is probably only a good idea if you set the number relatively high. You probably wouldn’t want to set the number at 5 as I did in my example. But if you set it at 25 or more, then even if you don’t normally get a lot of comments, you’ll be all set if a post does happen to generate more discussion than normal.

Just don’t forget to take care of the duplicate content issue by getting your canonical URLs straightened out.

Photo: hardcover book gutter and pages