5

i have many Wordpress posts with over 200 comments, so i need to improve the speed of these posts.

In particolar, i want to improve PageSpeed Insights score, because now it reports "Avoid an excessive DOM size", caused by comments.

I try the plugin Lazy load for comments, but the score on PageSpeed Insights doesn't improve. With this plugin, Googlebot see all the same with all comments (and it's good for SEO), but the score on PageSpeed Insights is still the same.

So other solution is to active ‘Break comments into pages’ option in Wordpress. In this case, the comments are splits in many pages with pagination. I have Yoast SEO plugin, so for every page generated by pagination, like "comment-page-1", etc.., there is rel="canonical", but there is also index. Infact, this plugin has disabled the option for noindex pagination (source).

In my niche, old comments are worthless and are not important to users who visit the post today. Also i don't want to risk showing the pagination of comments in the SERP.

So i try noindex the pagination comments with this snippet for functions.php, but it works only for all URLs with "/page/" in the url (source):

add_filter("wpseo_robots", function($robots) {
    if (is_paged() && is_archive()) {
        return 'noindex,follow';
    } else {
        return $robots;
    }
});

The question is: what is the best way for manage many comments in Wordpress and improve PageSpeed Insights score, destroyed by too many comments?

8
  • If old comments are worthless, why not just delete them? Commented Dec 23, 2020 at 9:58
  • thanks Stephen Ostermiller. I'm afraid of losing ranking, so deleting them is the least of the possibilities
    – hermes_44
    Commented Dec 23, 2020 at 10:10
  • Excessive comments are unlikely to be contributing to rankings, especially if users are never going to find them useful. One of the first rules for SEO is that if users don't like it, it is going to hurt your rankings. Commented Dec 23, 2020 at 10:23
  • So in your opinion I lose more ranking to have too many comments than to delete them. But between the two solutions I have indicated, which one would be the best? Lazy loading VS Pagination. I like Lazy loading comments, but this solution doesn't improve PageSpeed Insights score
    – hermes_44
    Commented Dec 23, 2020 at 10:27
  • 1
    There are several approaches you can take: 1 - simplify your theme's comment section design to use less DOM elements. 2 - delete comments that don't add value ("spam, thank yous, 1 or 2 word responses) 3 - paginate comments to a whole different page when you have more than X number of comments 4 - change your comments section to use an external provider (Disqus for example) Commented Jul 24, 2021 at 23:44

2 Answers 2

1
  • order comments by votes or most recent first
  • paginate content
  • nofollow the pagination and
  • noindex the component pages.

That way you can still show the full count of comments (to support your claims of popularity of the content) w/o a slow page 1 and w/o having indexed and even crawlable component pages that only contain less than perfect comments

0

I want to let you know that WordPress version 5.9 started lazy loading images and iframes which in turn improves the largest contentful paint of a website.

Now, talking about how you can improve the loading time of your webpage having too many comments, you can fold the comments.

Not the answer you're looking for? Browse other questions tagged or ask your own question.