diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index 557e36acd9..2a3f9c27e1 100644
--- a/src/wp-includes/canonical.php
+++ b/src/wp-includes/canonical.php
@@ -704,7 +704,7 @@ function redirect_guess_404_permalink() {
 			$where .= $wpdb->prepare( ' AND DAYOFMONTH(post_date) = %d', get_query_var( 'day' ) );
 		}
 
-		$post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'" );
+		$post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status IN ('" . implode( "', '", get_post_stati( array( 'public' => true ) ) ) . "')" );
 		if ( ! $post_id ) {
 			return false;
 		}
