diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index 184fb756e8..fbe7c3e471 100644
--- a/src/wp-includes/canonical.php
+++ b/src/wp-includes/canonical.php
@@ -27,6 +27,7 @@
  * or query in an attempt to figure the correct page to go to.
  *
  * @since 2.3.0
+ * @since 5.8.0 Checks comment page count to limit pagination.
  *
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
  * @global bool       $is_IIS
@@ -504,8 +505,14 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
 				&& ( '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 comment page count to limit pagination.
+				$per_page             = get_option( 'comments_per_page' );
+				// Get the total number of pages for comments.
+				$comments_total_pages = ceil( ( $wp_query->post->comment_count ) / $per_page );
+				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'] );
 			}
diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
index b8a2c30768..bd504884a4 100644
--- a/src/wp-includes/link-template.php
+++ b/src/wp-includes/link-template.php
@@ -2934,12 +2934,16 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
  *
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
  *
+ * @since 5.9.0
+ *
+ * @global WP_Query   $wp_query   WordPress query object.
+ *
  * @param int $pagenum  Optional. Page number. Default 1.
  * @param int $max_page Optional. The maximum number of comment pages. Default 0.
  * @return string The comments page number link URL.
  */
 function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
-	global $wp_rewrite;
+	global $wp_rewrite, $wp_query;
 
 	$pagenum = (int) $pagenum;
 
@@ -2950,7 +2954,17 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
 			if ( $wp_rewrite->using_permalinks() ) {
 				$result = user_trailingslashit( trailingslashit( $result ) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged' );
 			} else {
-				$result = add_query_arg( 'cpage', $pagenum, $result );
+				$cpage = get_query_var( 'cpage' );
+
+				// Checks comment page count to limit pagination.
+				$per_page = get_option( 'comments_per_page' );
+
+				// Get the total number of pages for comments.
+				$comments_total_pages = ceil( ( $wp_query->post->comment_count ) / $per_page );
+
+				if ( $cpage <= $comments_total_pages ) {
+					$result = add_query_arg( 'cpage', $pagenum, $result );
+				}
 			}
 		}
 	} elseif ( $pagenum > 1 ) {
diff --git a/tests/phpunit/tests/link/wpGetCanonicalUrl.php b/tests/phpunit/tests/link/wpGetCanonicalUrl.php
index 5b7eddaada..3311ecb46e 100644
--- a/tests/phpunit/tests/link/wpGetCanonicalUrl.php
+++ b/tests/phpunit/tests/link/wpGetCanonicalUrl.php
@@ -151,6 +151,27 @@ class Tests_Link_wpGetCanonicalUrl extends WP_UnitTestCase {
 		$this->assertSame( $this->canonical_url_filter(), $canonical_url );
 	}
 
+	/**
+	 * Limit pagination for comments.
+	 *
+	 * @ticket 50233
+	 */
+	public function test_comments_limit_paged_with_plain_permalink_structure() {
+		$cpage = 5;
+
+		$link = add_query_arg(
+			array(
+				'cpage' => $cpage,
+				'foo'   => 'bar',
+			),
+			get_permalink( self::$post_id )
+		);
+
+		$this->go_to( $link );
+		$expected = get_permalink( self::$post_id ) . '#comments';
+		$this->assertSame( $expected, wp_get_canonical_url( self::$post_id ) );
+	}
+
 	/**
 	 * Filter callback for testing of filter usage.
 	 *
