Add an llms.txt file — Cursor
Most sites do not have llms.txt. Sites that do get cited more often and more accurately by AI tools because the file hands the LLM a clean map of the content.
Fixing this in Cursor
Agentic AI code editor built on VSCode
In Next.js, put it in `public/llms.txt`. Or create `app/llms.txt/route.ts` returning markdown with `Content-Type: text/plain`.
Using a different tool? Pick your stack:
The prompt for Cursor
Copy and paste this into your Cursor chat exactly as-is.
Apply these changes to my codebase. Edit the files directly and keep existing formatting: Publish an llms.txt file 1. Create /public/llms.txt at the site root. 2. Start with `# <Site name>` and a one-paragraph summary of what the site does. 3. List the most important pages as `- [Title](https://full-url): one-line description`, grouped under H2 sections.
Why this matters
llms.txt is to AI what sitemap.xml is to Google — a structured map of your site, but written for LLMs instead of crawlers. It is a proposal by Answer.AI (2024) that has been adopted by Anthropic, Perplexity, and many tools as a first-read file when fetching a site.
The format is simple: a markdown file at `/llms.txt` with a title, a 1-paragraph description of your product, then H2 sections linking to your most important pages with 1-line summaries. Unlike sitemap.xml, which just lists URLs, llms.txt tells the LLM what each URL is for.
Being an early adopter matters. Most sites still do not have one — so you show up in more AI answers relative to competitors just by shipping the file. It takes 15 minutes and ages well.
How to use this prompt in Cursor
- 1. Open your Cursor project.
- 2. Copy the prompt above with the copy button.
- 3. Paste into the Cursor chat and send.
- 4. Review the diff, accept the changes, redeploy.
- 5. Verify the fix using the checklist below.
Common mistakes to avoid
- error_outlineWriting llms.txt like a sitemap (just URLs) — the value is in the 1-line summaries.
- error_outlineMaking it too long — 50-200 lines is ideal. A 2000-line llms.txt is ignored.
- error_outlineForgetting to update it when you add/remove pages — stale files are worse than none.
- error_outlineUsing absolute URLs only to other sites — reference your own pages with paths or full URLs.
How to verify the fix worked
- check_circleVisit `https://yoursite.com/llms.txt` — returns markdown text, not 404.
- check_circleRun `curl -H "Accept: text/plain" https://yoursite.com/llms.txt` — confirms the right content type.
- check_circleShare with a friend — ask them to read it and describe your product. If they can, the file works.
- check_circleAsk ChatGPT: "What does X do?" after 2-3 weeks — check if the response aligns with the file.
Frequently asked questions
Is llms.txt an official standard?expand_more
Does llms.txt replace robots.txt?expand_more
Does it help with Google SEO?expand_more
Want all 34 prompts tailored to your Cursor site?
Pantra scans your site in 10 seconds, detects the stack, and generates the exact prompts that apply — only the ones you actually need.
Scan my siteRelated Cursor prompts
Allow GPTBot, ClaudeBot, and PerplexityBot — Cursor
Prompt to whitelist AI crawlers so ChatGPT, Claude, and Perplexity can cite your pages. Works in any AI-coded stack.
SEOAdd a robots.txt that allows search + AI crawlers — Cursor
Prompt to drop a correct /public/robots.txt for Google, Bing, and AI crawlers like GPTBot and PerplexityBot in Lovable, Cursor, Bolt, v0, Replit, Windsurf, Claude Code, Base44.
AI Search / GEOPut key content in static HTML — Cursor
Prompt to ensure your headings, paragraphs, and FAQs are in the raw HTML, not rendered via client JS.
AI Search / GEOAdd JSON-LD structured data — Cursor
Prompt to add Organization, Article, and FAQ JSON-LD to <head> — tells Google and AI crawlers exactly what your page represents.