Colleviate
Home/Insights/Technical SEO
Technical SEO5 Dec 20263 min read

Robots.txt: what it can and cannot do for SEO

The most powerful text file on a website is also the most misunderstood. It is a request about crawling, and nothing more.

Short answer

Robots.txt tells crawlers which URLs they may fetch. It does not keep a page out of Google: a blocked URL can still be indexed if other pages link to it. To keep a page out of results, allow crawling and use a noindex tag, or put the page behind a password.

Robots.txt is a plain text file at the root of a host, read before a crawler fetches anything else. Google's introduction says it exists mainly to avoid overloading a site with requests, and states plainly that it is not a way to keep a page out of Google. That one sentence explains most robots.txt mistakes we see in audits. It is the first item on our technical SEO checklist.

What it controls, and what it does not

You want toUseWhy not robots.txt
Stop crawlers wasting requests on endless filter or search URLsrobots.txt disallowThis is what it is for
Keep a page out of search resultsnoindex meta tag or X-Robots-Tag headerA blocked page can still be indexed from links, and Google cannot see a noindex on a page it may not crawl
Keep a page privatePassword or loginThe file is public; listing a secret path advertises it
Choose between duplicate URLsRedirect or rel="canonical"Google's canonical guidance says not to use robots.txt for canonicalisation

How Google reads the file

Five mistakes worth checking for

  1. Disallowing a page you also set to noindex. Google cannot read a tag on a page it is not allowed to fetch, so the noindex never takes effect.
  2. Blocking CSS or JavaScript. Google renders pages; if it cannot fetch the files that build the page, it may see a broken one.
  3. A staging rule left in production. "Disallow: /" copied from a test site switches off crawling for everything. It is the first line we read in any audit.
  4. Trying to hide private pages. Anyone can open the file and see the paths you listed.
  5. No sitemap line. It is optional, but a Sitemap: line is the cheapest way to tell every crawler where your list of URLs lives. Ours is covered in XML sitemaps that Google uses.

Our own file, as a worked example

We checked colleviate.com's robots.txt on 5 December 2026. It allows every crawler everything, names seventeen crawlers individually (Googlebot, Bingbot, GPTBot, ClaudeBot, PerplexityBot and others) with the same allow rule, and ends with the sitemap line. Naming them changes nothing technically, because the wildcard group already allows them; we did it so a reader can see the decision was deliberate. Our reasoning for letting AI crawlers in is in our llms.txt piece: our Insights are written to be quoted. A publisher that sells its archive would reasonably decide differently.

How to test a change before it ships

Read the file at yourdomain/robots.txt in a browser, then use the URL Inspection tool in Search Console on two or three important URLs; it reports whether crawling is allowed. Search Console's robots.txt report shows which versions Google fetched and any parse problems. If pages vanish from results after a change, our Search Console diagnostics guide sets out the order in which to look.

Questions we get asked

Does robots.txt stop a page being indexed?

No. It controls crawling. A blocked URL can still be indexed if other pages link to it. Use a noindex tag on a crawlable page instead.

Should I block CSS and JavaScript in robots.txt?

No. Google renders pages and needs those files to see the page as a visitor does.

What happens if robots.txt returns an error?

Google treats a 4xx (except 429) as no restrictions, and a 5xx or 429 as a temporary block on crawling the site.

Is robots.txt an official standard?

Yes. The Robots Exclusion Protocol was published as RFC 9309 by the IETF in September 2022.

How Colleviate applies this

Not sure what your robots.txt is doing?

We read it line by line against your important URLs and tell you what each rule actually blocks.

Ask for a scoped audit

What we do · How we produce it · Who we do it for · Talk to us