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 คือไฟล์ข้อความธรรมดาที่วางไว้ที่รากโดเมน (เช่น example.com/robots.txt) ซึ่งบอกให้เว็บครอว์เลอร์ที่ปฏิบัติตามกฎทราบว่าส่วนใดของเว็บไซต์สามารถหรือไม่สามารถเข้าถึงได้ ใช้คำสั่งของโปรโตคอลการยกเว้นหุ่นยนต์ เช่น User-agent, Disallow และ Allow การบล็อกส่วนต่างๆ ผ่าน robots.txt ช่วยประหยัดงบประมาณการรวบรวมข้อมูลสำหรับหน้าสำคัญ แต่หน้าที่ถูกบล็อกจะไม่สามารถจัดทำดัชนีได้แม้จะมี [[backlinks|ลิงก์ย้อนกลับ]] — ทำให้การบล็อกมากเกินไปเป็นข้อผิดพลาด SEO ที่พบบ่อย ไฟล์นี้ยังควรประกาศตำแหน่งของ [[sitemap-domain|XML sitemap]] เพื่อให้ครอว์เลอร์ค้นพบ.
ตัวอย่าง
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.