AI Search Optimization

How to Create llms.txt for AI Search Engines

llms.txt helps AI search engines like ChatGPT, Perplexity, and Gemini understand your site. Learn how to write, deploy, and maintain it with real examples.

5 min read2026-04-25

What Is llms.txt?

llms.txt is a Markdown file designed to help AI systems understand your site. Placed at your site's root (/llms.txt), it provides a summary of your site, links to key pages, and document structure for AI consumption. The specification was published by llmstxt.org in 2024 and is rapidly gaining adoption.

robots.txt

Controls crawler access. Tells bots which pages to crawl or skip.

llms.txt

Provides site information to AI. Tells AI agents what your site is about and where to find key content.

Why Does llms.txt Matter Now?

As AI search grows, optimizing for AI-generated responses (GEO: Generative Engine Optimization) is becoming as important as traditional SEO. AI systems prefer structured Markdown text over parsing HTML. llms.txt bridges that gap.

10%

Percentage of sites with llms.txt (as of 2025)

3.7x

AI citation probability with structured data

74.2%

AI-cited content in list or table format

How to Write llms.txt

llms.txt is written in Markdown format. The llmstxt.org specification defines the following elements.

H1 title (required)

Start the file with your site name as an H1 heading.

blockquote for site overview (recommended)

Write a site description using a blockquote (>) block. This is what AI reads first.

H2 sections for categories

Create sections like ## Docs, ## Blog, ## Services to organize your content.

Link format for page listings

List pages as - [Page Name](https://absolute-url): Description. Relative URLs are not supported.

llms.txt
# Example Company

> AIマーケティングプラットフォームを提供する企業です。
> コンテンツ最適化・SEO分析・パフォーマンス計測ツールを提供しています。

## ドキュメント

- [はじめに](https://example.com/docs/getting-started): セットアップガイド
- [APIリファレンス](https://example.com/docs/api): エンドポイント一覧
- [料金プラン](https://example.com/pricing): プラン比較表

## ブログ

- [SEO最適化の基本](https://example.com/blog/seo-basics): 2024年最新ガイド
- [構造化データの活用](https://example.com/blog/schema): Schema.org実装方法

How to Deploy llms.txt

1

Place the file at /llms.txt

Deploy llms.txt to your site root so it's accessible at https://yourdomain.com/llms.txt. In Next.js, placing it in /public/llms.txt serves it automatically.

2

Also place at /.well-known/llms.txt (recommended)

It is recommended to also place the file in /.well-known/. Some AI agents reference this path as well.

3

Create llms-full.txt for the full document version (optional)

llms-full.txt contains concatenated Markdown content of all pages. Useful when you want to provide detailed information to AI. Especially effective for large sites.

Common Mistakes to Avoid

Writing it in HTML

llms.txt must be written in Markdown. Using HTML tags prevents AI from parsing it correctly. Use plain Markdown only.

Missing the H1 title

The specification requires an H1 (#) with your site name at the top of the file. Without it, the file is not considered compliant with the llmstxt.org specification.

Using relative paths for links

Links must use absolute URLs like https://yourdomain.com/docs/guide, not relative paths like /docs/guide.

Not updating when the site changes

Failing to update llms.txt when pages are added or removed means you're feeding outdated information to AI. Sync it through your CI/CD pipeline or regular maintenance.

Check Your Site's llms.txt Settings

Enter a URL to instantly check your llms.txt status, structured data, and SEO score for free. See how AI-search-ready your site is right now.

FAQ

Does llms.txt actually work?
There is no clear evidence yet of increased citation counts. However, as AI search standardization accelerates, early adoption offers a high return for low implementation cost. We recommend setting it up before llmstxt.org specifications become the industry standard.
What is the difference between llms.txt and robots.txt?
robots.txt controls crawler access to your site. llms.txt provides a Markdown-formatted summary of your site content so AI systems can better understand it. Both are placed in the root directory, but they serve completely different purposes.
What is the difference between llms.txt and llms-full.txt?
llms.txt is a navigation overview file that AI agents reference first. llms-full.txt is a comprehensive file containing all documents from your site. Best practice is to start with llms.txt, then optionally add llms-full.txt.
Which AI systems read llms.txt?
It has not been officially confirmed that major AI platforms (ChatGPT, Perplexity, Gemini) read llms.txt. However, AI agents supporting the Model Context Protocol (MCP) are increasingly referencing llms.txt, and broader standardization is expected.
How do I add llms.txt to WordPress?
There are two methods. First, upload the llms.txt file directly to your WordPress root directory (same location as wp-config.php) via FTP or a file manager. Second, use a dedicated plugin like 'LLMs.txt for WordPress' which can auto-update the file as your site changes.