GTM Strategies

How to Write an llms.txt File for B2B SaaS (With a Real Example)

Sumit Nautiyal
July 21, 2026
5
min read
Last updated:
July 21, 2026
How to Write an llms.txt File for B2B SaaS (With a Real Example)

To write an llms.txt file for a B2B SaaS, publish a plain Markdown file at yourdomain.com/llms.txt containing one H1 with your product name, a blockquote summary of what you sell and who you sell it to, then H2 sections listing your highest value URLs as Markdown links with a one line description each. Serve it as text/plain and park secondary pages under an Optional heading.

Almost every article on this topic stops at the definition. You are told the file exists, that Jeremy Howard proposed it in September 2024, and that it is Markdown. Then you are staring at a blank text editor with no idea whether your pricing page belongs in it. This post is the implementation guide: the spec in plain language, the serving details that break in production, a full copy ready example, and the verification steps. For the wider strategy around structuring pages so machines can quote them, start with our LLMO playbook and treat this file as one small component of it.

What the llms.txt Spec Actually Requires

The specification at llmstxt.org is short, and most of it is optional. The only required element is an H1 containing the name of the project or site. Everything after that is convention the ecosystem settled on because it makes the file useful.

The prescribed order is: an H1 title, then a blockquote with a short summary containing the key information needed to understand the rest of the file, then optional prose with no headings, then zero or more H2 sections containing file lists. Each list item is a required Markdown hyperlink, the bracketed name plus the URL in parentheses, then optionally a colon and notes.

The Optional heading is a real instruction, not a label. The spec gives one H2 special meaning: a section literally titled Optional. URLs listed there can be skipped when a shorter context is needed. That is your pressure valve. Changelog, careers, engineering deep dives and anything an assistant would never need to answer a buyer question goes there.

Two things people assume are in the spec but are not. llms-full.txt is a convention popularised by documentation platforms, not part of the core proposal. And the file does nothing to block or permit crawlers. It is a content offer, not an access control.

llms.txt vs robots.txt vs sitemap.xml vs llms-full.txt

These four files get discussed as if they compete. They do not. They sit at different layers and are consumed by different clients.

FileWhat it is forFormatWho actually reads itControls access?
/robots.txtTells crawlers what they may and may not fetchPlain text directivesGooglebot, GPTBot, ClaudeBot, PerplexityBot, every serious crawlerYes, crawling only
/sitemap.xmlComplete machine list of every indexable URLXMLSearch engine crawlersNo
/llms.txtCurated, hand written index of your best pages plus a summary of what you sellMarkdown served as text/plainCoding and IDE agents, MCP documentation servers, some retrieval tools, audit crawlersNo
/llms-full.txtThe full text of your documentation concatenated into one fileMarkdown, often several hundred KBAgents that want everything in one fetch, RAG pipelinesNo
/your-page.mdClean Markdown twin of a single HTML pageMarkdownAnything that followed a link out of llms.txtNo

The takeaway: your sitemap is exhaustive and machine generated, your llms.txt is selective and hand curated. If the two look alike, you built the wrong file.

Where the File Goes and How to Serve It

Root path first. The canonical location is the root: yourdomain.com/llms.txt. The spec also permits a subpath, which is why Stripe publishes at docs.stripe.com/llms.txt and Vercel at vercel.com/docs/llms.txt. With a marketing site and a docs subdomain, publish both: a small root file for product, pricing, security and contact, and a larger docs file for the API surface.

Serve it as text/plain, not HTML. Set Content-Type to text/plain with charset utf-8. This is where single page app frameworks quietly break the file: a catch all route returns your HTML shell for any unmatched path, so an agent fetching /llms.txt gets a JavaScript bundle and a 200 status.

Implementation by stack. On Next.js, either drop the file at public/llms.txt or create app/llms.txt/route.ts with a GET handler returning the string with an explicit text/plain header. On a static host, write the file into the build output directory. On Webflow, standard hosting will not let you place arbitrary files at the root, so you either front the site with a reverse proxy worker or use Webflow Cloud. Webflow also ships an open source llms.txt generator example that pulls from CMS collections.

Add a noindex header. Google has said it can make sense to return X-Robots-Tag: noindex on the llms.txt response, because external sites link to these files and a raw text file in search results is a poor experience. Do not use a robots.txt disallow instead. Disallow blocks crawling, not indexing, and it stops crawlers ever seeing the noindex header.

What to Include and What to Leave Out

The test for every candidate URL is simple. If a buyer asked an assistant a question about your category, would this page be part of a good answer? That filter kills most of what marketing teams want to add.

Include: product overview, the two or three pages explaining how the product actually works, pricing with real numbers, the docs quickstart and API reference, your top integrations, security and compliance, one or two comparison pages, and a contact route. Pricing and security are the entries teams hesitate over and the ones assistants get asked about most. If your pricing is not on a public page, the answer an assistant gives about your cost comes from a competitor comparison post instead.

Leave out: blog tag and category archives, programmatic page combinations, gated landing pages that are just a form, press releases, event pages, anything behind a login, and any page whose main content is a testimonial carousel. Careers and changelog go under Optional rather than being deleted.

Length. For a marketing site, 30 to 80 curated links is plenty. The large public examples are documentation scale: the Stripe docs file runs to roughly 90 KB, the Vercel and Anthropic docs files to roughly 200 KB each. Those index thousands of pages. Copying that size for a 40 page marketing site adds noise without signal.

A Complete llms.txt Example for a B2B SaaS

Here is a full file for Loopwire, a deliberately fictional subscription revenue reporting product. Swap the domain and the specifics and you have a working file. Note what the blockquote does: it states the category, the buyer, the integrations, the price floor and the compliance posture in five lines.

# Loopwire

> Loopwire is a subscription revenue reporting platform for B2B SaaS finance and RevOps teams. It connects to Stripe, Chargebee, NetSuite and HubSpot, reconciles billing data nightly, and produces auditable ARR, NRR and cohort reporting. Self serve from 499 USD per month. SSO, SOC 2 Type II and audit exports are on the Business plan.

Used by finance, RevOps and data teams at Series A to Series C B2B SaaS companies, typically 50 to 500 employees. Cloud only. Pricing is per connected billing source plus seats. Support is email within 24 hours, plus a shared Slack channel on Business and Enterprise.

## Product
- [Product overview](https://loopwire.example.com/product.md): What Loopwire does, the core reporting objects, and how billing data flows in.
- [ARR and cohort reporting](https://loopwire.example.com/product/arr-reporting.md): How ARR, NRR, GRR and cohort retention are calculated, edge cases included.
- [Revenue recognition](https://loopwire.example.com/product/revenue-recognition.md): ASC 606 schedules, deferred revenue waterfalls, auditor ready exports.

## Pricing
- [Pricing and plans](https://loopwire.example.com/pricing.md): Three plans, list prices, seat and connector limits, annual discount.
- [How connected sources are counted](https://loopwire.example.com/pricing/connected-sources.md): What counts as a billing source, and overage pricing.

## Docs and API
- [Quickstart](https://loopwire.example.com/docs/quickstart.md): Connect a billing source and produce a first ARR report in about 20 minutes.
- [API reference](https://loopwire.example.com/docs/api.md): REST endpoints, authentication, rate limits, pagination and error codes.
- [Data model](https://loopwire.example.com/docs/data-model.md): Subscriptions, invoices, customers, contracts, and how they join.

## Integrations
- [Stripe](https://loopwire.example.com/integrations/stripe.md): Sync scope, sync latency, and the four known limitations.
- [HubSpot](https://loopwire.example.com/integrations/hubspot.md): Which deal and company fields are written back, and on what trigger.
- [NetSuite](https://loopwire.example.com/integrations/netsuite.md): Supported subsidiaries, saved search requirements, and setup prerequisites.

## Security and compliance
- [Security overview](https://loopwire.example.com/security.md): SOC 2 Type II scope, encryption, subprocessors, data residency and retention.
- [DPA and GDPR](https://loopwire.example.com/legal/dpa.md): Standard data processing agreement and transfer mechanism.

## Comparisons
- [Loopwire vs a warehouse and BI build](https://loopwire.example.com/compare/warehouse.md): When building it yourself is the better answer.
- [Loopwire vs spreadsheet ARR tracking](https://loopwire.example.com/compare/spreadsheets.md): Where manual reconciliation breaks, and what it costs.

## Company
- [About Loopwire](https://loopwire.example.com/about.md): Team size, funding, headquarters.
- [Contact and support](https://loopwire.example.com/contact.md): Sales, support and security routes with response times.

## Optional
- [Changelog](https://loopwire.example.com/changelog.md): Product releases by date.
- [Engineering blog](https://loopwire.example.com/blog/engineering.md): Technical write ups.
- [Careers](https://loopwire.example.com/careers.md): Open roles.

Three things make that file work. The descriptions after each colon answer the question a retrieval system is actually asking, which is when should I open this link, not what is this page called. The pricing section names the pricing model, not just the plan names. And the comparison entries are honest about when you are the wrong answer, which is the kind of language that gets quoted back rather than skipped. Same principle as getting cited by ChatGPT.

The .md Companion Files Most Teams Skip

Look closely at the example and every link ends in .md. That is part of the spec. Serve a clean Markdown version of a page at the same URL with .md appended, and use index.html.md for URLs without a file name. Stripe does exactly this, which is why docs.stripe.com/testing.md resolves to plain Markdown.

This matters more than the index file itself. An agent following a link into a normal HTML page has to parse navigation, cookie banners and script tags before it reaches your content. Teams serving Markdown instead have reported large token reductions on identical content, which means cheaper retrieval and fewer parsing errors.

If you cannot generate .md twins yet, link the HTML URLs. The file still works. Just never link to .md paths that return a 404, a failure mode we see constantly on generator produced files that assumed the convention without checking the server.

Who Actually Reads This File in 2026

Ship the file with accurate expectations. Ahrefs analysed roughly 137,000 domains and found that while adoption has grown sharply, about 97 percent of published llms.txt files received no requests at all in a recent month of server log data. Of the requests that did land, SEO audit tools were the largest source at roughly 22 percent, and identified AI retrieval bots accounted for around 1 percent. Google's John Mueller has been blunt that no AI system was using the file for Search.

Where it does get used is a different layer of the stack. Coding agents and IDE assistants such as Cursor, Windsurf and Claude Code routinely look for /llms.txt and /llms-full.txt when pointed at a documentation site, and MCP based documentation servers are built directly on top of it. If you sell a developer tool or an API product, the file is doing work today for the agents your users already run. If you sell a horizontal SaaS with a thin docs section, it is cheap insurance rather than a growth lever.

That is the honest split. We wrote the skeptical version of this debate separately in does llms.txt actually work for B2B SaaS. This post is the implementation guide, not the does it work verdict. If you are still deciding whether to bother, read that one first, then come back here to build the file.

Mistakes That Quietly Break the File

Returning HTML at /llms.txt. Test with a request that shows response headers, not a browser tab. A catch all route serving your app shell is the most common silent failure.

Dumping the sitemap into it. A file with 400 programmatic URLs and no descriptions is worse than no file. It burns context for zero benefit.

Skipping the blockquote. Without it, whatever fetches your file gets a list of links and no idea what you sell. That blockquote is the highest leverage 60 words on your domain.

Descriptions that repeat the title. A link named Pricing described as Our pricing page adds nothing. Say what a reader learns there: plan structure, price floor, what a seat includes.

Letting it go stale. A file listing a plan you discontinued in March is an active liability, because it is exactly the kind of clean structured text a machine trusts over your rendered page. Regenerate it in the build pipeline.

How to Verify and Measure It

Verify in four checks. One, request the URL with headers visible and confirm a 200 status and a text/plain content type. Two, confirm the raw response contains no HTML. Three, request every URL you listed and confirm none return a 404 or a redirect chain. Four, paste the file into an assistant with a cold context and ask what the company sells and what it costs. If that answer is wrong, your blockquote is wrong.

Measure with logs, not vibes. There is no analytics dashboard for this. Filter your CDN or origin access logs for the /llms.txt path, group by user agent, and watch which named agents appear over a quarter. That is the only real evidence the file is being consumed, and it is the same log based approach behind our guide to measuring LLMO and AI visibility.

Find Out What AI Assistants Already Say About You

Publishing llms.txt is the easy half hour. The harder question is whether ChatGPT, Claude, Perplexity and Google's AI surfaces mention you at all, and which sources they pull instead of yours. DevCommX built a free AI Visibility Checker that runs your brand and category prompts across the major assistants and shows the citation gap in plain terms. We then build the signal based GTM systems that turn those answers into pipeline, with clients owning the infrastructure end to end, which is how our clients get from setup to 40 plus qualified demos in roughly six weeks. Book a GTM strategy call to run your AI visibility audit.

Further Reading

FAQ

Where exactly should the llms.txt file live?

The canonical location is the site root, at yourdomain.com/llms.txt. The spec also allows a subpath, which is why Stripe and Vercel publish theirs under their documentation paths. If you have both a marketing site and separate docs, publish two files: a short root file covering product, pricing, security and contact, and a larger docs file for the API surface.

Does an llms.txt file help you rank in Google AI Overviews?

No. Google has stated plainly that no AI system was using llms.txt for Search, and that this is obvious from server logs. AI Overview visibility comes from normal crawlable content, topical coverage and citations from other sites. Treat llms.txt as infrastructure for agents and documentation retrieval, not a ranking factor.

What is the difference between llms.txt and llms-full.txt?

The llms.txt file is a curated index: an H1, a blockquote summary, and H2 sections of links with one line descriptions. The llms-full.txt file is a convention rather than part of the core spec, and it contains the full text of your documentation concatenated into one large file. Publish the index first. Only add the full file if you have real documentation to serve.

How many links should a B2B SaaS llms.txt file contain?

For a marketing site, 30 to 80 curated links is usually right. The large public files from Stripe, Vercel and Anthropic run to roughly 90 to 200 KB because they index thousands of documentation pages. Copying that scale for a 40 page site adds noise. If your file looks like your sitemap, you built the wrong file.

Do I need to serve .md versions of every page I link?

It is the recommended convention. The spec says to serve a clean Markdown version at the same URL with .md appended, and index.html.md for URLs without a file name. It cuts parsing errors and token usage. If you cannot generate them yet, link the normal HTML URLs. Never link to .md paths that 404.

Should llms.txt be blocked in robots.txt?

No. Blocking the path prevents the exact fetches you wanted and does not reliably keep the file out of search results, because a disallow stops crawling rather than indexing. If you want to keep it out of the index, return an X-Robots-Tag noindex header on that response instead, which Google has said can make sense for these files.

👉 Create Your llms.txt File

Sumit Nautiyal

Sumit Nautiyal is a Revenue Operations strategist, GTM architect, and B2B growth systems expert who has partnered with 300+ companies across 4 continents to close the gap between revenue potential and revenue reality. With 150+ GTM and RevOps implementations.

Table of Content
Example H2
Example H3
Share it with the world!
Get a Quick Audit
Planning your next GTM move? Get a quick audit of your sales, outbound, and RevOps systems.
Amrit Pal Singh
Digital Advertising
Vignesh Waram
LinkedIn sales strategy

 Book Your Free GTM Audit

Replace manual prospecting with intelligent automation.
Let your sales team focus on closing.

Free GTM Audit Shade image
Free GTM Audit Shade image