Best Practices for Your llms.txt File
Best Practices for Your llms.txt File
Creating an effective llms.txt file is crucial for proper communication with AI systems. This guide will walk you through the best practices.
File Location
Your llms.txt file should be located at the root of your domain:
https://yourdomain.com/llms.txt
This ensures AI systems can easily discover and access it.
File Structure
Use Clear Sections
Organize your content with clear headings:
# AI Usage Guidelines ## Allowed Use Cases - Educational purposes - Research and analysis ## Prohibited Use Cases - Commercial redistribution - Training without attribution
Include Metadata
Provide context about your site:
# About This Site - **Domain**: example.com - **Last Updated**: 2025-01-20 - **Contact**: [email protected]
Content Guidelines
Be Specific
Avoid vague language. Instead of: ā "Please use our content responsibly"
Use: ā "Our content may be used for research with proper attribution"
Keep Links Working
Regularly verify all referenced links:
- Policy documents
- Terms of service
- Contact pages
- Documentation
Update Regularly
Set a schedule to review your file:
- Monthly for active sites
- Quarterly for stable content
- After any policy changes
Common Mistakes to Avoid
1. Missing File
The most common issue is simply not having a llms.txt file. Create one today!
2. Broken Links
Dead links create a poor experience. Use our tool to verify all links regularly.
3. Outdated Information
An outdated policy is worse than no policy. Keep it current!
4. Poor Formatting
Invalid markdown makes your file harder to parse. Follow standard markdown conventions.
Example Template
Here's a basic template to get you started:
# llms.txt - AI Content Guidelines ## About [Brief description of your site and its purpose] ## Content Usage Policy - Allowed uses - Prohibited uses - Attribution requirements ## Training Data - Can our content be used for training? [Yes/No] - Any restrictions or requirements ## Contact - Email: [your-email] - Policy updates: [link-to-changelog] ## Additional Resources - [Terms of Service](https://example.com/terms) - [Privacy Policy](https://example.com/privacy)
Validation
After creating or updating your file, always run it through llmsaudit.com to:
- Verify markdown syntax
- Check all links
- Ensure proper formatting
- Get improvement suggestions
Conclusion
A well-maintained llms.txt file helps AI systems understand and respect your content preferences. Use these best practices to create an effective file that serves both your interests and the AI community.
Ready to validate your file? Start your audit now!