what is the code through which I can ask any search engine not to crawl my own site or part of the site?
Multiple ways. 1. In robots.txt add the following line User-agent: * Disallow: / 2. In Head Meta you can specify no crawl or index like <meta name="robots" content="noindex,nofollow" /> 3. Last but by no means least is make it a password protect directories using Apache