Skip to content
Asuruas
Technical SEO

Robots.txt

A robots.txt file communicates crawl preferences. It does not reliably remove a URL from search results and should not protect sensitive information.

Start reading
Learning objective

Understand, apply, and verify Robots.txt

Use the concept to make a bounded website decision, then preserve the evidence and result in the operating record.

Primary topicRobots.txt

A robots.txt file communicates crawl preferences. It does not reliably remove a URL from search results and should not protect sensitive information.

Operating outcomeAccountable improvement

Make the intended pages discoverable, interpretable, internally connected, and maintainable.

Review statusMaintained resource

Reviewed for accuracy, clarity, and operational use.

01

Basic example

User-agent: *
Disallow: /private-preview/
Allow: /

Sitemap: https://example.com/sitemap.xml
02

Important limitations

  • A blocked URL may still be discovered through links.
  • Agents may interpret or honor rules differently.
  • Blocking can prevent a crawler from seeing a noindex directive.
  • Sensitive content requires access control, not robots.txt.
03

Production review checklist

  • Confirm the file is available at the root of each relevant hostname.
  • Review rules by user-agent and deployment environment.
  • Test important HTML, CSS, JavaScript, image, API, and rendering resources.
  • Keep staging protections separate from production directives.
  • Document why a path is blocked and who owns the rule.
  • Review changes after migrations, CMS updates, security work, and launch automation changes.
04

Use the right control

01

Prevent crawling

Use robots.txt when the goal is to discourage compliant crawlers from requesting a path.

02

Prevent indexing

Use an index control on a crawlable response when the goal is to keep the page out of an index.

03

Protect information

Use authentication, authorization, and network controls. Robots directives are public instructions, not security.

05

Apply Robots.txt to a real website decision

Use robots.txt as a decision framework rather than a detached definition. Start with the user or business task, collect discovery paths, response codes, rendering, directives, canonicals, internal links, sitemaps, duplication, and selected URLs, document uncertainty, and decide what action is justified by the evidence.

01

Evidence

Page-template and url-pattern evidence rather than isolated examples.

02

Interpretation

Explain how the observed condition affects the intended outcome: make the intended pages discoverable, interpretable, internally connected, and maintainable.

03

Verification

Recrawl the affected patterns, inspect rendered output and directives, and monitor indexation and search behaviour over time.

06

Questions to answer about Robots.txt

  • What user, search, commercial, compliance, or operational task does robots.txt affect?
  • Which templates, URLs, entities, environments, or journeys are actually in scope?
  • What evidence would distinguish a confirmed problem from the risk of changing directives or canonicals without understanding the intended URL model?
  • Who owns the decision, implementation, approval, and follow-up?
  • What measurement or retest will prove the change improved the intended outcome?
Next useful action

Turn robots.txt into an accountable record.

A documented decision or practice for robots.txt that can be applied to a real website.