Liftup TechnologiesWhatsApp+91 77689 10234Get a free quote
Services

SEO and AI search

Websites and stores

AI and automation

Apps and more

WorkPricing
Resources

Learn

Plan and price

Company

AboutContact
Get a free quoteWhatsApp usCall +91 77689 10234

Robots.txt mistakes that block your site, and how to find them

One misplaced line in robots.txt can stop search engines reading an entire site. This guide lists the mistakes by the symptom you see, so you can work backwards from the problem.

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 seeLikely cause in the fileFirst check
The whole site is missing from search after launchA site-wide Disallow copied over from the test siteOpen /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 missingA rule whose start matches more addresses than intendedRead every Disallow line and ask which addresses begin with that text
Search results show a bare address with no descriptionThe page is blocked but other sites link to itLook for the blocked status on the page in Search Console
A page with a noindex tag still appears in resultsThe page is also blocked, so the tag is never readRemove the block and keep the noindex tag
Pages look unstyled or empty when inspectedStyle sheets, scripts or images are blockedCompare the rules with the folders those files sit in
A sitemap cannot be fetchedThe sitemap folder is blocked, or the Sitemap line has a wrong addressLoad the address in the Sitemap line in a browser
A rule works on one version of the site and not anotherThe file covers only one host or protocolOpen 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

  1. 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.
  2. Search Console has a robots.txt report. Check the current documentation for what it shows and which kinds of property it supports.
  3. Use the URL Inspection tool on your most important pages. It reports whether crawling is allowed for that address.
  4. Open the Page indexing report and look for statuses that mention robots.txt, including pages that are indexed even though they are blocked.
  5. Crawl the site with a crawler that obeys robots.txt and compare its list of blocked addresses with the pages you want found.
  6. Test each rule against a handful of real addresses you need open and a handful you want closed.
  7. 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.

MethodWhat it stopsCan the page still appear in results?Use it when
Disallow rule in robots.txtCrawlers requesting the addressYes. If other sites link to it, the address can appear, usually without a descriptionYou want crawlers to skip addresses nobody needs, such as internal search results
noindex as a meta tag or HTTP headerA fetched page being listedNo, once the crawler has fetched the page and read the ruleVisitors may reach the page but it should not be in search, such as a thank-you page
Login or passwordEveryone without credentialsNoThe content is private, or the site is still being built
Removing the page so it returns 404 or 410The page existingIt drops out after the address is crawled againThe 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.

Related guides

Questions and answers

What are common robots.txt mistakes?

The usual ones are a leftover rule that blocks the whole site, a rule that matches more addresses than intended, blocking files that pages need to display, and combining a block with a noindex tag. Others are a file in the wrong place, rules set on the wrong host, and a Sitemap line that points nowhere.

What does robots.txt disallow all mean?

A Disallow rule with only a slash, for all crawlers, asks them not to request any address on that host. It suits a private test site and is a serious mistake on a live one. A Disallow line with nothing after it blocks nothing, so check the exact characters.

Why is my robots.txt not working?

Common reasons are that the file is in the wrong place, sits on a different host from the pages, or is overwritten by the platform. Search engines may also hold a stored copy for a while. The rule may also be doing a job robots.txt does not do, such as removing a page from results.

How do I check if I am blocking pages?

Read the live file in a browser, then use Search Console: the robots.txt report if your property has it, URL Inspection on key pages, and the Page indexing report for blocked statuses. Crawling your own site with a tool that obeys robots.txt shows the full list.

What is the difference between blocking and noindex?

Blocking stops a crawler requesting an address, but the address can still appear in results if other sites link to it. Noindex tells search engines not to list a page they have fetched. Noindex only works when robots.txt lets the crawler reach the page.

Should I list private pages in robots.txt?

No. The file is public, so a Disallow line tells anyone exactly where the private folder is, and some crawlers ignore it. Use a login for private material, and use robots.txt only to ask well-behaved crawlers to skip addresses.

Get a free quote
Discuss on WhatsApp