Build a bot-discovery sitemap: discovery-only partitions and expiry rules.
- User
Build a bot-discovery sitemap: discovery-only partitions and expiry rules.
Assistant
Build a bot-discovery sitemap: discovery-only partitions and expiry rules.
The user wants a "bot-discovery sitemap" focusing specifically on "discovery-only partitions" and "expiry rules."
1. Deconstruct the Request:
2. Determine the Format and Strategy:
A standard XML sitemap isn't enough here. We need a strategic framework or a schema that extends standard sitemap protocols (like sitemap.xml, robots.txt, and potentially ai.txt or llms.txt concepts).
robots.txt, sitemap.xml modifications (lastmod, expires tags), and HTTP headers.3. Drafting the Content - Section by Section:
Introduction: Define what this is. It's a logical separation of content for bots.
Part 1: Discovery-Only Partitions (The "What"):
Part 2: Expiry Rules (The "When"):
sitemap.xml <lastmod>.Cache-Control headers.Part 3: The Implementation Schema (The "How"):
bot-config.json) to represent this abstractly, then map it to standard protocols.Refining "Discovery-Only":
noindex, follow? No, that removes it from the index.index, noarchive?ai.txt or llms-full.txt: Allow discovery of the URL/Title, but block the body content for training.4. Structuring the Response:
robots.txt, Sitemap XML, HTTP Headers.5. Self-Correction/Refinement during drafting:
Let's build a Crawl Budget Optimization Strategy centered on a Dynamic Sitemap Architecture.
canonicals or noindex on the pages themselves while keeping them in the sitemap for reference? No, usually you hide those.Let's stick to a robust, technical SEO/Infrastructure design.
Drafting the Plan:
max-age<lastmod> usage.Expires header usage.Let's write the output. I will structure it as a technical specification.
File Structure:
sitemap-index.xmlsitemap-active.xmlsitemap-archival.xmlsitemap-discovery.xml (The unique part).Defining "Discovery-Only": URLs that establish site structure or entity relationships (like a knowledge graph for bots) but are not meant for heavy crawl depth or immediate user conversion.
Let's refine the "Expiry Rules."
Final Polish: Ensure the distinction between "Search Bots" (Google/Bing) and "AI Bots" (GPT/Claude) is acknowledged, as they treat "discovery" differently. The prompt is likely about managing Crawl Budget and Freshness.
Let's produce the schema.
Structure of the Output:
Self-Correction on "Discovery-Only": I will define this as "Facet/Filter Discovery." Sitemaps that list valid filter combinations (e.g., /shoes/red) to ensure the bot discovers the inventory subset, but strictly limits how deep it goes to prevent crawl traps.
Let's go. This bot-discovery sitemap architecture is designed to optimize Crawl Budget (for search engines) and Context Window efficiency (for AI Agents).
The system relies on two mechanisms: partitioning content based on change frequency (Volatility) and defining strictly enforced expiry rules (TTL).
Instead of a single massive sitemap.xml, this architecture uses a Sitemap Index that points to segmented partitions. This allows bots to ignore entire sections of your site that haven't changed, rather than crawling the whole site to find updates.
We divide the site into three logical partitions based on content volatility.
static_coredynamic_inventorydiscovery_pathways (Special)Here is the sitemap-index.xml structure implementing the partitions.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- STATIC PARTITION: Rarely changes -->
<sitemap>
<loc>https://example.com/sitemaps/static_core.xml</loc>
<lastmod>2023-10-01</lastmod>
</sitemap>
<!-- DYNAMIC PARTITION: Frequent updates -->
<sitemap>
<loc>https://example.com/sitemaps/dynamic_inventory.xml</loc>
<lastmod>2023-10-27T10:00:00Z</lastmod>
</sitemap>
<!-- DISCOVERY ONLY: Pathways for deep crawling -->
<sitemap>
<loc>https://example.com/sitemaps/discovery_pathways.xml</loc>
<lastmod>2023-10-15</lastmod>
</sitemap>
</sitemapindex>
This logic dictates when a bot should consider a "discovered" URL stale and when it should fetch the sitemap again.
| Partition | Content Type | Sitemap TTL (Refresh Rate) | Page Cache-Control (Bot Hint) | Pruning Rule (Removal) |
|---|---|---|---|---|
| Static Core | Policies, Docs | 30 Days | max-age=2592000 (1 month) | Remove from sitemap only if page is deleted (410). |
| Dynamic Inventory | Products, Articles | 6-12 Hours | no-cache or max-age=3600 | Remove lastmod date older than 1 year (archive it). |
| Discovery Pathways | Hubs, Pagination | 24 Hours | no-index, follow | Maintain links to ensure graph connectivity. |
For the Discovery Pathways partition, we apply specific meta-rules to prevent the bot from wasting "compute" on the hub page itself:
X-Robots-Tag: noindex, follow (Index the links, do not index the container).<priority> to 0.3 (Low) but ensure <lastmod> is current so the bot knows to check for new links inside the hub.To maintain this sitemap programmatically (e.g., in Python or Node.js), implement the following BuildSitemap routine to run on a CRON job.
def generate_bot_sitemap():
# 1. Load Static Partition (Filesystem check)
# Only update if footer.php or config.yaml changed
static_partition = load_partition("static")
# 2. Load Dynamic Partition (Database check)
# Select items modified in the last 48 hours
dynamic_partition = db.query("SELECT * FROM posts WHERE updated_at > NOW() - INTERVAL '2 days'")
# 3. Load Discovery Partition (Graph Traversal)
# Find all Category pages that have > 5 children
discovery_partition = db.query("SELECT category_url FROM categories WHERE count(posts) > 5")
# 4. Apply Expiry Rules (The Cleanup)
# Prune any URL from the sitemap if:
# A. It returns 404/410
# B. The 'lastmod' date is older than 12 months (Archive Rule)
clean_list = prune_expired_urls(static_partition + dynamic_partition + discovery_partition)
# 5. Write Sitemap Index
write_xml(clean_list)
If you are configuring a bot (like an LLM Web Crawler or SEO Bot) to read this site:
sitemap-index.xml first.static_core.xml more than once a month.dynamic_inventory.xml every hour.discovery_pathways.xml only if you encounter "orphan pages" (pages with no incoming links) to ensure full graph coverage.