Blog·playbooks

Where to Find robots.txt and What the File Reveals About Crawling

Where to find robots.txt, what each line actually controls, and how to fix a blocked-by-robots.txt error without handing the check to anyone else.

The GrowGanic Team··12 min read

TL;DR

  • The robots.txt file lives at your root domain, and a copy placed in a subfolder controls nothing because rules only apply to the host, protocol and port where the file is posted.
  • A robots.txt line governs fetching, not indexing, so a blocked URL can still appear in search results when other pages link to it.
  • The fastest way to read a file is to append the filename to the bare host, but a browser cache can serve you a stale version, so a hard refresh is part of the check.
  • A blocked by robots.txt error in Search Console usually traces to a disallow rule, a password protection layer, or a firewall rule that never appears in your file at all.
  • Routine robots.txt inspection is a two-minute job you own, because the value is not in finding the file, it is in what you do about a rule that is costing you crawl access.

You find robots.txt at the root of a site's host, which means you append the filename to the bare domain: example.com/robots.txt, never to a subfolder path. Google for Developers states the rule plainly, and everything confusing about this file follows from it. Most people who go looking for robots.txt are chasing a symptom, not a file. A page stopped ranking, a Search Console report threw an error, an /inurl:robots.txt search returned a wall of unrelated results. They find the file within a minute. Then they stare at four lines of text and have no idea which one is costing them traffic.

That gap is the whole point. Locating the file is a two-minute mechanical task that never needed a consultant, and the file itself is the least interesting part of a crawl audit. What matters is what the rules are doing to your URLs, and whether the assumptions you made when you wrote them survive contact with how search engines actually behave. If you already know what a disallow line is, you still may not know that it does far less than its name suggests. This piece is about the second half of the job.

The Direct Answer Before Any Digging

Type the bare host into the address bar and add the filename. That is the entire procedure for the common case, and it works on your own site and on anyone else's. A robots.txt lookup is a read operation on a public file, so no credentials, no tool, and no plugin are involved in retrieving it.

Three quirks trip people up. The first is that most frameworks serve the file from a route rather than from disk, so the content you see may be generated. The second is that a Content Delivery Network can intercept the request and return a cached copy that no longer matches what the origin serves. The third is that a redirect chain can quietly send you to a different host, and the rules you are reading then belong to a site you do not own. If the URL resolves through two hops, verify the final destination before you conclude anything about your own crawl rules.

You should also read what you found instead of scanning for the word disallow. The rules that hurt are usually the ones you wrote years ago and never revisited.

What the File at the Root Actually Does

Robots.txt is a plain-text set of instructions addressed to automated crawlers, published at a fixed location so that any robot can find it without being told. It is a convention, not a gate, and that distinction decides how much weight to give it. The file tells well-behaved crawlers which paths they may request. It cannot enforce anything, and it never controls what a page does once a crawler has it. The robots.txt collection rules exist to make the location predictable, which is the only reason a file with this little syntax works at all.

The adjacent concept people confuse it with is the meta robots tag. That tag lives inside a page, and it governs indexing rather than fetching. A noindex directive removes a URL from results. A disallow rule removes your ability to crawl it. They solve different problems, and mixing them up is how a site ends up with thousands of pages that Google can see in the index but has never actually read. We have written elsewhere about robots.txt disallow rules do far less than most site owners assume, and that page digs into the indexing consequences in detail.

The file serves two audiences with opposite needs. Search engines read it to know where not to go. Everyone else reads it to learn what a site considers off-limits: staging environments, internal search, cart funnels, admin panels. The second audience is why a robots.txt is semi-public by design, and why writing confidential paths into it is a mistake rather than a security measure.

How Crawlers Read What You Wrote

A crawler requests the file before it requests anything else on a host, caches it, and then applies the rules to every subsequent fetch. A single file per host, protocol, and port covers the whole site, so there is no reason to look anywhere else once you have the root copy in front of you. That combination rule matters because http and https versions of the same site can each carry their own file, and so can a non-standard port. If your site moved to HTTPS and the old file was never cleaned up, the http copy still exists and still applies to the http host.

Directives are grouped by user-agent, and the specificity logic is not a priority ranking. A crawler picks the most specific group that names it, and ignores more general groups entirely when a specific match exists. An asterisk group is the fallback for every crawler without a named group. If you wrote a wildcard block and later added a Googlebot block, crawlers matching Googlebot read only the Googlebot block. Everything in the wildcard group stopped applying to them the moment you saved that change.

Path matching is prefix-based and case-sensitive. Disallowing a directory blocks every URL that starts with that string, which is usually what you want and occasionally a disaster. Disallowing a single dynamic parameter string can catch thousands of filter combinations you never intended to block. Query strings complicate this further: a rule that blocks a URL with parameters does not automatically block the parameter-free version, and vice versa.

The file is also parsed leniently. A malformed line is skipped rather than crashing the parse, which is forgiving until it means a rule you depended on simply stopped existing. There is no rewrite, no validation warning, and no error surfaced anywhere unless you go looking for the report.

Checking Any Site in Under Two Minutes

The sequence below is the one worth running on your own domain every quarter, and on any domain you are about to compete against.

  1. Open the bare host in a browser and append the filename to the root, so you are requesting the file from the host itself rather than through a search result. If the address bar shows a path segment before the filename, the request is wrong and the file you get back is meaningless.
  2. Hard-refresh the page. Browser caches and CDN caches both serve stale copies, and a file that shows yesterday's rules while tomorrow's live ruleset is already deployed will send you chasing the wrong problem.
  3. Confirm which host, protocol, and port you actually landed on, since a redirect can move you off the origin you meant to inspect.
  4. Read the file top to bottom and note where each user-agent group begins and ends. A line that looks global may be sitting under a named group that only applies to one crawler.
  5. Cross-check the file against Search Console's robots.txt report, which shows the version Google last fetched and flags syntax errors the file itself will never tell you about. Search Console's robots.txt report is the fastest way to see what a crawler actually received rather than what you intended to send.

Two minutes is honest. Ten seconds gets you the file. The rest is checking whether the version you are reading is the version that is live.

Six Dimensions That Separate a Working File From a Decorative One

A robots.txt that exists is not a robots.txt that works. These are the dimensions worth scoring any file against, whether it is yours or a competitor's.

Dimension What to look for
Placement The file resolves at the host root, not at a subfolder, and not only behind a redirect
Coverage Named user-agent groups exist for the crawlers that matter, and no stale wildcard block silently overrides them
Path specificity Disallow patterns block exactly the paths intended, with no accidental prefix collisions on shared directory names
Indexing alignment Pages that must not appear in results carry a noindex directive, not just a disallow rule
Freshness The live file matches what Search Console last fetched, and there is a process for updating it when the site changes
Error visibility Syntax is clean enough that the Search Console report shows no warnings, and someone actually reads that report

Most audits fail on two of these at once. Coverage and indexing alignment are the usual pair: a team adds a Googlebot block to protect a staging path, then forgets that the same path is linked from production and still indexed. Placement failures are rarer but more expensive, because a file at the wrong address has no effect at all while giving the team a false sense of protection.

The freshness dimension is the one that decays fastest. Sites get restructured, content moves under new directories, and the disallow list keeps pointing at paths that no longer exist while the new ones go unprotected. A robots.txt is not a set-and-forget artifact. It is a configuration file, and it drifts.

Where Site Owners Fool Themselves

The belief that hurts most is the one about secrecy. Teams treat robots.txt as a way to hide internal paths from competitors, then list staging subdomains, admin routes, and API endpoints by name. A file intended to reduce crawl load becomes a directory of everything worth probing. If a path needs protection, it needs authentication, not a line in a text file that is deliberately public.

A subtler mistake is assuming that a disallow rule prevents indexing. It does not. Crawlers cannot read a page they are told not to fetch, but the URL itself can still be indexed if other pages link to it with anchor text. The result is a search result with no snippet, which looks like a penalty and is not one. The disallow did exactly what it said it would do, and the indexing happened anyway through signals the page never controlled.

Teams also write rules against the wrong host. An old robots.txt sitting on the plain-http version of a site looks harmless until you realise the crawler fetches it for that host. Configuration templates make this worse: a starter file copied from a framework's documentation can reference directory structures that exist in the template and nowhere in your actual site.

Then there is the caching blind spot. A CDN configured to cache aggressively can keep serving an old robots.txt for hours after a deploy, so a rule change appears not to have taken effect. Teams respond by editing the file again, layering a second set of contradictory rules on top of the first, and now two versions of the same directive are in circulation.

The final one is quieter. Some teams disallow a path to reduce crawl budget, check that rankings held steady, and conclude the rule was harmless. Nothing was measured, nothing was verified, and the rule stays because no one wants to be the person who unblocked something that seems to be working.

Reading the Signals Before You Rewrite Anything

You face a specific decision once you have the file open: leave it alone, edit it, or rebuild your crawl rules from scratch. The signals tell you which.

Leave it alone when the file is clean, the paths it blocks are genuinely private, Search Console shows no fetch errors, and your indexed pages are the ones you want indexed. A working configuration does not need attention just because you looked at it.

Edit it when you find a specific, nameable problem. A disallow rule catching a directory of content pages. A stale wildcard block shadowing a newer named group. A path that moved six months ago while the rule stayed pointed at the old one. These are surgical fixes, and they take minutes.

Rebuild when the file has become a museum of decisions no one remembers. If nobody on the team can explain why a group exists, what it was protecting, or when it was last relevant, the ruleset is not a configuration, it is an archaeology site. Start from a short list of paths that genuinely must not be crawled, write groups only for the crawlers you care about, and check each one against a live URL before you publish.

The trigger worth acting on immediately is a mismatch between what you intend and what Search Console reports. If the live file shows rules you did not write, or the fetched version is weeks old while your deploy was this morning, stop editing and diagnose the caching layer first. Changing rules against a stale copy is how a small problem becomes two.

There is a version of this job that scales past one domain. When you are running multiple sites, the manual quarterly check turns into a crawl-health process, and that is a different kind of work: watching for coverage drops, tracking which URLs stopped getting fetched, and reacting before a blocked path has been blocked long enough to lose its rankings. That is what GrowGanic is for, and it treats crawl visibility as one input among many rather than a one-off checklist item. We do not publish the details of how the pipeline sequences that work. It is enough to say that a rank drop triggers a re-read of the live file and a rewrite that ships itself, which is a faster loop than a quarterly reminder in a calendar.

The routine inspection is still yours, and it should be. Finding the file takes two minutes and tells you something no dashboard can: whether the rules you set years ago still describe the site you run today.

Free gets you an article. Pro publishes thirty a month. Business publishes a hundred and fifty. Current pricing: growganic.io/pricing. Stop writing articles. Start shipping them.

Frequently Asked Questions

Where do I find the robots.txt file?

Append the filename directly to a site's root domain, so the request goes to the host itself rather than to any path beneath it. Google's documentation on creating the file specifies that it must sit at the host root to apply. If a subfolder version exists, it controls nothing beyond that folder's own host context, and the root copy is the one crawlers actually read.

Does robots.txt still work?

It works for its stated purpose: telling compliant crawlers which paths not to request. It does not enforce anything, block a determined scraper, or prevent indexing on its own. A disallowed URL can still appear in results when other pages link to it, because the rule governs fetching rather than indexing. Treat it as a load-management convention with indexing side effects, not as access control.

How to get robots.txt from a website?

Request it from the bare host in a browser and hard-refresh to bypass any cached copy. If you want to know what a search engine actually received, the Search Console robots.txt report shows the last fetched version along with any syntax warnings. For a domain you do not own, the browser request is the whole method and needs no tooling at all.

How to fix blocked by robots.txt error?

Read the file first and find the user-agent group that matches the crawler reporting the error. Look for a disallow pattern that prefixes the blocked URL, then check whether the live file still matches what Search Console shows as fetched. If no rule explains it, the cause usually sits outside the file: password protection, a firewall rule, or a hosting-level restriction. Remove the specific rule, redeploy, and request a re-fetch rather than deleting the file wholesale.

Written by

The GrowGanic Team

We build the autonomous SEO engine behind this blog. We write about autonomous content, AI search, and modern distribution. Every article here passes the same evidence and publication boundary applied to customer articles.