Robots.txt is a simple file, but errors in it can cause search bots to stop indexing important pages or, conversely, to index utility sections. This article covers the seven most dangerous errors and how to fix them.
1. Disallow: / — blocking the entire site
Error
User-agent: *
Disallow: /This directive blocks the entire site from being indexed. Bots will not crawl its pages.
When to use it
Only to block a site temporarily (for example, during development) or to block utility subdomains (staging, test).
Solution
Remove Disallow: / or replace it with specific paths:
User-agent: *
Disallow: /admin/
Disallow: /temp/
Sitemap: https://example.com/sitemap.xml2. Accidentally blocking important sections
Error
User-agent: *
Disallow: /catalog/
Disallow: /product/If /catalog/ and /product/ are the site's main sections, they will disappear from the index entirely.
Causes
- Copying robots.txt from another site without checking it
- A typo in a path (for example,
Disallow: /catalo/instead ofDisallow: /catalog/— though this blocks a path that does not exist) - Overly broad patterns
Solution
Check the site's URL structure. Block only utility sections: the admin area, search, cart, user account, and cache.
Use the reChecker robots.txt analyzer — it will show which paths will be blocked or allowed.
3. Disallow: /? — blocking URLs with parameters
Error
User-agent: *
Disallow: /*?*Many pages use query parameters for filters, sorting, pagination, and UTM tags. The /*?* pattern blocks all URLs with parameters.
Consequences
- Product pages with
?id=123may not be indexed - Pages with UTM tags (duplicates) — it is fine to block these, but not all parameters
- Filters and sorting in catalogs — often duplicates, but not always
Solution
Block only specific parameters:
Disallow: /*?*utm_
Disallow: /*?*sort=
Disallow: /*?*filter=Or do not block parameters at all if you are unsure. It is better to use canonical tags for duplicates.
4. Blocking images (product images)
Error
User-agent: *
Disallow: /upload/
Disallow: /images/
Disallow: /media/For online stores and content sites, images are important for SEO (Google Images, product listings).
Solution
Allow images to be indexed:
Disallow: /upload/
Allow: /upload/iblock/
Allow: /upload/resize_cache/
Allow: /images/Check the structure: images may be stored in /upload/ or /media/. Use Allow for the required subfolders.
5. Missing Sitemap
Error
There is no Sitemap: directive in robots.txt.
Consequences
Bots do not get an explicit pointer to the sitemap. Indexing may be slower, especially for large sites.
Solution
Add this to the end of robots.txt:
Sitemap: https://example.com/sitemap.xmlFor multiple sitemaps:
Sitemap: https://example.com/sitemap_index.xml
Sitemap: https://example.com/sitemap-products.xml
Sitemap: https://example.com/sitemap-blog.xml6. Syntax errors
Errors
- Spaces before directives:
Disallow: /admin/ - Incorrect capitalization:
disallow: /admin/(should beDisallow) - Multiple values on one line:
Disallow: /admin/ /temp/ - Blank lines between
User-agentand its rules (this may break the group in some parsers)
Standard
According to the specification:
User-agentandDisallow/Allowstart with a capital letter (although many bots are case-insensitive)- One directive per line
- No leading spaces in the path
Solution
User-agent: *
Disallow: /admin/
Disallow: /temp/
Allow: /public/
Sitemap: https://example.com/sitemap.xml7. Conflicting Allow and Disallow directives
Error
User-agent: *
Disallow: /catalog/
Allow: /catalog/products/Order matters. Under the robots.txt standard, the more specific path takes precedence. Allow: /catalog/products/ should allow access to /catalog/products/, even if /catalog/ is blocked. However, not all bots interpret specificity the same way.
Rule
A longer path is usually considered more specific. For Google, Allow: /catalog/products/ overrides Disallow: /catalog/.
Solution
Check the logic: if /catalog/ is blocked but /catalog/products/ should be accessible, Allow should come after Disallow and be more specific. Use the reChecker robots.txt analyzer. to check.
Pre-publication checklist
- No
Disallow: /(if the site should be indexed) - The catalog, product pages, and blog are not blocked
- Not all URLs with parameters are blocked (
/*?*) - Images are allowed (Allow for the required folders)
- Sitemap is specified
- No syntax errors
- Allow and Disallow do not conflict unexpectedly
Summary
The most dangerous errors are blocking the entire site (Disallow: /), important sections, and images. Avoid broad patterns like /*?*, add a Sitemap, and check the structure with a robots.txt analyzer. A small error can lead to the loss of a significant portion of your indexing and traffic.