robots.txt site root पर रखी text file है जो crawlers को crawl preferences बताती है। इसमें Sitemap line जोड़ने से sitemap file की location भी बताई जा सकती है।
Sitemap directive discovery में मदद करता है
/sitemap.xml पर sitemap हो तो वह मिल सकता है, लेकिन CMS, multilingual sites और बड़े sites में multiple sitemap URLs हो सकते हैं। robots.txt में उन्हें लिखने से crawlers को साफ़ starting point मिलता है।
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml- robots.txt site root पर उपलब्ध है
- Sitemap values absolute URLs हैं
- referenced sitemap fetch हो रहा है
- HTTP/HTTPS और www versions गलती से mix नहीं हैं
- staging URLs नहीं बचे हैं