Step-by-Step Guide 10 min read

How to Deploy llms.txt on Any Platform

You have the file. Now put it where AI can find it. Platform-by-platform deployment instructions — from static hosting to WordPress to Nginx.

Where Does llms.txt Go?

Your llms.txt file must be accessible at the root of your domain:

https://yourdomain.com/llms.txt

No subdirectory. No query parameters. No redirect chains. Must return 200 with text/plain content type. Defined by the llms.txt specification.

Not sure what goes inside the file? Create your llms.txt first, then come back here.

Deploy by Platform

Static File Upload (FTP/SFTP)

GoDaddy, Bluehost, Hostinger, DreamHost — any traditional host

  1. Connect via FTP client (FileZilla, Cyberduck, or your host's file manager)
  2. Navigate to your document root — usually public_html/, www/, or htdocs/
  3. Upload llms.txt alongside your existing robots.txt
  4. Verify: visit https://yourdomain.com/llms.txt

Simplest method. If your host supports FTP, use this.

WordPress

WP Engine, Kinsta, self-hosted, managed — all covered

WordPress has 4 deployment methods depending on your setup. Our dedicated guide covers all of them:

  • Direct file upload via FTP or file manager
  • Plugin-based deployment
  • Theme functions.php route
  • .htaccess rewrite rules

Shopify

Shopify doesn't allow root file uploads — workarounds needed

Shopify doesn't let you upload arbitrary files to your domain root. Two options:

  1. Shopify Pages method — serve content at /pages/llms-txt
  2. Cloudflare proxy — rewrite the URL so /llms.txt serves the page content
Full Shopify guide →

Vercel

Drop llms.txt into your public/ directory. Vercel serves it from the root automatically.

your-project/
  public/
    llms.txt      ← yourdomain.com/llms.txt
    favicon.ico
  src/
    ...

For dynamic generation, add a rewrite in vercel.json:

{
  "rewrites": [
    { "source": "/llms.txt", "destination": "/api/llms-txt" }
  ]
}

Netlify

Place llms.txt in your publish directory — public/, dist/, or build/ depending on your framework.

Optional: set explicit headers in netlify.toml:

[[headers]]
  for = "/llms.txt"
  [headers.values]
    Content-Type = "text/plain; charset=utf-8"
    Cache-Control = "public, max-age=86400"

Next.js

Static: Place in public/llms.txt. No config needed.

Dynamic: Create an API route for CMS-driven content:

// app/llms.txt/route.ts
export async function GET() {
  const content = `# Your Site Name
> A brief description of your site.

## Core Pages
- [Home](https://yourdomain.com): Main landing page
`;
  return new Response(content, {
    headers: {
      'Content-Type': 'text/plain; charset=utf-8',
      'Cache-Control': 'public, max-age=86400',
    },
  });
}

SvelteKit

Place in static/llms.txt. SvelteKit serves everything in static/ from the root.

For dynamic generation:

// src/routes/llms.txt/+server.ts
export async function GET() {
  const content = `# Your Site Name
> Your site description.
`;
  return new Response(content, {
    headers: { 'Content-Type': 'text/plain; charset=utf-8' },
  });
}

Nginx

Add a location block to your server config:

location = /llms.txt {
    root /var/www/yourdomain;
    default_type text/plain;
    add_header Cache-Control "public, max-age=86400";
}

Place llms.txt at /var/www/yourdomain/llms.txt, then sudo nginx -t && sudo nginx -s reload.

Apache

If your file is in the document root, Apache serves it automatically. To set the MIME type explicitly, add to .htaccess:

<Files "llms.txt">
    ForceType text/plain
    Header set Cache-Control "public, max-age=86400"
</Files>

Cloudflare Pages

Drop llms.txt into your output directory (public/, dist/, or build/). Cloudflare serves static files from the root and sets text/plain for .txt files by default.

GitHub Pages

Place llms.txt at the root of your repo (or docs/ if that's your publishing source).

Jekyll sites: Add llms.txt to the include list in _config.yml, otherwise Jekyll ignores files without front matter:

include:
  - llms.txt

Verify Your Deployment

1. Browser check

Visit https://yourdomain.com/llms.txt directly. You should see plain text. If you see a 404, the file isn't in the right location.

2. curl check

curl -I https://yourdomain.com/llms.txt

Look for: HTTP/2 200, content-type: text/plain, no location: header (no redirects).

3. Use our validator

Run your domain through our free AI SEO Check. It verifies your llms.txt is reachable, validates the format, and scores your AI readiness across 5 factors. For ongoing verification, our Site Monitoring feature detects when your site content changes and flags when your llms.txt needs updating.

Troubleshooting

404 Not Found

  • Wrong directory. File must be in your document root, not a subdirectory.
  • Case sensitivity. Must be lowercase: llms.txt, not LLMS.txt.
  • Framework routing. Some frameworks intercept all routes. Static files in public/ should bypass this.
  • Security plugin. WordPress security plugins may block .txt files.

Wrong content type

Returns text/html instead of text/plain? Your server is rendering the file through a template engine. Serve it as a static file, not through PHP/Node.

Redirect instead of direct response

HTTPS redirects are fine. Multiple redirect chains are not — AI crawlers may not follow them. Keep it to one redirect max.

CDN caching stale content

Purge the CDN cache after updating. Set Cache-Control: public, max-age=86400 (24h) — aggressive caching isn't needed for a small text file.

Frequently Asked Questions

Generate and Deploy in Under a Minute

Enter your domain and we'll scan your sitemap, analyze your pages, and produce a spec-compliant file ready to deploy. Free to start.

Generate Your llms.txt

Want to see what a good llms.txt looks like? Browse 840+ real examples.