Index: canonical.php
===================================================================
--- canonical.php	(revision 49174)
+++ canonical.php	(working copy)
@@ -27,7 +27,7 @@
  * or query in an attempt to figure the correct page to go to.
  *
  * @since 2.3.0
- *
+ * @since 5.6.0 checks comments page count to limit pagination
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
  * @global bool       $is_IIS
  * @global WP_Query   $wp_query   WordPress Query object.
@@ -490,12 +490,16 @@
 				&& ( 'newest' === $default_comments_page && $cpage > 0
 					|| 'newest' !== $default_comments_page && $cpage > 1 )
 			) {
-				$addl_path  = ( ! empty( $addl_path ) ? trailingslashit( $addl_path ) : '' );
-				$addl_path .= user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . $cpage, 'commentpaged' );
-
+				//checks comments page count to limit pagination
+				$per_page             = get_option( 'comments_per_page' );
+				$comments_total_pages = ceil( ( $wp_query->post->comment_count ) / $per_page );//get total number of pages for comments
+				if ( $cpage <= $comments_total_pages ) {
+					 $addl_path  = ( ! empty( $addl_path ) ? trailingslashit( $addl_path ) : '' );
+					 $addl_path .= user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . $cpage, 'commentpaged' );
+				}
 				$redirect['query'] = remove_query_arg( 'cpage', $redirect['query'] );
 			}
-
+			
 			// Strip off trailing /index.php/.
 			$redirect['path'] = preg_replace( '|/' . preg_quote( $wp_rewrite->index, '|' ) . '/?$|', '/', $redirect['path'] );
 			$redirect['path'] = user_trailingslashit( $redirect['path'] );
