AI Search / GEO·Cursor
AI Search / GEOCursor

Add an llms.txt fileCursor

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.

rocket_launch

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. 1. Open your Cursor project.
  2. 2. Copy the prompt above with the copy button.
  3. 3. Paste into the Cursor chat and send.
  4. 4. Review the diff, accept the changes, redeploy.
  5. 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
It is a community-driven spec (llmstxt.org) that major AI tools have adopted. Not an IETF RFC, but widely supported in practice.
Does llms.txt replace robots.txt?expand_more
No. robots.txt controls access permissions. llms.txt provides content navigation. Use both.
Does it help with Google SEO?expand_more
Indirectly. Google does not currently parse llms.txt for ranking. But AI-search traffic it enables is real, and Google AI Overviews may use it in the future.

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 site

Related Cursor prompts