I would not recommend abandoning the robots.txt file from myself. Instead, you can use the X-Robots-Tag http header with a noindex value, which will prevent search engines from indexing the file.
This will allow them to access your robots.txt file, but will not show it in the search results.
source share