Robots.txt in 2026: The Rules That Still Matter and the Ones That Don't
Robots.txt is a crawl instruction, not an indexing instruction. The four fields Google supports, the dead rules that still sit in thousands of files — crawl-delay, noindex in robots.txt — the 500 KiB limit, and how AI crawlers changed the audience.

Every crawler that visits your site reads one file before it reads anything else. It is a plain text file, it sits at the root of your domain, and it is usually under twenty lines long. Yet it decides which parts of your site Googlebot will fetch, which parts it will leave alone, and how much of your crawl budget gets spent on pages that were never meant to rank. That file is robots.txt, and most sites either ignore it completely or fill it with rules that stopped working years ago.
The file has not changed much in thirty years, but everything around it has. Search engines formalised the standard, retired old directives, and started caching the file for a day at a time. AI crawlers joined the audience, each with its own user-agent name. And the old habit of copying a robots.txt from a blog post written in 2016 still runs on thousands of live sites, carrying lines that Google quietly ignores. This guide separates the rules that still matter in 2026 from the ones that only look like they work.
What robots.txt actually does
Robots.txt is a crawl instruction, not an indexing instruction. It tells cooperating crawlers which URLs they may request on your host. Google's own documentation puts it plainly: the file is how you manage which URLs a crawler can access, so your server is not flooded with requests that do not matter. It is a polite request, not a lock. Only crawlers that choose to follow it are bound by it, and a bad actor that ignores it was never going to obey it anyway.
The distinction that causes the most damage is the one between crawling and indexing. Robots.txt controls whether a crawler fetches a URL. Indexing is the separate decision about whether that URL appears in search results. A page you block in robots.txt can still be indexed, usually appearing as a bare address with no description, because another site linked to it and Google decided the address itself was worth listing. If you want a page out of search results, robots.txt is the wrong tool for the job. That takes a noindex tag on a page Google is allowed to crawl, or a password, or a genuine removal.
The four fields Google supports
Google's robots.txt specification supports exactly four fields, and nothing else in the file does anything for Googlebot. The first is user-agent, which names the crawler the following rules apply to. A star means every crawler. A specific name, such as Googlebot, means only that crawler reads the group that follows it. The second and third are allow and disallow, which name the paths the crawler may or may not fetch. The fourth is sitemap, which points to your sitemap file so crawlers can find it without guessing.
Google also supports two pattern characters inside allow and disallow values. A star matches any sequence of characters, so a disallow on a path ending in a star blocks a whole family of URLs that share a prefix. A dollar sign matches the end of a URL, so you can block a file type or a specific suffix without blocking everything that contains the same letters. Keep the file readable enough that the next person who opens it understands the intent in one glance.
The rules that still matter
The first rule that still matters is blocking crawl waste. Most sites generate far more URLs than they have pages worth ranking: internal search results, sort and filter combinations, calendar archives, tag pages with one post, preview and print versions, admin and login screens, cart and checkout flows. Each of those is a URL Googlebot can spend a request on, and on a large site the waste adds up to real crawl budget spent on addresses that will never rank. A short disallow group for the wasteful patterns is still the cheapest crawl-budget fix there is.
The second is the opposite direction: make sure nothing blocks the files Google needs to render your pages. A decade ago it was common to disallow CSS and JavaScript folders, on the theory that they were not content. Google now renders pages the way a browser does, and a page it cannot fully render is a page it cannot fully understand. If your robots.txt disallows your stylesheets or scripts, you are hiding the layout from the crawler that decides how your page looks in search. Check that every disallow group still leaves those assets open.
The third is the sitemap line. It costs one line and it tells every crawler where your sitemap lives, including crawlers that never visit Search Console. Put the full address of the sitemap in the file, and keep it current. And the fourth is staging: a staging copy of your site should block all crawlers with a simple two-line file, and the block should be removed the moment the site goes live. A staging block that survives a launch is one of the most common reasons a new site stays invisible for weeks.
The rules that do not work anymore
Crawl-delay is the most persistent dead rule in SEO. It still appears in roughly one in eight of the largest sites' robots.txt files, and it does nothing for Googlebot. Google's specification names it explicitly as an unsupported field, and the field is not part of the formal standard at all. Google adjusts its crawl rate automatically from how your server responds, and the lever that actually slows it down is a slow or failing server, not a line in a text file. Bing does honour crawl-delay, so the line is not meaningless everywhere, but if you added it to manage Google, it never worked.
Noindex inside robots.txt is the dead rule that still costs people traffic. Google announced in 2019 that it would stop honouring noindex, nofollow and crawl-delay lines in robots.txt, and support ended that September. A noindex line in the file is now ignored completely. Worse, the pattern it usually travels with — blocking a page in robots.txt while also putting a noindex tag on it — cancels itself out. The crawler obeys the block, never fetches the page, and therefore never sees the noindex tag that was supposed to remove it. The page stays in the index as a bare link. If a page should not be in search results, leave it crawlable, put the noindex tag on the page itself, and keep the URL out of the sitemap.
Disallow as a way to hide a page from search is the same mistake in a different shape. Blocking a URL stops the fetch, and the fetch is what lets Google read the content, the canonical tag and the noindex signal. A blocked page that other sites link to can still be indexed, and because Google never fetched it, the listing shows the address with no title and no description of your choosing. The file is also public: anyone can open your robots.txt and read the paths you chose to hide, which makes it a poor place to list anything genuinely sensitive. Private content belongs behind a login, not behind a disallow.
The limits nobody reads: size, caching and errors
Google stops reading a robots.txt file after 500 kibibytes and ignores everything past that point. Almost no site approaches the limit, and a file long enough to worry about it usually has rules that belong in a canonical tag or a noindex instead.
Google also caches the file, generally for up to a day and sometimes longer when it cannot be refreshed. That means a fix you publish at noon may not change Googlebot's behaviour until tomorrow, and a mistake you publish may keep blocking crawls for a day after you correct it. Plan around the cache: never make a robots.txt change on the same day as a launch that depends on it, and verify the change in Search Console rather than assuming it took effect.
The error cases matter too. If Google gets a 4xx response for the file, other than a 429, it treats the file as if it does not exist and crawls with no restrictions. If it gets a 5xx response, crawling stops for roughly the first twelve hours. A server error that takes your robots.txt offline can therefore either open the whole site to crawlers or shut crawling down entirely, depending on the status code. Keep it served with a 200 status and a plain text content type, at the root, on every host you care about.
AI crawlers changed the audience
In 2026 the file talks to more than search engines. Training crawlers and AI search crawlers each read their own user-agent line, and they do not all answer to the same name. GPTBot, ClaudeBot, CCBot and Google-Extended are the names most sites meet first, and each one collects content for a different purpose: training a model, answering questions in a chatbot, or feeding an AI search result. A star rule covers them all, but a star rule is a blunt choice when the purposes differ.
Decide deliberately rather than by accident. If you want your content to appear in AI answers, allow the AI search crawlers. If you do not want your content used for model training, block the training crawlers by name and leave the search ones alone. What does not work is assuming a single disallow covers a crawler that identifies itself differently, or assuming that a crawler you have never heard of will read the group you wrote for Googlebot. Check the user-agent names in your server logs, and write rules for the crawlers that actually visit.
Test before you ship
The old robots.txt Tester in Search Console has been retired, and the guides that still describe it are out of date. Three things replaced it. The robots.txt report in Search Console, under Settings, shows which file Google fetched and what it found in it. URL Inspection tests a single URL against the live file, so you can confirm that a page you meant to allow is actually allowed before you announce the change. And Google's open source robots.txt parser library lets you test the file locally, before anything ships, against the same rules Google applies.
Test the two directions. Confirm that the pages you want crawled are allowed, and confirm that the patterns you meant to block actually match the URLs you think they match. A disallow with a star in the wrong place can block a whole section, and a missing dollar sign can block every URL that merely contains a string. One test against a real URL from each section of the site catches both mistakes before they cost a day of crawling.
A lean starter file
Most sites need about five lines. Allow every crawler, disallow the internal search and the admin paths, disallow the parameter-heavy filter URLs that multiply into thousands of addresses, and point at the sitemap. Everything else is a specific answer to a specific problem on your site, and it should be added when the problem appears, not copied from a template in advance.
Revisit the file on a schedule, not only when something breaks. Check it after every redesign, every migration and every launch of a new section, because each of those changes the URL patterns the file was written against. Check the Search Console report once a quarter and compare the blocked URLs it lists with the ones you meant to block. And when a rule stops matching the site it was written for, delete it.
This article is educational guidance on search crawling and robots.txt; crawler behaviour, search features and the formal standard change, rankings and visibility vary by site, implementation, competition and execution, and nothing here guarantees a ranking or any number of new visitors.
Recommended products
Keep reading
- Crawl Budget Optimization: Stop Wasting Google's TimeIf Googlebot wastes 60% of its time on filter URLs, your real pages don't get crawled. Here's how to fix it.
- Indexation Problems: Why Google Won't Index Your Pages and How to Fix Each CauseA page that isn't indexed never appears in search, however good it is. The fix starts with reading the exact status Search Console gives you.
- The 2026 Technical SEO Audit Checklist (40 Checks)Forty technical SEO checks every site should pass in 2026 — with the fix patterns engineers actually need.
Explore the full Zeshly product suite, read more on the Zeshly blog, or head back to the homepage.
Ready to put this into practice?
Spin up Zeshly free for 14 days and ship the playbook above on your own site.