---
name: robots.txt
slug: robots-txt
topic: seo
alternateName:
  - Robots Exclusion Protocol
bridge:
  - /seo
related:
  - ai-crawler
  - llms-txt
  - https
sources:
  - title: "RFC 9309: Robots Exclusion Protocol (IETF)"
    url: https://www.rfc-editor.org/rfc/rfc9309.html
  - title: Introduction to robots.txt (Google Search Central)
    url: https://developers.google.com/search/docs/crawling-indexing/robots/intro
sameAs:
  - https://www.wikidata.org/wiki/Q80776
author: dmytro-hontarenko
---

## Definition

robots.txt is a plain text file at the root of a website that tells crawlers which URLs they may request. Its rules, standardized as the Robots Exclusion Protocol, are grouped by crawler name and mainly manage crawl traffic. Compliance is voluntary, and the file neither protects private content nor reliably keeps pages out of search results.

## In practice

The mettevo.com `robots.txt` has two groups: one for named AI crawlers and one for `User-agent: *`. A crawler follows the group that matches its name, so the rules can differ between them.

Our AI group disallows `/api/`. The general group deliberately leaves it open, because the preview images for our service pages and blog articles come from `/api/og`. Googlebot and link preview fetchers read the general group in our file, so a tidy-looking `Disallow: /api/` there would block those images. The lesson we took: before closing a path, find out which public files it serves.

## Not to be confused with

| Concept | How it differs from robots.txt |
| --- | --- |
| `noindex` | A meta tag or HTTP header that keeps a page out of search results. A crawler has to be able to fetch the page to see it. |
| Password protection | Actually restricts access. RFC 9309 says robots.txt rules are not a form of access authorization. |
| XML sitemap | Lists URLs you want search engines to find. robots.txt says what crawlers may request. |
| llms.txt | A proposed Markdown file that points language models to useful content. It does not set crawling rules. |

## Compared with

| | robots.txt `Disallow` | `noindex` |
| --- | --- | --- |
| Controls | Crawling | Indexing |
| Where it lives | One file for a host | Each page or response |
| Can the URL still appear in Google? | Yes, if other pages link to it | No, once Google has crawled the page and read the rule |
