Prevent files from Indexing in Search engine
In order to prevent the files from indexing in Search Engine, here are the steps you need to follow.
1. Create a file called robots.txt in the home directory of the Site. (i.e public_html)
2. For Example, if you don’t want the files in a folder called admin to be listed in search engines, paste the below code in robots.txt file.
==========
User-agent: *
Disallow: /admin/
==========
3. The above command will prevent the files begining with name admin from listing in Search engines. Similarly, you can add any number of folders or files.
Note: If you do a search in any search engine, it will cache the search results and will display the same results until the cache is cleared. So, after implementing the robots.txt file, check its working by searching with the keyword in other search engines, where you haven’t performed search earlier.