The robots.txt file must be at the root level of the website.
Format and location rules:
The file must be named robots.txt
Your site can have only one robots.txt file.
The robots.txt file must be located at the root of the website host that it applies to. For instance, to control crawling on all URLs below http://www.example.com/ , the robots.txt file must be located at http://www.example.com/robots.txt . It cannot be placed in a subdirectory ( for example, at http://example.com/pages/robots.txt ). If you’re unsure about how to access your website root, or need permissions to do so, contact your web hosting service provider. If you can’t access your website root, use an alternative blocking method such as meta tags.
A robots.txt file can apply to subdomains (for example, http://website.example.com/robots.txt ) or on non-standard ports (for example, http://example.com:8181/robots.txt ).