Glossary · Technical SEO
Robots.txt: Telling Crawlers Where They May Go
Robots.txt tells crawlers which parts of your site they may request. It is not a way to hide pages from search.
Robots.txt is a plain text file at the root of a site that tells crawlers which URLs they may request. It follows the Robots Exclusion Protocol, standardized as RFC 9309. It controls crawling, not indexing, so a blocked URL still appears in results when other sites link to it.
Key Takeaways
- Robots.txt controls crawling, not indexing.
- It lives at the site root and follows RFC 9309.
- Do not block a page you want to noindex.
- Web Almanac 2024: robots.txt requests succeeded for 83.9% of mobile sites.
A developer blocks the whole site on staging and forgets to remove the rule at launch. Rankings fall within days.
A two-line file has that much power.
What it does
User-agent: *
Disallow: /admin/
Sitemap: https://example.com/sitemap.xml
Rules apply by user agent. Allow and Disallow lines list paths. A Sitemap line points to your XML sitemap.
What it does not do
It does not remove pages from results. A blocked URL can still appear without a description, built from links pointing to it. To keep a page out of search, allow crawling and use noindex. It is also not security, since the file is public.
Google's introduction to robots.txt covers the exact syntax.
Is your robots.txt doing what you think?
Send your URL. We check this on your site and reply with the first fixes.
Checking yours
The HTTP Archive's Web Almanac 2024 found robots.txt requests succeeded on 83.9 percent of mobile sites and 83.5 percent of desktop sites, so roughly one in six fails. Open yours at /robots.txt and confirm it returns 200 and says what you intend.
For AI bots, see AI crawlers and GPTBot.
A launch checklist
Before launch, open /robots.txt on the live site and read every line. Remove any blanket Disallow carried over from staging. Confirm the sitemap line points to the live address. Test a few important URLs in Search Console's robots.txt report to make sure they are allowed.
Check again a day after launch. A rule that slips through at release costs far more than the minute this takes.
FAQ
Robots.txt: questions people ask
What is robots.txt?
A text file that tells crawlers which URLs they may request.
Does robots.txt stop indexing?
No. It controls crawling. Use noindex to keep pages out.
Where does it live?
At the root of the site, such as /robots.txt.
Is it secure?
No. It is public, so never list secrets.
Can I block AI bots with it?
Yes, by user agent, for bots that obey it.
Want a technical review you can act on?
Our monthly audit finds the issues that matter first.
How we wrote this page
Chenthil Kumar wrote this entry from the sources listed below and from audit work on client sites, and the Digimarketlabs Editorial Team checked it against our editorial guidelines. Figures carry a source and a date, and where a study shows correlation only, we say so. Search features change often, so check the linked documentation before you act on a detail. Last updated October 23, 2026.
Sources & further reading
Keep reading