robots.txt is a plain text file at the root of a website that tells search engine and AI crawlers, by crawler name, which parts of the site they may crawl and which they should stay out of.
robots.txt lives at example.com/robots.txt. Every crawler identifies itself with a name (user-agent): Googlebot for Google, OAI-SearchBot for OpenAI's search crawler, GPTBot for its training crawler, and so on. The Allow and Disallow lines in the file tell each crawler which paths are open to it.
Why does it matter for AI visibility?
If a page can't be crawled, it can't be used as a source in classic search results or in AI answers. Google treats allowing crawling as a basic requirement for appearing in AI Overviews (Google Search Central). OpenAI also runs separate crawlers for search and for model training, so a site can block the training crawler and still allow the search crawler (OpenAI — Overview of OpenAI Crawlers).
What to watch for
- robots.txt is not a security tool. Pages that must stay private need a password or access control.
- Your hosting company or CDN settings can also block crawlers. Check those too, even if the file itself looks right.
- Read what a crawler does before you block it. Blocking a search crawler by mistake can drop your business out of AI answers.
Don't confuse robots.txt with llms.txt: one allows or blocks crawling, the other only offers a summary of the site.