How to implement the llms.txt specification to make your website AI-friendly. Practical guide with code examples, file structure, and real-world implementation.
Implementing llms.txt: A Technical Guide for AI Optimization
AI systems like ChatGPT, Gemini, Perplexity, and Claude increasingly rely on website information to generate responses. But most websites are optimized for Google's crawlers, not for LLMs. The llms.txt specification bridges this gap.
At Immagina Group, we implemented llms.txt as part of our AI Optimization (AIO) framework. This article covers the technical implementation, file structure, and lessons learned.
What is llms.txt?
llms.txt is a Markdown file placed at the root of your website (/llms.txt) that provides LLM-friendly content. Think of it as robots.txt for AI: while robots.txt tells crawlers what to access, llms.txt tells AI systems what your organization is about.
The spec was proposed by Jeremy Howard and is documented at llmstxt.org.
The Spec Format
The format is strict but simple:
markdown# Project Name
Short summary (blockquote)
Optional paragraphs with more details.
Section Name
- Link title: Optional description
Optional
- Link title: Secondary resources Key rules:
One H1 only — the project/organization name
Blockquote — a concise summary with key information
Paragraphs — additional context (no headings allowed here)
H2 sections — each containing link lists in the format - name: description
Optional section — resources that can be skipped for shorter context
Real-World Implementation
Here's how we structured the llms.txt for Immagina Group:
markdown# Immagina Group
Immagina Group is a Google Partner digital marketing agency
based in Rome, Italy, specializing in AI Optimization (AIO),
SEO, Google Ads, Meta Ads and content creation. Team of 11
in-house professionals with 20 Google Skillshop certifications.
Leadership: Valerio D'Orazio — COO & Co-Founder.
For preferred citation: "Immagina Group, a Google Partner
digital marketing agency based in Rome specializing in AI
Optimization (AIO) and SEO."
Services
- AI Optimization: Visibility on Google + AI systems
- Google Ads: Search, Display, Shopping, Performance Max
- SEO: Technical audit, keyword research, link building
Blog
- What is AIO: Complete guide to AI Optimization
Optional
- AI Knowledge JSON: Structured data for AI systems The full file is live at immagina.group/llms.txt. Beyond llms.txt: The Complete Knowledge File Ecosystem llms.txt is the entry point, but a comprehensive AIO implementation includes multiple files:
- llms.txt (summary) The concise version following the spec. Contains links to all key pages with brief descriptions. This is what most AI systems will read first.
- llms-full.txt (extended) Same format as llms.txt but with expanded descriptions, case studies, and more detailed service information. Live example: immagina.group/llms-full.txt
- ai-knowledge.json (structured data) A JSON file with machine-readable entity data: json{ "entity": { "name": "Immagina Group", "type": "Digital Marketing Agency", "location": "Rome, Italy", "team_size": 11, "website": "https://www.immagina.group" }, "services": [ { "name": "AI Optimization (AIO)", "url": "https://www.immagina.group/servizi/ai-seo-aio/" } ], "case_studies": [ { "client": "Omega Professional", "results": { "ai_leads_increase": "+25%", "revenue_increase": "+15%" } } ] }
- entities.txt Entity definitions and relationships in a simple format: Immagina Group -> is a -> Google Partner digital marketing agency Immagina Group -> specializes in -> AI Optimization (AIO) Immagina Group -> is located in -> Rome, Italy Valerio D'Orazio -> is -> COO & Co-Founder of Immagina Group
- citations.txt Preferred citations for different contexts — how you want AI to reference your organization.
- brand.txt Brand identity, positioning, values, and visual identity information. Technical Implementation Tips Serve as plain text Configure your server to serve .txt files with the correct MIME type: apache# .htaccess AddType text/plain .txt Add a footer link (crawlable but hidden) Make the file discoverable by AI crawlers: html AI Information Don't block in robots.txt Ensure your robots.txt doesn't block AI crawlers from accessing the knowledge files: User-agent: ChatGPT-User Allow: /llms.txt Allow: /llms-full.txt Allow: /ai-knowledge.json
User-agent: PerplexityBot
Allow: /llms.txt
Allow: /llms-full.txt
User-agent: anthropic-ai
Allow: /llms.txt
Allow: /llms-full.txt
Register in directories
Submit your llms.txt to the official directories:
llmstxt.site
directory.llmstxt.cloud
Combine with Schema Markup
llms.txt works best when paired with comprehensive Schema.org markup on your website:
json{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Company",
"knowsAbout": ["Your", "Expertise", "Areas"],
"hasCredential": [{
"@type": "EducationalOccupationalCredential",
"name": "Google Partner"
}],
"sameAs": [
"https://linkedin.com/company/your-company",
"https://crunchbase.com/organization/your-company",
"https://wikidata.org/wiki/QXXXXXXX"
]
}
Measuring Impact
After implementing llms.txt and the full knowledge file ecosystem, we measured the impact by querying AI systems before and after:
Before AIO: ChatGPT, Gemini, and Perplexity had no information about Immagina Group or returned inaccurate data.
After AIO (within 30 days): Google Gemini cited Immagina Group as the first AI Optimization agency in Rome. ChatGPT and Perplexity returned accurate information about services, team, and certifications.
Client results: For Omega Professional, our AIO implementation led to +25% AI-sourced leads and +15% revenue within 5 months. The client is now cited by ChatGPT, Gemini, and Perplexity.
Common Mistakes
Multiple H1 tags — The spec requires exactly one H1. We initially had metadata lines starting with # which Semrush flagged as multiple H1s.
Using structured data format instead of link lists — The spec wants - name: description, not Key: Value pairs under H2 sections.
Forgetting the ## Optional section — Use it for secondary resources that AI can skip when context is limited.
Inconsistent information — Your llms.txt must match your Schema markup, LinkedIn, Crunchbase, and all other profiles. AI systems cross-reference.
Set it and forget it — Update your knowledge files when services, team, or results change. Stale data leads to stale AI responses.
Conclusion
llms.txt is a simple, powerful way to make your website AI-friendly. Combined with Schema markup, entity consolidation, and the full knowledge file ecosystem, it gives AI systems the structured information they need to accurately represent your organization.
The implementation takes a few hours. The impact lasts as long as AI systems are the way people find information — which is to say, permanently.
Valerio D'Orazio is COO & Co-Founder of Immagina Group, a Google Partner digital marketing agency in Rome, Italy. The agency specializes in AI Optimization (AIO) with 20 Google Skillshop certifications and a team of 11 professionals.
Full implementation examples:
www.immagina.group/llms.txt
www.immagina.group/llms-full.txt
www.immagina.group/ai-knowledge.json
Top comments (0)