عWork with me
SEO glossary

robots.txt

A text file at the root of a site that tells crawlers which paths they may request. It controls crawling, not indexing.

robots.txtcontrols crawlingURL can still be listedone file per hostnoindexcontrols indexingpage must be crawlableset per pagevs
robots.txt stops requests. noindex needs the page to be crawled so the tag can be read.

What it is

robots.txt follows the Robots Exclusion Protocol (RFC 9309). It lists user agents with Allow and Disallow rules and can point to the sitemap. Each host and protocol has its own file. A URL blocked here can still be indexed without content if other pages link to it.

Why it matters

A wrong rule can hide a whole section from search, or waste crawl on useless URLs. It also decides which AI crawlers may fetch your pages.

Common mistakes

  • Leaving Disallow: / from staging on the live site
  • Using robots.txt to hide a page from search results; use noindex or authentication instead
  • Blocking a page that carries noindex, so the crawler never sees the tag
  • Blocking CSS or JavaScript files that pages need to render

How I handle it

I read the live file, test important URLs against it, check that it names the sitemap, and decide AI crawler access on purpose rather than by default.

How to check it

  1. Open /robots.txt on every host you use and read it line by line.
  2. Test your key templates and a few parameter URLs against the rules.
  3. Confirm no rule blocks CSS, JavaScript or pages that need noindex.
  4. Make sure the sitemap is listed and the file returns 200.

Illustrative example

Example scenario: a redesign goes live with the staging robots.txt still saying Disallow: /. Traffic falls within days. Replacing the file fixes crawling, and the pages return as they are crawled again.

Frequently asked questions

Does robots.txt remove a page from Google?

No. It stops requests, but the URL can still be listed. To keep a page out, use noindex (the page must be crawlable) or put it behind a login.

Where does the file go?

In the root of each host, for example https://example.com/robots.txt. A subdomain needs its own file.

Sources

Work with me

Need help with this on your site? Tell me about it.

Work with me
Book a free audit call

Work with me

Tell me about your site and goals. I usually reply within 24 hours.

Your message comes straight to me. I usually reply within 24 hours.

Esc

↑↓ move · Enter open · Esc close