A robots.txt file lives at the root of your site. So, for site Example Domain, the robots.txt file lives at www.example.com/robots.txt. robots.txt is a plain text file that follows the Robots Exclusion Standard. A robots.txt file consists of one or more rules. Each rule blocks (or or allows) access for a given crawler to a specified file path in that website.
Here is a simple robots.txt file with two rules, explained below:
# Group 1
User-agent: Googlebot
Disallow: /nogooglebot/