Make one page inaccessible to search engine spiders

To prevent spiders from accessing a page one can just add within tags. Is there a way in WordPress to achieve this, for one page in particular, through some plugin or even from the native dashboard?

Solutions Collecting From Web of "Make one page inaccessible to search engine spiders"

Yoast SEO is set up to do this for you on a per-page basis. If you aren’t using Yoast already, I’d strongly recommend it – there are advanced controls for SEO, indexing, redirecting, etc.

  • First, create an “example.com/robots.txt” file in that location.
  • Second, write these directives in your “robots.txt” file:

    User-agent: *
    Disallow: /the-page/that-you-want-to-disallow.html
    
  • Third, that’s it! “/the-page/that-you-want-to-disallow.html” is now inaccessible to search engine spiders, except malware robots.

For more info, visit The Web Robots Pages.

A simple solution would be to add a tag or category, and name it ‘nofollow’.
You could then use a conditional tag in your theme’s function.php and add

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

to the outputs of the wp_head action.

For example:

if(is_tag('nofollow')){
    add_action('wp_head', 'wp_head_nofollow');
}

function wp_head_nofollow(){
    echo '<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">' ;
}

code not tested but I think you get the gist.

More elegant solution would be to add a metabox to posts/pages with a checkbox to ‘block spiders’ on and off and do about the same thing as with the conditional tag.