The short answer
The most damaging robots.txt mistakes are a leftover rule that blocks the whole site, rules that match more addresses than intended, blocking files pages need to display, and combining a block with noindex. Check the file in a browser and in Search Console. Blocking stops crawling, while noindex stops listing and only works on pages crawlers can reach.
Robots.txt mistakes by symptom
Robots.txt mistakes are usually noticed through a symptom, not by reading the file. The table pairs common symptoms with the likely cause in the file and the first thing to check. Each cause is explained in the next section. For what the file is for, start with the guide to XML sitemaps and robots.txt.
| What you see | Likely cause in the file | First check |
|---|---|---|
| The whole site is missing from search after launch | A site-wide Disallow copied over from the test site | Open /robots.txt on the live domain and look for a Disallow line with only a slash after it |
| One section, such as the shop or the blog, is missing | A rule whose start matches more addresses than intended | Read every Disallow line and ask which addresses begin with that text |
| Search results show a bare address with no description | The page is blocked but other sites link to it | Look for the blocked status on the page in Search Console |
| A page with a noindex tag still appears in results | The page is also blocked, so the tag is never read | Remove the block and keep the noindex tag |
| Pages look unstyled or empty when inspected | Style sheets, scripts or images are blocked | Compare the rules with the folders those files sit in |
| A sitemap cannot be fetched | The sitemap folder is blocked, or the Sitemap line has a wrong address | Load the address in the Sitemap line in a browser |
| A rule works on one version of the site and not another | The file covers only one host or protocol | Open robots.txt on each version you use |
The mistakes, one at a time
A slash after Disallow
The two lines User-agent: * and Disallow: / ask every crawler to stay away from the whole site. They suit a private test site. On the live site they are a disaster, and they usually arrive there because the test site's settings were copied across at launch. A Disallow line with nothing after it blocks nothing, so a single character separates an open site from a closed one. Read the line instead of skimming it.
To fix it, correct or delete the rule, reload the live file in a browser, then inspect the home page in Search Console. Search engines return at their own pace, so recovery is not instant.
A rule that matches more than you meant
A rule matches every address that begins with its text. Disallow: /s blocks /services/, /shop/ and /search/ together, because all of them start with /s. Write the whole folder with its closing slash, such as /search/, and test the rule against addresses you need to keep open.
Support for pattern characters such as the asterisk differs between crawlers, so check each crawler's documentation before relying on them.
Blocking the files a page needs
Style sheets, scripts and images sit in folders, and a broad rule on those folders can stop a crawler loading them. A crawler that cannot load them may see a plainer or broken version of the page. If the page depends on the blocked files to make sense, unblock them. Media folders matter too. A rule covering the folder that holds video files or thumbnails can stop crawlers fetching them, and the guide to video SEO basics covers what else video pages need.
Blocking a page and also tagging it noindex
A noindex tag works only if the crawler can fetch the page and read it. If robots.txt blocks the page, the tag is never seen and the address can stay in results. Google's documentation also says it does not support a noindex rule written inside robots.txt itself, so a line like that does nothing. Both mistakes tend to appear together, when someone tries to remove a page from search by every means at once.
The wrong name, place or host
The file must be named robots.txt and sit at the root of the host, so crawlers look for yourdomain.com/robots.txt. A copy placed in a folder such as /blog/ is never read. A file also covers only the protocol and host that serve it, so the www form, the bare domain and a shop subdomain can each need their own. Check every one you use.
Treating the file as a privacy tool
Anyone can open robots.txt. A Disallow line for a private folder tells every reader exactly where the folder is, and badly behaved crawlers can ignore the file. Keep private material behind a login. Use robots.txt only to ask well-behaved crawlers to skip addresses.
A Sitemap line that points nowhere
The Sitemap line should hold the full address, including https, of a file that loads. If the address returns a 404, treat it like any other dead link and fix it, as the guide to broken links and 404 errors describes. A missing robots.txt file is a different case: with a plain 404 on the file, crawlers see no rules. Server errors on the file are handled differently, so check the current documentation.
Editing a file the platform overwrites
Some platforms build robots.txt from a setting, some read a file you upload, and some do both through plugins. If you edit one source while another serves the live file, your change appears to do nothing. After any edit, reload the live address in a browser and read what actually loads. Search engines may also keep a stored copy for a while, so allow time before judging the effect.
Copying a long file from somewhere else
Most small sites need very little in this file. A long list of rules copied from another site often blocks paths that exist only on that site, or paths yours does need. Add a rule only when you can say which addresses it covers and why you want them skipped.
How to check if you are blocking pages
- Open yourdomain.com/robots.txt on every version of the address you use, with and without www and on any subdomain, and read each line.
- Search Console has a robots.txt report. Check the current documentation for what it shows and which kinds of property it supports.
- Use the URL Inspection tool on your most important pages. It reports whether crawling is allowed for that address.
- Open the Page indexing report and look for statuses that mention robots.txt, including pages that are indexed even though they are blocked.
- Crawl the site with a crawler that obeys robots.txt and compare its list of blocked addresses with the pages you want found.
- Test each rule against a handful of real addresses you need open and a handful you want closed.
- Check the file again after every redesign, platform change or plugin update, and note the date.
If the file looks clean and pages are still missing from the index, the cause lies elsewhere. The list of signs your website needs a technical SEO audit can help you decide when to call in a specialist.
Blocking, noindex and other ways to keep a page out
Blocking and noindex solve different problems, and mixing them up is behind many of the mistakes above. Blocking controls whether a crawler requests an address. Noindex controls whether a page that has been fetched may appear in search results.
| Method | What it stops | Can the page still appear in results? | Use it when |
|---|---|---|---|
| Disallow rule in robots.txt | Crawlers requesting the address | Yes. If other sites link to it, the address can appear, usually without a description | You want crawlers to skip addresses nobody needs, such as internal search results |
| noindex as a meta tag or HTTP header | A fetched page being listed | No, once the crawler has fetched the page and read the rule | Visitors may reach the page but it should not be in search, such as a thank-you page |
| Login or password | Everyone without credentials | No | The content is private, or the site is still being built |
| Removing the page so it returns 404 or 410 | The page existing | It drops out after the address is crawled again | The page is gone for good |
Google's documentation describes robots.txt as a way to manage crawler traffic and says it is not a mechanism for keeping a web page out of Google. A blocked address can still be found through links elsewhere. To keep a page out of results, use noindex or a login, and make sure robots.txt does not block the page, or the noindex rule goes unread.
If a page you want removed is already blocked, the order matters. Remove the block, add noindex, wait until the page has dropped out of results, and leave the page open to crawling unless you have a reason to block it.
After you fix a mistake
- Keep a copy of the old file before editing, so you can compare the two.
- Change one rule at a time and reload the live file after each change.
- Re-inspect a few affected pages in Search Console and look again after some days, because re-crawling takes time.
- Record what changed, when and why, so the next person does not repeat it.
Technical access comes first in any plan, because nothing else counts if pages cannot be found. The guide to building an SEO strategy for a small business shows where this check sits among the other work, and the search engine optimisation service page describes the audit and fix work Liftup Technologies offers.
