Search engine spiders crawl over your entire WordPress site and index every content. For stop hacking sensitive information We can disallow search engines to index the admin section which contains all the sensitive information. The easiest way to prevent the crawlers from indexing the admin directory, is to create a robots.txt file in your root directory. Then place the following code in the file:
# User-agent: * Disallow: /cgi-bin Disallow: /wp-admin Disallow: /wp-includes Disallow: /wp-content/plugins/ Disallow: /wp-content/cache/ Disallow: /wp-content/themes/ Disallow: */trackback/ Disallow: */feed/ Disallow: /*/feed/rss/$ Disallow: /category/*
Not So in wordpress site. We can disallow crawler for any type of project. Simply write “Disallow: / directoryname” in robot.txt and upload the file in root of the project.