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?

  • Just use a "robots.txt". Aug 11, 2015 at 17:19
  • Sure but I'm looking for a solution that some non tech savvy client could use.
    – drake035
    Aug 11, 2015 at 17:24
  • 1
    How tech savvy do you have to be to drop a text file into a directory? Aug 11, 2015 at 23:12

3 Answers 3


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


to the outputs of the wp_head action.

For example:

    add_action('wp_head', 'wp_head_nofollow');

function wp_head_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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.