What is the use of Robots.txt?

Robots.txt is a text file you put on your site to tell search robots which pages you would like them not to visit. Robots.txt is by no means mandatory for search engines but generally search engines obey what they are asked not to do. It is important to clarify that robots.txt is not a way from preventing search engines from crawling your site (i.e. it is not a firewall, or a kind of password protection) and the fact that you put a robots.txt file is something like putting a note “Please, do not enter” on an unlocked door – e.g. you cannot prevent thieves from coming in but the good guys will not open to door and enter. That is why we say that if you have really sen sitive data, it is too naïve to rely on robots.txt to protect it from being indexed and displayed in search results.
 
Robots.txt is called Robot Exclusion Protocol, which is used by website owners to give instructions like how to crawl and index pages on their website to web robots.
User-agent: *
Disallow: /
The "User-agent: *" means this section applied to all robots. The "Disallow: /" tells the robot that it should not visit any pages on the website.
 
Robots.txt is a text file that is used to contain instructions for search engine spiders. The files list webpages to allow and disallow from search engine crawling. The file controls the crawling activity of your website.
 
Back
Top