The Robots Exclusion Protocol (RFC 9309) & Search Engine Indexing
Originally drafted by Martijn Koster in 1994 and formally standardized by the IETF as RFC 9309 in 2022, the Robots Exclusion Protocol (REP) governs how automated web crawlers and search engine indexing bots access public web servers. A robots.txt file must be located at the root directory of a domain (e.g. https://example.com/robots.txt) and served with a text/plain MIME type. It instructs cooperative user-agents which URLs they are permitted to crawl, protecting server bandwidth and optimizing crawl budget for high-priority pages.
# Standard RFC 9309 Robots.txt Structure
User-agent: *
Disallow: /admin/
Disallow: /api/
Disallow: /checkout/
Allow: /api/docs/
# Search Engine Sitemap Location
Sitemap: https://www.example.com/sitemap.xml