No llms.txt published
What Is This Issue
llms.txt is a plain-text Markdown file placed at the root of a website (e.g., https://example.com/llms.txt). It helps AI language models discover and understand a site’s key content in a structured, LLM-friendly format. This issue checks whether your site has an llms.txt file, whether it’s properly formatted, and accessible.
A passing implementation requires:
- An
llms.txtfile exists at your root domain - The file returns HTTP
200 OKwithContent-Type: text/plain - The file follows proper Markdown structure (H1 heading, blockquote description, section headings)
- All listed URLs in the file return
200 OKstatus - The file size is under the recommended limit (50-100KB)
- A discovery tag is present in your homepage
<head>
Example: A properly configured llms.txt file at https://example.com/llms.txt with a site title, description, section headings, and links to key pages.
Why Is This Important
The llms.txt file is important for SEO because it:
- Improves AI Discoverability: Helps AI language models find and understand your most important content
- Enhances AI Search/AEO: Increases chances of your content being referenced in AI-generated answers
- Provides Structured Context: Gives LLMs a curated index of your site instead of parsing entire HTML pages
- Future-Proofs SEO: As AI search grows, having an
llms.txtfile positions your site for AI-driven discovery
While still a proposed standard (not yet officially adopted by all AI models), llms.txt is increasingly used by technical sites and AI platforms. Implementing it early can give you an advantage in AI search visibility.
Resolving this issue improves your overall SEO health score by ensuring your site is optimized for the growing AI search ecosystem.
How XeoPix Detects This
XeoPix performs llms.txt validation through the following logical steps:
-
File Discovery: XeoPix attempts to fetch
{site_root}/llms.txtand records the HTTP status code. -
Format Validation: If the file exists (returns
200 OK), XeoPix checks:- The
Content-Typeheader istext/plain(not HTML or JSON) - The file starts with an H1 heading (
#) - The file has a blockquote description (
>) - The file has at least one section heading (
##)
- The
-
Link Validation: XeoPix extracts all URLs listed in the Markdown file and sends
HEADrequests to verify they return200 OK. -
Size Check: XeoPix checks the file size to ensure it doesn’t exceed recommended limits.
-
Discovery Tag Check: XeoPix parses your homepage
<head>to verify the<link rel="llms">tag is present. -
Issue Identification: XeoPix raises issues when:
llms.txtfile is missing (STANDARD)- Server returns
5xxerror (IMPORTANT) - File is not properly formatted as Markdown (IMPORTANT)
- Listed URLs return non-200 status (IMPORTANT)
- File exceeds size limits (STANDARD)
- Discovery tag is missing from homepage (STANDARD)
How To Fix
-
Create the file: Create a plain text file named exactly
llms.txtat your domain root (https://example.com/llms.txt). -
Structure with Markdown: Format the file using proper Markdown:
- Start with an H1 heading:
# Your Site Name - Add a blockquote description:
> Brief description of your site - Add section headings:
## Documentation,## Products, etc. - Add links:
- [Page Title](https://example.com/page): Description
- Start with an H1 heading:
-
Serve with correct headers: Ensure the file returns:
- HTTP
200 OKstatus Content-Type: text/plainheader
- HTTP
-
Validate links: Ensure all URLs listed in the file return
200 OKwhen accessed. -
Add discovery tag: Include this tag in your homepage
<head>:<link type="text/plain" rel="llms" href="/llms.txt" /> -
Keep file size reasonable: Aim for under 50KB to ensure fast processing by LLMs.
-
Test the file: Validate that:
- The file is accessible at the root URL
- The Markdown is properly formatted
- All listed links work
- The discovery tag is present in your homepage
What We Store
Storage Level
Site Level
Database Table / Prisma Model
SiteCrawlBehaviourData
Stored Fields
| Field | Type | Description |
|---|---|---|
| robotsTxtData | Json? | Robots.txt content and directives in JSON format |
Detection Dependencies
- robots.txt
Examples
Example 1: Missing llms.txt file
Problematic state (fails):
- No
llms.txtfile exists athttps://example.com/llms.txt - XeoPix returns a 404 error when attempting to fetch the file
- Issue raised: “llms.txt file is missing”
Corrected state (passes):
- Create
llms.txtfile at the root domain - File returns HTTP
200 OK - Issue resolved
Example 2: Improperly formatted llms.txt
Problematic state (fails):
My Website
This is my website description.
Some links:
- https://example.com/page1
- https://example.com/page2Issues:
- Missing H1 heading (
#) - Missing blockquote description (
>) - No section headings (
##) - URLs not formatted as Markdown links
Corrected state (passes):
# My Website
> This is my website description.
## Documentation
- [Getting Started](https://example.com/docs): Learn how to use our product
- [API Reference](https://example.com/api): Complete API documentation
## Products
- [Product A](https://example.com/product-a): Our flagship productExample 3: Missing discovery tag
Problematic state (fails):
llms.txtfile exists and is properly formatted- Homepage HTML does not include the discovery tag
- Issue raised: “Discovery tag is missing from homepage”
Corrected state (passes):
Add to homepage <head>:
<link type="text/plain" rel="llms" href="/llms.txt" />XeoPix detects the tag and the issue is resolved.
Unit Test
Test File
xeopix-crawling-v2/__tests__/seo-audit-checks/geoAiEngineSignals/issue-186-llms-txt-directive.test.js
Purpose
Validates the llms.txt directive detection in robots.txt — ensuring the system correctly identifies whether a site declares an llms.txt file via the llms.txt: directive in its robots.txt, and persists the corresponding audit issue when the directive is missing.
Tested Function
runGeoAiEngineSignals from toggleGroups/geoAiEngineSignals.js
Issue Information
- Issue Number: 186
- Issue Code:
llms_txt_file - Toggle Group:
geoAiEngineSignals
Test Scenarios
Positive Test Cases
- llms.txt directive present and accessible
robots.txtcontains:User-agent: *\nAllow: /\nllms.txt: https://example.com/llms.txtllms.txtfile returns HTTP 200 with content- Expects
hasLlmsTxt: true,llmsTxtCount: 1,llmsTxtUrls: ['https://example.com/llms.txt'] - Expects no detected issues — the
detectedIssuesarray is empty - Expects no POST to
audit-issues/bulk
Negative Test Cases
- llms.txt directive missing from robots.txt
robots.txtcontains:User-agent: *\nAllow: /(nollms.txt:directive)llms.txtfile returns HTTP 404- Expects
hasLlmsTxt: false,llmsTxtCount: 0,llmsTxtUrls: [] - Expects a detected issue with
issueCodeequal toIssueCode.LLMS_TXT_FILE - Expects a POST to
audit-issues/bulkcontaining the issue in theitemsarray
Boundary Cases
None explicitly tested.
Edge Cases
None explicitly tested.
Expected Outcome
Pass
The issue should be reported (i.e., detectedIssues contains LLMS_TXT_FILE) when:
robots.txtexists but does not contain anllms.txt:directive.
Fail
The issue should not be reported (i.e., detectedIssues is empty) when:
robots.txtcontains anllms.txt:directive pointing to a valid, accessiblellms.txtfile.
Validation
The unit test verifies:
- Correct issue detection: When the
llms.txt:directive is absent fromrobots.txt, the function returnshasLlmsTxt: falseand includesLLMS_TXT_FILEindetectedIssues. - No issue detection when expected: When the
llms.txt:directive is present and the file is accessible, the function returnshasLlmsTxt: truewith no detected issues. - Payload validation: The
llmsTxtresult object contains the correct shape (hasLlmsTxt,llmsTxtCount,llmsTxtUrls,detectedIssues). - Persistence validation: When an issue is detected, a POST request is made to
audit-issues/bulkwith the correctissueCodein the payload. - No unnecessary persistence: When no issue is detected, no POST request is made to
audit-issues/bulk.
Related Production Files
toggleGroups/geoAiEngineSignals.js— Contains therunGeoAiEngineSignalsfunction under test.robots-txt-parser.js— Contains thecheckLlmsTxtDirectivefunction that parses thellms.txt:directive from rawrobots.txttext.issueCodes.js— Defines theIssueCode.LLMS_TXT_FILEconstant.
Coverage Summary
- Covers both the positive and negative paths for
llms.txt:directive detection inrobots.txt. - Validates the complete flow: fetching
robots.txt→ parsing the directive → returning the result → persisting the issue when applicable. - Validates that no unnecessary API calls are made when the directive is properly configured.
- Does not cover
llms-full.txt(issue #199) detection, format validation, link validation, size checks, or discovery tag checks — these are tested separately or not yet covered.
References
- llmstxt.org - Official Specification — llmstxt.org
- Answer.AI - Original Proposal — Answer.AI
- Ahrefs - What Is llms.txt? — Ahrefs