The robots.txt file MUST be placed in the document root of the host. It won’t work in other locations.
If your host is example.com
, it needs to be accessible at http://example.com/robots.txt
.
If your host is www.example.com
, it needs to be accessible at http://www.example.com/robots.txt
.