Level Marketing / Articles / Paid ads

Robots.txt guide: syntax, dangerous mistakes and testing

November 30, 2026 · 7 min read

Robots.txt guide: syntax, dangerous mistakes and testing

Robots.txt is a plain text file at the root of your site that tells search engine crawlers which parts of the site they may crawl and which they may not. It exists to manage crawler traffic, not to hide pages from search. A single wrong line can cut your whole site off from Google and Yandex, so this small file deserves serious attention. Below: the syntax, the difference between Disallow and noindex, the most dangerous mistakes and how to test.

How robots.txt works

When a crawler arrives, the first thing it requests is https://sayt.uz/robots.txt. The rules apply only to the host, protocol and port that serve the file: a file for sayt.uz does not affect the shop.sayt.uz subdomain.

Key facts from Google's official specification (Google Search Central: robots.txt specification):

  • Google reads only the first 500 KiB of the file and ignores the rest;
  • the file is generally cached for up to 24 hours, so changes do not apply instantly;
  • supported fields are user-agent, allow, disallow and sitemap; others, such as crawl-delay, are not supported by Google;
  • paths are case-sensitive; * matches any sequence of characters and $ marks the end of a URL;
  • when rules conflict, the most specific rule (the longest matching path) wins; on a tie, the less restrictive allow applies;
  • if the file returns a 4xx error (except 429), Google treats it as missing and applies no restrictions; on a 5xx error it stops crawling the site for up to 12 hours.

Yandex also expects the file at the root, no larger than 500 KB, returning 200 OK. It supports User-agent, Disallow, Allow, Sitemap and its own Clean-param directive; if the file does not meet the requirements, the site is treated as open for indexing (Yandex Webmaster: robots.txt).

Syntax: a sample for a typical business site

The file is made of groups: first User-agent (which crawler), then the rules for it. A typical service company file looks roughly like this:

  • User-agent: *
  • Disallow: /admin/
  • Disallow: /search
  • Disallow: /*?sort=
  • Allow: /admin/uploads/
  • Sitemap: https://sayt.uz/sitemap.xml

Here all crawlers are kept out of the admin area, on-site search and URLs with a sort parameter, while the uploaded images folder inside admin stays open (the longer path wins). The last line points to the sitemap — see XML sitemap: what to include and how to submit it.

LineMeaning
Disallow: /Block the entire site
Disallow: (empty)Nothing is blocked
Disallow: /blogBlocks /blog, /blog/, /blog-new — all of them
Disallow: /blog/Only what is inside the /blog/ folder
Disallow: /*.pdf$Every URL ending in .pdf
Allow: /catalog/sale/Open one section inside a blocked folder

Disallow vs noindex: the most common confusion

Google states plainly that robots.txt is not a mechanism for keeping a page out of Google. If a blocked page gets links from other sites, its URL can still appear in search results without a description (Google: introduction to robots.txt). To remove a page from the index you need noindex (a meta tag or HTTP header) or password protection.

GoalRight toolWhy
Keep a page out of searchnoindexThe crawler reads the page and leaves it out of the index
Stop crawlers wasting time on thousands of useless URLsDisallowCrawl load drops
Confidential dataPassword, loginrobots.txt is public; anyone can read it
Duplicates (UTM, filters)Canonical tag; Clean-param for YandexSignals consolidate on the main page

The key trap: if you add noindex to a page and also block it in robots.txt, the crawler cannot read the page and never sees the noindex. The URL may stay indexed. Decision rule: add noindex first, wait for the page to drop out of the index, and only then add Disallow if you still need it.

One more thing: robots.txt is visible to everyone. Write Disallow: /new-prices-2027/ and a competitor can read that address straight from the file.

The most dangerous mistakes

  • A leftover Disallow: / from the staging site. The developer blocks the site during work and forgets to open it at launch. The most expensive mistake of all.
  • Blocking CSS and JS. Google warns that if missing resources make a page harder to understand, you should not block them, or Google will not be able to analyse the page well.
  • Disallow: /blog without a trailing slash. More URLs get blocked than you intended.
  • Letter case. /Catalog/ and /catalog/ are different paths.
  • A separate group for one crawler without the general rules. Google picks the most specific matching group: if there is a User-agent: Googlebot group, the rules under User-agent: * do not apply to Googlebot.
  • A 5xx error on robots.txt. If the server returns an error instead of the file, Google stops crawling. Check your hosting settings.
  • Forgotten hosts. www, subdomains and the staging subdomain each read their own file. Protect the staging subdomain with a password rather than robots.txt.

Worked example: silence after launch

Illustrative example. A building materials store in Tashkent launched its new site on a Monday. The old site brought 1,800 organic visits a month. Two weeks later, Search Console impressions had dropped 70% and new pages were not getting indexed.

CheckFoundFix
sayt.uz/robots.txtUser-agent: * and Disallow: /Remove the line
Search Console → robots.txt reportFile updated on launch dayRequest a recrawl
Yandex Webmaster → robots.txt analysisHome page "disallowed"Test the fixed file
/assets/ folderCSS and JS blocked tooRemove the Disallow
Sitemap lineMissingAdd it

The maths (illustrative): if 3% of organic visits leave an enquiry, that is 54 leads a month. If recovery takes 3–4 weeks, the store loses about 50 leads; with an average order of 4 million soums and a 25% close rate, that is 12–13 sales, or roughly 50 million soums. Lesson: checking robots.txt belongs at the top of every site launch checklist.

How to test it

  • Open it in a browser: does sayt.uz/robots.txt exist, is there no Disallow: /, is there a Sitemap line?
  • Search Console → Settings → robots.txt report: the files Google found, the last check date, status and parsing issues. After a fix you can request a recrawl from there (Google help: robots.txt report).
  • Search Console → URL Inspection: make sure no important page shows as "blocked by robots.txt".
  • Yandex Webmaster → Tools → robots.txt analysis: paste a list of URLs and see whether each is allowed or disallowed.
  • Every quarter: test 10–20 key URLs and log the results in Google Sheets.

How to connect Search Console: Google Search Console guide for business owners. Technical settings are only one part of the overall system: What is SEO? How to rank a website in Google and Yandex.

Myths

  • "robots.txt protects the site from hackers." No. Malicious bots simply ignore it.
  • "No file means the site won't be indexed." The opposite: if there is no file (404), there are no restrictions.
  • "Crawl-delay will slow Google down." Google does not support that field.
  • "Block more and the rest will rank faster." On a small site the effect is close to zero, while the risk of blocking useful pages is high.

Questions and answers

Does a small site need robots.txt at all?

It is not mandatory: without a file the site is treated as open. But a short file is useful to block the admin area and on-site search and to point to the sitemap. The main thing is that it has no line blocking the whole site.

How do I edit the file on a site builder (Tilda, Wix and others)?

Many site builders generate the file automatically and let you edit it in the SEO settings (on choosing a platform, see How to build a business website: site builder, AI or developer). The exact menu depends on the platform, so check its help pages and open the file in a browser after any change.

When do changes take effect?

Google generally caches the file for up to 24 hours. After an important fix, request a recrawl in the Search Console robots.txt report, and test the file with the analysis tool in Yandex Webmaster.

What should I do about UTM tags?

For Google, use a canonical tag. For Yandex, you can list the parameters to ignore with the Clean-param directive in robots.txt.

Conclusion

Robots.txt is a small but dangerous file. It controls crawling, not indexing: to remove a page from search you need noindex, not robots.txt. The biggest risks are a leftover Disallow: / after launch, blocked CSS/JS and a clash with noindex. If you want us to check that your site is properly open to crawlers, request a free audit from Level Marketing.

More on this topic

Read next