How to publish page that can’t be detected by search engines?

How about something like this on your functions.php:

add_action('wp_head', 'no_robots_on_uncategorized_posts');
function no_robots_on_uncategorized_posts() {

    if(in_category('uncategorized')) {
        wp_no_robots();
    }

}

This will output the following line of code on the header of your ‘uncategorized’ posts:

<meta name="robots" content="noindex,nofollow" />

What this means is that even though search engines will see the page, they will be told to ignore it and don’t show it on their results.

error code: 523