สร้าง Robots.txt
สร้างไฟล์ robots.txt พร้อมกฎ allow และ disallow แบบกำหนดเองสำหรับ web crawlers
Global Parameters
Rule Group #1
# Generated by freetool24.com User-agent: * Disallow: /admin/ Disallow: /private/ Allow: / Sitemap: https://example.com/sitemap.xml
User-agent: *
Applies the rule to all bots and web crawlers globally.
Disallow: /
Prevents the targeted bot from crawling any page on the site.
Free Robots.txt Generator
A robots.txt file is a plain-text file at the root of your website that instructs crawlers — Googlebot, Bingbot, and others — which pages to crawl or skip. This robots.txt generator lets you build valid Allow, Disallow, User-agent, and Sitemap directives visually, then copy the file instantly.
How to create a robots.txt file
- 1
Set your Sitemap URL
Enter your sitemap address, such as https://yoursite.com/sitemap.xml. Search engines use it to discover your most important URLs.
- 2
Choose a User-agent
Use * to target all crawlers, or name a specific bot such as Googlebot, Bingbot, Googlebot-Image, or GPTBot.
- 3
Add Disallow rules
List the paths you want crawlers to skip, such as /admin/, /private/, /cart/, or internal search results.
- 4
Add Allow rules
Use Allow to reopen a specific sub-path inside a blocked folder, such as allowing /admin/help/ while blocking /admin/.
- 5
Copy and deploy
Copy the generated robots.txt file and upload it to the root of your domain: https://yourdomain.com/robots.txt.
Common robots.txt templates
Allow all crawlers
User-agent: * Disallow: — gives search engines full crawl access.
Block a private folder
User-agent: * Disallow: /admin/ — keeps admin or staging sections out of crawler paths.
Add sitemap discovery
Sitemap: https://example.com/sitemap.xml — points crawlers to your canonical sitemap.
Target one bot
User-agent: Googlebot Disallow: /tmp/ — applies the rule only to Googlebot.
Common mistakes to avoid
Blocking the whole site
Disallow: / blocks crawling for the selected bot. Use it only for private or staging sites.
Using robots.txt for secrets
Blocked URLs are still visible in the file. Do not put private paths or sensitive endpoints there as a security measure.
Forgetting the root location
The file must live at /robots.txt on the host it controls. A robots file in a subfolder is ignored.
Confusing crawl and index
Robots.txt controls crawling. Use noindex on accessible pages when you need to prevent indexing.
FAQ
Does robots.txt prevent indexing?
Robots.txt controls crawling, not indexing. A URL can still appear in search results if Google discovers it from links. Use a noindex meta tag to prevent indexing.
Where does robots.txt go?
At the root of your domain — https://yourdomain.com/robots.txt. Subdirectory placement does not work.
Should I include my sitemap in robots.txt?
Yes. A Sitemap directive helps search engines discover your canonical sitemap URL quickly.
Is robots.txt case-sensitive?
Yes. Disallow: /Admin/ and Disallow: /admin/ are treated as different paths by most crawlers.
สำรวจต่อ
เครื่องมือ SEO อื่นๆ ที่คุณอาจชอบ...
สร้าง Meta Tag
สร้าง HTML meta tags สมบูรณ์สำหรับ SEO รวม Open Graph และ Twitter Card tags
ตรวจสอบความหนาแน่นคีย์เวิร์ด
วิเคราะห์ความถี่คีย์เวิร์ดและเปอร์เซ็นต์ความหนาแน่นในเนื้อหาของคุณ
นับคำ
นับคำ อักขระ ประโยค ย่อหน้า และประมาณเวลาอ่าน
สร้าง Slug
แปลงข้อความใดๆ เป็น slug ที่เหมาะกับ URL พร้อมตัวอักษรพิมพ์เล็กและขีดกลาง
สร้าง XML Sitemap
สร้าง XML sitemaps จากรายการ URL เพื่อการจัดทำดัชนีเครื่องมือค้นหาที่ดีขึ้น
ดูตัวอย่าง Open Graph
ดูตัวอย่างว่าหน้าของคุณจะปรากฏอย่างไรเมื่อแชร์บน Facebook, Twitter และโซเชียลมีเดียอื่นๆ
ดูตัวอย่าง SERP
ดูตัวอย่างว่าหน้าของคุณปรากฏอย่างไรในผลการค้นหา Google
ตรวจสอบความสามารถในการอ่าน
คำนวณคะแนน Flesch-Kincaid และระดับเกรดสำหรับเนื้อหาของคุณ