all insights
7 min read

Robots.txt and the Art of Crawl Control

Robots.txt is the most powerful and misunderstood file on your entire site. Learn what to disallow, what never to, and how it now shapes AI crawler access.

Technical SEOSEO
Robots.txt and the Art of Crawl Control — cover illustration

The most powerful file almost nobody reads carefully

Every site has one, most people never open it, and a single wrong line inside it can quietly cost you your entire organic footprint. That file is robots.txt, a plain text document sitting at the root of your domain that tells crawlers where they may and may not go. It is the first thing a crawler requests before it fetches anything else, which means it is the first place your technical SEO either opens the door or slams it shut.

I have spent fifteen years moving numbers in large programs, and robots.txt is the file I have watched cause the most damage per character. It is short, it looks harmless, and it is deceptively easy to break. A rushed edit during a migration, a copied staging config, a well meaning developer trying to save crawl budget, and suddenly the pages that pay the bills are invisible. Understanding what this file does, and just as importantly what it does not do, is basic hygiene for anyone responsible for a site's visibility.

What robots.txt actually controls (and what it does not)

Here is the distinction that trips up even experienced teams. Robots.txt controls crawling, not indexing. A Disallow rule tells a compliant crawler not to fetch a URL. It does not tell search engines to keep that URL out of their index.

This sounds like a technicality. It is not. If you disallow a page in robots.txt but other sites link to it, that URL can still show up in results, usually as an ugly listing with no description, because the crawler was never allowed to read the page and see the noindex tag you thought would handle it. You blocked the crawler from seeing the very instruction that would have removed it.

So keep these two jobs separate in your head:

  • To stop crawling, use robots.txt. Good for saving crawl budget on low value URLs the crawler should never waste time on.
  • To stop indexing, use a noindex meta tag or header, and crucially, leave the page crawlable so the crawler can actually read the directive.

Confusing the two is the single most common robots.txt mistake I see, and it produces the worst kind of failure: the page looks handled, but it is quietly doing the opposite of what you intended.

What you should disallow

Used well, robots.txt is a scalpel for steering crawler attention toward pages that earn and away from pages that drain. On large sites this is directly tied to how you manage crawl budget, because every fetch spent on junk is a fetch not spent on a page that converts.

Good candidates to disallow:

  • Internal search results pages. Near infinite, low value, and a classic crawl trap.
  • Faceted and filtered URL combinations that generate thousands of near duplicate pages. This is often the biggest single leak, and worth mapping carefully before you touch anything.
  • Cart, checkout, and account URLs that have no business ranking.
  • Staging, admin, and internal tooling paths that should never be public.
  • Endless calendar or pagination parameters that spiral out into nowhere.

The through line: block the swamp, not the garden.

What you must never disallow

This is where the real damage happens. A few rules I treat as non negotiable:

  • Never disallow your CSS and JavaScript. Modern crawlers render pages the way a browser does. Block the resources they need to render, and they see a broken skeleton of your site. This was defensible many years ago. Today it is a self inflicted wound.
  • Never disallow a page you also want deindexed. As above, blocking the crawl blocks the noindex from ever being seen.
  • Never block URLs that appear in your XML sitemap. Submitting a URL in a sitemap while disallowing it in robots.txt sends a directly contradictory signal, and it is a mistake I see constantly. Your sitemap and your robots file have to agree, which is one more reason your sitemap strategy and your crawl rules should be designed as one system, not two.
  • Never ship staging rules to production. The infamous Disallow: / that blocks the entire site belongs on staging and nowhere else. It has taken more sites offline from search than almost any other single line, usually because a migration copied the wrong config.

A five point robots.txt audit you can run today

Here is the checklist I run on every site I audit. It takes about twenty minutes and catches the vast majority of problems.

  1. Fetch the live file at yourdomain.com/robots.txt and read every line out loud. If you cannot explain why a rule exists, that is a flag.
  2. Confirm CSS and JS are crawlable. Test a key template in a rendering tool and make sure nothing critical is blocked.
  3. Cross check against your sitemap. No URL should be both submitted and disallowed. Reconcile every conflict.
  4. Look for a stray Disallow: / or an overly broad rule that catches more than intended. Broad patterns are where accidents hide.
  5. Verify what crawlers actually do by pulling server logs. Directives are theory; logs are truth, and what server logs reveal that analytics cannot will tell you whether crawlers are honoring your rules or wasting budget somewhere you never expected.

Run those five, and you will have found more than most quarterly technical audits surface.

How robots.txt now shapes AI crawler access

Here is the part that has genuinely changed the stakes. Robots.txt used to be a conversation with search engine crawlers. Now it is also the front door for the crawlers that feed AI assistants and answer engines, the systems pulling your content to build the answers users increasingly read instead of clicking.

Those crawlers identify themselves with their own user agent names, and you can allow or disallow them by name in robots.txt, the same way you always could. That turns a maintenance file into a strategy decision. Do you want your content used to build AI answers that may never send a click, or do you want to keep it out? There is no universally right answer, and it depends on whether visibility inside an AI answer helps your brand or simply gives away your work.

Robots.txt gives you a blunt instrument for that choice: allow or block, by crawler, at the door. For finer control over how AI systems may actually use what they fetch, a newer companion standard is emerging, and it is worth understanding how llms.txt aims to control AI crawler behavior as that layer matures. But the foundational allow or block decision still lives in the humble robots.txt file, which means a file most teams last touched years ago is now a lever on their AI visibility strategy.

The takeaway

Robots.txt rewards respect and punishes carelessness. It is short enough to feel trivial and powerful enough to erase a site from search. Treat it as a deliberate instrument: disallow the swamp, protect the garden, keep it honest with your sitemap, and now decide, on purpose, which AI crawlers you let through the door. Read the file, cross check it, and prove it with logs. Do that, and you have closed off one of the easiest ways to lose visibility you already earned.

If you have inherited a robots.txt file nobody fully understands, or you are weighing how to handle AI crawler access without giving away the store, the channel is open by introduction. Bring the file and your logs, and we will make sure it is opening the doors you want and closing the ones you do not.

Written by Joseph Carroll, Carroll Consulting Services. Connect on LinkedIn

// contact

Open a channel

Not taking on new clients right now, focused on the work in front of me. The best way to connect is LinkedIn, or a warm introduction from someone I already work with.

connect on linkedin NOT ACCEPTING NEW CLIENTS