Scanverra
Back to Articles
Website Audit

A Practical Guide to robots.txt and Sitemap.xml for SEO and AI Crawlers

·8 min read

Two small text files decide whether search engines and AI crawlers can find and index your site at all - and both are trivially easy to misconfigure in a way that fails silently for months.

robots.txt: What It Actually Controls

robots.txtis a set of instructions, not a security boundary - it tells well-behaved crawlers which paths they should and shouldn't request. It does not password-protect anything, and a malicious or simply non-compliant crawler can ignore it entirely.

The mistake that blocks everything

A single overly broad rule can accidentally disallow the entire site:

  • Disallow: / at the root, left over from a staging environment's config that made it into production.
  • A blanket User-agent: * block that also catches AI crawlers (GPTBot, ClaudeBot, and others) you may actually want indexing your content for AI search visibility.

Scoping rules to specific crawlers

If you want to allow general search crawling but block specific bots, target them by name rather than blocking everyone:

  • User-agent: BadBot / Disallow: / - blocks one specific crawler.
  • User-agent: * / Allow: / - the default, permissive baseline.

Sitemap.xml: What It Actually Does

A sitemap doesn't force search engines to index anything - it's a discovery aid, telling crawlers which URLs exist and roughly how often they change, so pages your site's own internal linking might not surface quickly still get found.

Common sitemap mistakes

  • Listing URLs that 404, redirect, or are blocked by robots.txt - wasted crawl budget on dead ends.
  • A sitemap that's stale or hasn't been regenerated after a content change, so new pages take longer to be discovered.
  • Forgetting to reference the sitemap's location in robots.txt itself (Sitemap: https://example.com/sitemap.xml).

How to Verify Both Are Correct

Fetch /robots.txtdirectly and read every rule as if you were the crawler it applies to - it's plain text, no tooling required. For the sitemap, spot-check a sample of listed URLs to confirm they actually return 200 and aren't blocked by the rules you just read.

See your full audit score right now

Run a free instant audit and get an AI-prioritized fix list for performance, SEO, and accessibility.

Run a free audit