pagination – Set noindex page-comment from Pages 2, 3 and More?

I use All in one seo pack plugin.

I see that Google indexed page comments (that are a pages generated from paginated comments).

The example url are the followings:

  1. URL canonical –
  2. URL comment page –

The problem is that ‘URL comment page’ has itself as canonical, and not the main page.

I’d like to set as noindex all comment-page for all postes. Is it possible?

I see that AIO SEO has aioseo_filter_robots_meta, but I do not understand how to filter it for comment-page.

I have the following code, but it is only for singular:

add_filter( 'aioseo_robots_meta', 'aioseo_filter_robots_meta' );

function aioseo_filter_robots_meta( $attributes ) {
    if ( is_singular() ) {
       $attributes('noindex')  = 'noindex';
       $attributes('nofollow') = 'nofollow';
    return $attributes;

There is a way to add meta tag robots noindex only for all comment-page?