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 là tệp văn bản thuần túy đặt ở gốc tên miền (ví dụ example.com/robots.txt) cho biết các trình thu thập web tuân thủ phần nào của trang có thể hoặc không thể truy cập. Nó sử dụng các chỉ thị của Giao thức loại trừ Robot như User-agent, Disallow và Allow. Chặn các phần qua robots.txt tiết kiệm ngân sách thu thập cho các trang quan trọng, nhưng các trang bị chặn không thể được lập chỉ mục dù có [[backlinks|backlink]] — do đó chặn quá mức là lỗi SEO phổ biến. Tệp cũng nên khai báo vị trí của [[sitemap-domain|sơ đồ trang XML]] để trình thu thập khám phá.
Ví dụ
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.