robots.txt file if you dont want your site getting crawled or what you can do is just stop crawling specific directories ..
but if you want to password protect the site, then if you are using cpanel there is an option to password protect the directory and you can create users ..
if you are not using cpanel, i´ve just done a quick google search for password protect .htaccess´and found this: