robots.txt
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://tldfyi.com/iframe/glossary/robots-txt/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://tldfyi.com/glossary/robots-txt/
Add a dynamic SVG badge to your README or docs.
[](https://tldfyi.com/glossary/robots-txt/)
Use the native HTML custom element.
robots.txt is a plain-text file placed at the root of a domain (e.g., example.com/robots.txt) that tells compliant web crawlers which parts of the site they may or may not access. It uses Robots Exclusion Protocol directives such as User-agent, Disallow, and Allow. Blocking sections via robots.txt conserves crawl budget for important pages, but blocked pages cannot be indexed even if they have [[backlinks|backlinks]] — making over-blocking a common SEO mistake. The file should also declare the location of the [[sitemap-domain|XML sitemap]] for crawler discovery.
Example
Adding 'Disallow: /admin/' to robots.txt prevents Google from crawling internal admin pages, while 'Sitemap: https://example.com/sitemap.xml' advertises the sitemap location to all crawlers.