User-agent: * Disallow: /folder Just make sure you do this before google indexing your website, I'd also use .htaccess to block the folder if you have a apache server.
https://support.google.com/webmasters/answer/156449?hl=en This will give you entire knowledge of robots.txt