4 min to read
Creating an llms.txt
file is a crucial step for making your website more accessible and understandable to Large Language Models (LLMs). This guide covers everything you need to know about the llms.txt
standard, from its purpose and structure to step-by-step creation, automation, and best practices.
The llms.txt
file is a standardized Markdown document placed in the root directory of your website (e.g., https://yourwebsite.com/llms.txt
). Its main purpose is to provide LLMs with a concise, structured overview of your site's content.
It enables them to understand, navigate, and retrieve information more effectively. It serves a similar function to robots.txt
and sitemap.xml
, but is specifically tailored for AI systems rather than search engines or crawlers.
File Name | Purpose | Content Level |
---|---|---|
llms.txt | Concise summary, key links, and essential documentation | High-level |
llms-full.txt | Comprehensive, full documentation in Markdown format | Detailed/full |
The llms.txt
file follows a specific Markdown-based structure, making it both human- and machine-readable:
MyWebsite is a platform offering e-commerce solutions, including product automation and AI-driven analytics.
This website contains extensive documentation on our API, automation tools, and AI-powered insights.
llms.txt
.a. Add the H1 Header
MyWebsite Docs
b. Write a Blockquote Summary
MyWebsite is a platform offering e-commerce solutions, including product automation and AI-driven analytics.
c. Add Additional Context (Optional)
This website contains extensive documentation on our API, automation tools, and AI-powered insights.
d. List Core Documentation in H2 Sections
e. Add an Optional Section
Optional
llms.txt
to your website’s root directory so it is accessible at https://yourwebsite.com/llms.txt
.For large or frequently updated sites, automation is recommended.
import os
docs_directory = "./docs"
llms_txt_path = "./llms.txt"
with open(llms_txt_path, "w") as f:
f.write("# MyWebsite Docs\n\n")
f.write("> MyWebsite provides AI-powered tools for e-commerce.\n\n")
f.write("## Core Documentation\n")
for doc in os.listdir(docs_directory):
if doc.endswith(".md"):
doc_name = doc.replace(".md", "").replace("-", " ").title()
doc_url = f"https://mywebsite.com/docs/{doc}"
f.write(f"- {doc_name}\n")
f.write("\n## Optional\n")
f.write("- Blog\n")
f.write("- Customer Stories\n")
print("LLMs.txt generated successfully!")
Several tools can automate or assist in generating llms.txt
:
llms.txt
and llms-full.txt
via API1.llms.txt
file.https://yourwebsite.com/llms.txt
to confirm it’s publicly accessible.For sites with extensive documentation, consider also providing an llms-full.txt
file:
Implementing an llms.txt
file is a straightforward yet powerful way to make your website more accessible to LLMs and AI agents. By following the standardized Markdown format, updating your file, and leveraging automation where possible, you ensure that AI systems can understand and utilize your content efficiently.
Connect with top remote developers instantly. No commitment, no risk.
Tags
Discover our most popular articles and guides
Running Android emulators on low-end PCs—especially those without Virtualization Technology (VT) or a dedicated graphics card—can be a challenge. Many popular emulators rely on hardware acceleration and virtualization to deliver smooth performance.
The demand for Android emulation has soared as users and developers seek flexible ways to run Android apps and games without a physical device. Online Android emulators, accessible directly through a web browser.
Discover the best free iPhone emulators that work online without downloads. Test iOS apps and games directly in your browser.
Top Android emulators optimized for gaming performance. Run mobile games smoothly on PC with these powerful emulators.
The rapid evolution of large language models (LLMs) has brought forth a new generation of open-source AI models that are more powerful, efficient, and versatile than ever.
ApkOnline is a cloud-based Android emulator that allows users to run Android apps and APK files directly from their web browsers, eliminating the need for physical devices or complex software installations.
Choosing the right Android emulator can transform your experience—whether you're a gamer, developer, or just want to run your favorite mobile apps on a bigger screen.
The rapid evolution of large language models (LLMs) has brought forth a new generation of open-source AI models that are more powerful, efficient, and versatile than ever.