LLMsTxtReady
Astro Static & SSR / Starlight

llms.txt Generator for Astro & Starlight Sites

Astro's zero-JS static HTML already gives you a massive head start with AI crawlers. Generate your /llms.txt and ship it via public/ or a static Astro endpoint.

Instant 1-click demos:
Where to Deploy /llms.txt on Astro
public/llms.txt or src/pages/llms.txt.ts

Astro sites can drop a static file into public/llms.txt or auto-generate /llms.txt directly from Astro Content Collections at build time using src/pages/llms.txt.ts.

Step-by-Step Astro Setup

  1. 01

    Scan your live Astro production domain above to audit metadata, sitemap-index.xml, and AI bot rules.

  2. 02

    Copy the generated Markdown as your starter template or feed your Content Collections into src/pages/llms.txt.ts.

  3. 03

    Add public/llms.txt (or the static endpoint below) and rebuild your Astro project.

  4. 04

    Verify /llms.txt returns text/plain on Cloudflare Pages, Netlify, or Vercel.

Build-Time Astro Endpoint (src/pages/llms.txt.ts)
import type { APIRoute } from "astro";
import { getCollection } from "astro:content";

export const GET: APIRoute = async ({ site }) => {
  const docs = await getCollection("docs");
  const origin = site?.toString().replace(/\/$/, "") ?? "https://yourdomain.com";
  const links = docs
    .slice(0, 30)
    .map((entry) => `- [${entry.data.title}](${origin}/${entry.slug})`);

  const content = [
    "# Project Documentation",
    "",
    "> Official documentation and API reference.",
    "",
    "## Documentation & Guides",
    ...links,
  ].join("\n");

  return new Response(content, {
    headers: { "Content-Type": "text/plain; charset=utf-8" },
  });
};

Recommended Astro llms.txt Blueprint

## Core Pages

Project overview, install guide, and architecture summary.

## Documentation & Guides

Top Starlight or Astro Content Collection pages sorted by reader priority.

## Resources & Blog

Release notes, migration guides, and tutorials.

## Optional

License, changelog, and community links.

Common Astro AI Search Pitfalls

Forgetting to install @astrojs/sitemap so crawlers miss new content collection routes.

Not configuring the site property in astro.config.mjs, causing missing canonical URLs.

Shipping Starlight docs without Organization or TechArticle JSON-LD in the custom head slot.

Astro llms.txt FAQs

Why do Astro sites typically score high on AI search readiness?

Astro ships clean, server-rendered semantic HTML with minimal client JavaScript, making it effortless for PerplexityBot, ClaudeBot, and OAI-SearchBot to parse without headless browser rendering.

Can I generate llms.txt automatically from Astro Content Collections?

Yes! Creating src/pages/llms.txt.ts lets Astro output a static /llms.txt file during astro build directly from your Markdown/MDX collections.

Does Starlight include an llms.txt file by default?

Not out of the box—you can add our generated file to public/llms.txt in 30 seconds or wire up the static endpoint snippet above.

Transparent Pricing

Free On-Demand Scanner. Automate When You Scale.

Generate and download /llms.txt free forever with zero login. Upgrade only when you want automated weekly syncs, crawler-block alerts, or agency client reports.

Free Studio
$0/ forever

Everything you need to audit any public site and ship a clean /llms.txt today.

  • Unlimited zero-login live domain scans
  • 0–100 AI Search Visibility Score & breakdown
  • 8-bot robots.txt AI crawler inspection
  • Spec-compliant /llms.txt generator (Copy & Download)
  • JSON-LD, canonical & semantic HTML audit
Use Free Scanner Above
Most Popular
Growth
$19/ month

For SaaS teams, Shopify merchants, and publishers keeping AI search visibility continuously protected.

  • Up to 3 monitored production domains
  • Weekly auto-regenerated /llms.txt diffs & hosted URL
  • Instant email/Slack alerts if any AI search bot gets blocked
  • Sitemap & JSON-LD regression tracking
  • Historical 0–100 GEO score trendline
Agency
$59/ month

Built for SEO agencies and web studios delivering client-ready GEO audits at scale.

  • 25 client websites with weekly auto-monitoring
  • White-label GEO Audit PDF exports for client pitches
  • Multi-client AI crawler block alert digest
  • Bulk /llms.txt regeneration across Shopify, WP & Webflow
  • Priority onboarding & custom webhook notifications