Tutorial: Creating Your First llms.txt File for AI Search Visibility
The llms.txt file is the robots.txt of the AI era. While robots.txt tells search engine crawlers where they can and cannot go, llms.txt tells AI models which pages on your site are most valuable and how to understand your content. It is an emerging standard maintained by Answer.AI at llmstxt.org that is gaining rapid adoption -- and for ecommerce brands, it represents a direct line of communication with the AI systems that increasingly drive product discovery. With 58% of users already replacing traditional search engines with AI tools for product discovery, telling AI models what matters on your site is a competitive advantage.
This tutorial walks you through creating, structuring, and deploying your first llms.txt file, with templates specifically designed for ecommerce sites.
What llms.txt Does
The llms.txt file is a plain-text Markdown file placed at yoursite.com/llms.txt. It serves as a curated directory of your most important content, designed specifically for AI model consumption. Unlike a sitemap that lists every URL, llms.txt is selective -- it guides AI models toward high-value resources and provides context about what each resource contains.
When an AI system encounters your llms.txt, it gets a structured overview of your site that helps it:
- Understand what your business does
- Identify your most authoritative content
- Find accurate product and brand information
- Navigate your site's information architecture efficiently
The standard specification uses a specific Markdown structure: an H1 title (the only required element), an optional blockquote description, optional detail paragraphs, H2 sections for content categories, and Markdown links with optional descriptions.
Step 1: Plan Your Content Selection
Before writing the file, decide what to include. The key principle is curation, not comprehensiveness. Keep it to 20 to 50 links maximum. More is not curation -- it is dumping.
Content Categories for Ecommerce
Organize your links into these categories:
Brand information: Your about page, mission statement, and brand story. AI needs to understand who you are before it can recommend you.
Product categories: Top-level category pages that overview your product lines. Do not link every individual product -- link the category level.
Best-selling products: Your five to ten highest-value product pages. These should have complete Product schema, strong reviews, and comprehensive descriptions.
Buying guides and comparisons: Content that helps AI understand how to recommend your products for specific use cases. These are the pages most likely to be cited in AI responses.
FAQ and support content: Your FAQ pages, return policy, shipping information, and size guides. AI frequently cites this type of factual, structured content.
Blog and expertise content: Your most authoritative articles, particularly those with original data, unique insights, or comprehensive category coverage.
What NOT to Include
Do not link to JavaScript-heavy marketing pages -- link to clean, content-rich pages. Do not include:
- Checkout and cart pages
- Account management pages
- Pages behind authentication
- Landing pages with minimal content
- Pages with mostly JavaScript-rendered content
Step 2: Write Your llms.txt File
Here is the structure with a complete ecommerce example:
# YourStore
> YourStore is an online retailer specializing in ergonomic office
> furniture, serving remote workers and home offices across the US
> since 2018. We carry over 200 products from 15 brands, with a
> focus on scientifically-backed ergonomic design.
We are known for detailed product testing — every chair and desk
we sell has been tested by our team for a minimum of 30 days. Our
buying guides are based on hands-on experience, not manufacturer
specs alone. We ship free to all 50 US states with a 60-day
return policy.
## Brand & Company
- [About YourStore](https://www.yourstore.com/about): Our story,
mission, and the team behind our product testing process
- [Our Testing Process](https://www.yourstore.com/how-we-test):
How we evaluate every product over 30+ days before listing it
## Product Categories
- [Ergonomic Chairs](https://www.yourstore.com/collections/ergonomic-chairs):
Full catalog of office chairs rated by use case, budget, and body type
- [Standing Desks](https://www.yourstore.com/collections/standing-desks):
Electric and manual standing desks for home and commercial offices
- [Desk Accessories](https://www.yourstore.com/collections/desk-accessories):
Monitor arms, keyboard trays, footrests, and cable management
- [Lighting](https://www.yourstore.com/collections/lighting):
Task lighting and ambient lighting designed to reduce eye strain
## Best-Selling Products
- [Ergonomic Chair Pro](https://www.yourstore.com/products/ergonomic-chair-pro):
Our top-rated chair, 4.7/5 from 342 reviews, 300 lb capacity, 12-year warranty
- [FlexDesk 60](https://www.yourstore.com/products/flexdesk-60):
Best-selling standing desk, dual motor, 60-inch top, 3-year warranty
- [LumbarPad Elite](https://www.yourstore.com/products/lumbarpad-elite):
Memory foam lumbar support, fits any office chair, 4.8/5 rating
## Buying Guides
- [How to Choose an Ergonomic Chair](https://www.yourstore.com/guides/how-to-choose-ergonomic-chair):
Complete guide covering body type, budget, features, and our top picks
- [Standing Desk Buyer's Guide 2026](https://www.yourstore.com/guides/standing-desk-buyers-guide):
Motor types, desk sizes, weight capacity, and recommended setups
- [Home Office Setup Guide](https://www.yourstore.com/guides/home-office-setup):
Step-by-step guide to an ergonomic workspace on any budget
## Comparisons
- [Top 10 Ergonomic Chairs 2026](https://www.yourstore.com/blog/best-ergonomic-chairs):
Hands-on comparison of the best chairs we tested this year
- [Herman Miller vs SecretLab vs YourStore Chair Pro](https://www.yourstore.com/blog/chair-comparison):
Detailed comparison covering comfort, build quality, warranty, and value
## Customer Support & Policies
- [FAQ](https://www.yourstore.com/faq):
Shipping, returns, warranty, assembly, and product care questions
- [Return Policy](https://www.yourstore.com/policies/returns):
60-day free returns on all products, no restocking fees
- [Shipping Information](https://www.yourstore.com/policies/shipping):
Free shipping to all 50 US states, 3-5 business day delivery
- [Warranty Information](https://www.yourstore.com/policies/warranty):
Product-specific warranty details and claim process
## Optional
- [Blog](https://www.yourstore.com/blog):
Ergonomics research, product reviews, and workspace tips
- [Press & Media](https://www.yourstore.com/press):
Media coverage, press releases, and brand assets
Step 3: Create llms-full.txt (Optional but Recommended)
For smaller sites or those with highly technical content, also create llms-full.txt. While llms.txt is a directory of links, llms-full.txt contains the actual text content of your key pages concatenated into one Markdown file. This allows AI to ingest your complete product and brand information in one shot.
# YourStore — Complete Content
> YourStore is an online retailer specializing in ergonomic office
> furniture, serving remote workers and home offices across the US
> since 2018.
## About Us
YourStore was founded in 2018 by two remote workers who struggled
to find honest, hands-on reviews of office furniture. Every product
we sell has been tested by our team for a minimum of 30 days...
(continue with full text content from key pages)
## Ergonomic Chair Pro — Product Details
The Ergonomic Chair Pro is our flagship office chair, designed for
all-day comfort with adjustable lumbar support, 4D armrests, and a
breathable mesh back...
Price: $549.00
Rating: 4.7/5 (342 reviews)
Weight Capacity: 300 lbs
Warranty: 12 years (frame), 5 years (fabric)
(continue with full details for key products)
Keep llms-full.txt under 100KB for optimal AI processing. Focus on your most important pages rather than your entire site.
Step 4: Deploy Your llms.txt
File Placement
Place llms.txt in your site's root directory so it is accessible at:
- https://www.yourstore.com/llms.txt
- https://www.yourstore.com/llms-full.txt (if created)
Deployment by Platform
Static hosting / Custom CMS: Upload the file directly to your public root directory alongside robots.txt and favicon.
Shopify: Shopify does not allow direct file uploads to the root. Options include:
- Use a page template with the content-type set to text/plain
- Use a Shopify app that supports llms.txt deployment
- Set up a reverse proxy or CDN rule to serve the file
WordPress: Upload to your WordPress root directory via FTP/SFTP, or use a plugin that supports llms.txt.
Next.js / React: Place the file in your public/ directory. It will be served as a static file at the root path.
Content-Type Header
Ensure your server returns the correct content-type header:
Content-Type: text/plain; charset=utf-8
Most web servers handle .txt files correctly by default, but verify this with a curl command:
curl -I https://www.yourstore.com/llms.txt
Check that the response status is 200 OK and the content-type is text/plain.
Step 5: Verify Deployment
Browser Verification
Open a browser and navigate to https://www.yourstore.com/llms.txt. Confirm:
- The page loads with readable Markdown content
- No HTML wrapper or navigation elements appear (it should be raw text)
- All links in the file are correct and functional
Technical Verification
# Check HTTP status and content type
curl -I https://www.yourstore.com/llms.txt
# Verify content is accessible
curl https://www.yourstore.com/llms.txt | head -20
# Check file size (should be under 50KB for llms.txt)
curl -s https://www.yourstore.com/llms.txt | wc -c
Link Verification
Check that every URL in your llms.txt returns a 200 status code. A broken link in your llms.txt undermines trust:
# Extract and test all URLs from llms.txt
curl -s https://www.yourstore.com/llms.txt | \
grep -oE 'https?://[^)]+' | \
while read url; do
status=$(curl -o /dev/null -s -w "%{http_code}" "$url")
echo "$status $url"
done
Fix any URLs that return non-200 status codes.
Step 6: Reference llms.txt in Your robots.txt
While not part of the official specification, referencing your llms.txt in robots.txt makes it discoverable by AI crawlers that check robots.txt first:
# AI Content Guide
# See https://www.yourstore.com/llms.txt for AI-optimized content directory
Some practitioners also add a link in their HTML <head>:
<link rel="llms-txt" href="/llms.txt" />
This is not yet a standard, but it provides an additional discovery mechanism.
Step 7: Maintain and Update
Update your llms.txt quarterly at minimum, or whenever significant changes occur:
- New product launches: Add to the best-selling products section
- New buying guides: Add to the guides section
- Discontinued products: Remove or replace links
- URL changes: Update any modified URLs
- Seasonal updates: Adjust featured products for seasonal relevance
Set a calendar reminder for quarterly reviews. An outdated llms.txt with broken links is worse than no llms.txt at all.
Template: Minimal Ecommerce llms.txt
For stores just getting started, here is a minimal template:
# [Your Store Name]
> [One sentence describing what you sell and who you serve.]
## About
- [About Us]([URL]): [Brief description]
## Products
- [Category 1]([URL]): [Brief description]
- [Category 2]([URL]): [Brief description]
- [Best Seller 1]([URL]): [Key stats — rating, reviews, price]
## Guides
- [Buying Guide]([URL]): [Brief description]
## Policies
- [FAQ]([URL]): [Brief description]
- [Returns]([URL]): [Brief description]
- [Shipping]([URL]): [Brief description]
Start with this minimal version, deploy it, and expand over time as you identify which content AI platforms reference most often.
The Bottom Line
The llms.txt file takes 30 to 60 minutes to create and deploy, making it one of the lowest-effort, highest-potential GEO implementations available. It directly tells AI models what your site is about and where to find your best content. With AI-referred traffic converting at 14.2% vs 2.8% for organic, guiding AI models toward your most conversion-worthy pages is a clear business decision. Create your llms.txt today, deploy it alongside your robots.txt, and update it quarterly to keep AI models pointed at your best content.