---
title: "What is robots.txt?"
term: "robots.txt"
description: "The robots.txt file is a plain-text file at the root of a website that uses the Robots Exclusion Protocol to tell web crawlers which parts of the site they may or may not visit."
url: "https://glossary.io/robots-txt/"
published: "2026-11-22T20:57:58.068Z"
updated: "2026-11-23T19:40:36.429Z"
topics:
  - "SEO and search"
  - "Web standards and protocols"
wikidata: "https://www.wikidata.org/wiki/Q80776"
---

# What is robots.txt?

**Definition:** The robots.txt file is a plain-text file at the root of a website that uses the Robots Exclusion Protocol to tell web crawlers which parts of the site they may or may not visit.

[Martijn Koster](https://glossary.io/martijn-koster/) proposed the Robots Exclusion Protocol in 1994, and it became a de facto standard for decades before Google and others submitted it to the IETF. It was published as RFC 9309 in 2022.

A robots.txt file contains groups of rules. Each group names a crawler with a [User-agent](https://glossary.io/user-agent/) line and lists paths it may not crawl with Disallow lines, or may crawl with Allow lines. The file can also point crawlers to a sitemap.

The rules are voluntary: well-behaved crawlers follow them, but robots.txt doesn't secure content, and blocking a URL from crawling doesn't guarantee it stays out of search results, which is a job for [noindex](https://glossary.io/noindex/). Site owners now also use robots.txt to opt out of AI crawlers and AI training.

## robots.txt resources

- [Official website](https://www.robotstxt.org/)
- [robots.txt on Wikipedia](https://en.wikipedia.org/wiki/Robots.txt)
- [Google and others update and submit Robots Exclusion Protocol to create new standard](https://coywolf.com/news/seo/robots-standard/)
- [Google allows sites to opt out of training its LLMs for GenAI](https://coywolf.com/news/seo/google-announces-method-for-sites-to-opt-out-of-llm-training/)
- [Crawler Best Practices draft seeks to standardize bot behavior for all bots on the web](https://coywolf.com/news/seo/crawler-best-practices-draft-seeks-to-standardize-bot-behavior-for-all-bots-on-the-web/)
- [Cloudflare proposes a new standard for managing AI bot access using Content Signals](https://coywolf.com/news/seo/publisher-can-now-manage-ai-bot-access-with-new-content-signals-policy-created-by-cloudflare/)
- [How to appear in ChatGPT search results without training their AI](https://coywolf.com/news/seo/how-to-be-in-chatgpt-search-results-without-training-their-ai-models/)
- [WordPress 5.3 includes fix to feature that helps keep sites from appearing in search results](https://coywolf.com/news/seo/wordpress-listing-fix/)

## Common questions about robots.txt

### Where does a robots.txt file go?

It must sit at the top level of a host, such as example.com/robots.txt, and it applies only to that host, protocol and port. A subdomain like blog.example.com needs its own robots.txt file, and crawlers ignore robots.txt files placed in subdirectories.

### What happens if a site doesn't have a robots.txt file?

Crawlers treat a missing robots.txt file, which returns a 404 or another 4xx error, as permission to crawl the whole site. Under RFC 9309, if the server returns a 5xx error instead, crawlers are expected to treat the whole site as off limits until the file can be fetched.

### Does robots.txt support wildcards?

Yes. RFC 9309 defines two special characters for paths in Allow and Disallow rules: an asterisk matches any sequence of characters, and a dollar sign marks the end of a URL. Together they let one rule block, for example, every URL that ends in .pdf.

### Is robots.txt case sensitive?

Partly. The file name must be all lowercase, and the paths in Allow and Disallow rules are case sensitive, so Disallow: /Private doesn't block /private. Rule names such as User-agent and Disallow, and the crawler names in User-agent lines, aren't case sensitive.

## Related terms

- [Martijn Koster](https://glossary.io/martijn-koster/)
- [noindex](https://glossary.io/noindex/)
- [user agent](https://glossary.io/user-agent/)
- [IETF](https://glossary.io/ietf/)
- [Bingbot](https://glossary.io/bingbot/)
- [large language model](https://glossary.io/large-language-model/)

## Compare

- [robots.txt vs. noindex](https://glossary.io/compare/robots-txt-vs-noindex/): robots.txt tells crawlers which URLs not to fetch, but it doesn't reliably keep pages out of search results. noindex tells search engines not to list a page, but they must be able to crawl the page to see it. Use robots.txt to control crawling and noindex to control indexing.

**Topics:** [SEO and search](https://glossary.io/topics/seo/), [Web standards and protocols](https://glossary.io/topics/web-standards/)

## Cite this definition

- APA: What is robots.txt? (2026, November 22). Glossary. https://glossary.io/robots-txt/
- MLA: “What Is robots.txt?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/robots-txt/.
- Chicago: “What Is robots.txt?” Glossary. Coywolf. November 22, 2026. https://glossary.io/robots-txt/.

Published November 22, 2026. Updated November 23, 2026.
