Search Engines plays a bigger role in promoting a website and attracting visitors to the same. Along with that, search engines sometimes bring out the files that are to be hidden.

In order to prevent files from indexing in search engines, follow these steps.

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.]

Leave a Reply

Your email address will not be published.