# Robots.txt for www.getkodin.com
# Last updated: April 29, 2026
# Purpose: Guide search engine crawlers to index all important pages

# =====================================================
# DEFAULT RULES FOR ALL CRAWLERS
# =====================================================
User-agent: *
Allow: /

# =====================================================
# EXPLICITLY ALLOW IMPORTANT SECTIONS
# =====================================================
# Main pages
Allow: /
Allow: /index.html
Allow: /dsa
Allow: /dsa.html
Allow: /dsa/

# DSA Learning Platform (Critical for SEO)
Allow: /dsa
Allow: /dsa$
Allow: /dsa/

# Algorithm-specific pages
Allow: /graph_foundation
Allow: /graph_foundation.html
Allow: /breadth_first_search
Allow: /breadth_first_search.html
Allow: /depth_first_search
Allow: /depth_first_search.html
Allow: /dijkstras_algorithm
Allow: /dijkstras_algorithm.html
Allow: /fractional_knapsack
Allow: /fractional_knapsack.html
Allow: /job_sequencing
Allow: /job_sequencing.html

# =====================================================
# DISALLOW UNNECESSARY FILES AND DIRECTORIES
# =====================================================
Disallow: /admin/
Disallow: /private/
Disallow: /temp/
Disallow: /cache/
Disallow: /uploads/
Disallow: /downloads/
Disallow: /api/private/
Disallow: /user/profile/
Disallow: /user/settings/
Disallow: /dashboard/
Disallow: /backend/
Disallow: /*.pdf$
Disallow: /*.zip$
Disallow: /search?
Disallow: /*?page=
Disallow: /*?sort=
Disallow: /*?filter=
Disallow: /tag/
Disallow: /category/

# =====================================================
# BLOCK RESOURCE FILES IF NOT NEEDED
# =====================================================
# Allow CSS, JS, images for rendering
Allow: /*.css$
Allow: /*.js$
Allow: /*.jpg$
Allow: /*.jpeg$
Allow: /*.png$
Allow: /*.gif$
Allow: /*.svg$
Allow: /*.webp$
Allow: /*.woff$
Allow: /*.woff2$
Allow: /*.ttf$
Allow: /*.ico$

# =====================================================
# DISALLOW DUPLICATE OR PARAMETER VERSIONS
# =====================================================
# Prevent crawling HTML extension versions when clean URLs exist
Disallow: /*/.html$
Allow: /$
Allow: /dsa$

# =====================================================
# CRAWLER-SPECIFIC RULES
# =====================================================

# Google - Priority crawler
User-agent: Googlebot
Allow: /
Allow: /dsa
Allow: /graph_foundation
Allow: /breadth_first_search
Allow: /depth_first_search
Allow: /dijkstras_algorithm
Allow: /fractional_knapsack
Allow: /job_sequencing
Crawl-delay: 0

# Bing
User-agent: Bingbot
Allow: /
Allow: /dsa
Crawl-delay: 1

# Other crawlers
User-agent: *
Crawl-delay: 1
Request-rate: 1/1s

# =====================================================
# SITEMAP LOCATIONS (CRITICAL FOR DISCOVERY)
# =====================================================
Sitemap: https://www.getkodin.com/sitemap.xml
Sitemap: https://www.getkodin.com/sitemap-dsa.xml
Sitemap: https://www.getkodin.com/sitemap-algorithms.xml

# =====================================================
# ADDITIONAL CRAWLING DIRECTIVES
# =====================================================

# Don't crawl login pages
Disallow: /login
Disallow: /signup
Disallow: /auth

# Don't crawl forms that create noise
Disallow: /contact/submit
Disallow: /form/submit
Disallow: /apply/submit

# Prevent infinite crawls from dynamic content
Disallow: /search/
Disallow: /filter/
Disallow: /sort/

# Prevent crawling of staging/preview versions
Disallow: /preview/
Disallow: /draft/
Disallow: /staging/
Disallow: /dev/

# =====================================================
# NOTES FOR SITE ADMINISTRATORS
# =====================================================
# 1. DSA section is prioritized for search engines
# 2. Algorithm pages are fully crawlable for discoverability
# 3. Clean URLs (without .html extension) are preferred
# 4. Multiple sitemaps help with content categorization
# 5. Crawl-delay prevents server overload
# 6. Check Google Search Console regularly for crawl stats
