avatar Deluxe Blog Tips About Projects

Disable WordPress Comment Pagination & 301 Redirect

In one of my WordPress blogs, I used to divide comments into pages. The single post looked shorter than having all comments in one page and hence the page layout looked better. But comment pagination has some disadvantages and I wanted to get rid of that.

There're 3 problems with comment pagination:

  1. It's hard to follow the discussion, especially when talking is interesting and many commentators have joined it
  2. Duplicated content: in WordPress, you have several links for the same single post:
    Those pages has the same main content (e.g. the post content). The only difference is the comments, which is not very important to search engines. So they consider they're duplicated and send us warning.
  3. Broken links: when we delete some comments, the number of comments is decreased and so is the number of comment pages. If you had 3 comment pages before, you may have only 2 now. That means the comment page http://domain.com/post/comment-page-3 isn't available any longer. Search engines will consider it as a broken link and warn us (if you're using Google Webmaster Tools, you'll see that in the Crawl Errors section).

Because of these disadvantages, I decided to disable comment pagination and list all comments on one page. The only problem when switching to that was I had to redirect all comment pages to the single page. To achieve that, I use a small .htaccess rule:

RedirectMatch 301 /(.*)/comment-page-(.*) /$1

Pages are directed permanently (code 301). Here I use mod_alias to redirect pages. So, make sure your host supports this mode.

If you prefer mod_rewrite, you can use this:

RewriteRule ^(.*)/comment-page-(.*) /$1 [R=301,L]

Also make sure that mod_rewrite is supported.

After doing this, you'll have only one link for single post. No duplicated content. No broken links. And commentators are happy to discuss. The only issue is that the page is longer and layout is not quite good, but I think it's acceptable. What do you think about this? Are you a SEO expert? Please let me know your opinion in the comments.

🔥 HOT: Interested in boosting your WordPress SEO? My Slim SEO plugin is a super lighweight and automated plugin that handles most the hard work for you: meta tags, sitemap, redirection, schema & link building.

👉 Have a look and you will love it: wpslimseo.com