LTLLMTXT.co
Drupal Guide

How to Add llms.txt to Drupal

Drupal is self-hosted, so you have full filesystem access — which makes adding a llms.txt file about as simple as it gets. It sits in your docroot right next to the robots.txt Drupal already ships, and the default rewrite rules serve it without any extra work.

https://

Generate the content

Start by generating the Markdown. Our tool reads your live pages and drafts a clean llms.txt. Enter your domain, review the output, and download it before uploading to your docroot.

Generate your file:

https://

Writing the file by hand

Prefer to author it yourself? The llms.txt format is plain Markdown — an H1 title, a summary blockquote, and grouped links pointing at your canonical Drupal URLs:

# Your Organization

> One or two sentences describing what your
> Drupal site offers and who it serves.

## Sections
- [Services](https://yourdomain.com/services): Overview.
- [Programs](https://yourdomain.com/programs): Details.

## Resources
- [News](https://yourdomain.com/news): Updates.
- [Documentation](https://yourdomain.com/docs): Guides.

## Organization
- [About](https://yourdomain.com/about): Mission and team.
- [Contact](https://yourdomain.com/contact): How to reach us.

Save it as plain text named llms.txt using a code editor, not a word processor that injects hidden formatting.

Where to place the file

Upload it to your Drupal docroot — the folder your web server treats as the site root. On a modern Composer-based Drupal that is typically web/; on older layouts it is the project root. It should sit beside these files:

  • index.php — Drupal's front controller
  • robots.txt — the crawler-access file Drupal ships
  • .htaccess — the Apache rewrite rules

The final URL should be:

https://yourdomain.com/llms.txt

Why no config change is needed

Drupal's shipped .htaccess only hands a request to Drupal when the requested path is not an existing file. The relevant rule is:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]

Since llms.txt is a real file, the !-f condition fails and Apache serves it directly. If your site runs Nginx, most Drupal Nginx configs already include a try_files directive that serves existing files first; if not, add:

location = /llms.txt {
    default_type text/plain;
    try_files /llms.txt =404;
}

Verify it works

1

Open the URL

Visit https://yourdomain.com/llms.txt. You should see plain-text Markdown, not a themed Drupal page or a 404.

2

Confirm the content type

curl -I and confirm a 200 served as text/plain. If it renders as HTML, an upstream proxy or a module may be intercepting the path.

3

Check the links

Every URL in the file must resolve to a live node or page. Fix any that 404 or redirect unexpectedly.

4

Run a visibility check

Use our AI Visibility tool to confirm the file is reachable and parseable from outside your server.

Frequently Asked Questions

Where exactly does llms.txt go in a Drupal install?

In the docroot — the folder Apache or Nginx points at as the site root. On modern Drupal that is usually the web/ directory (or the project root on older layouts), the same place robots.txt, index.php, and the .htaccess file live. Drop llms.txt there and it is served at /llms.txt.

Do I need to change .htaccess?

Usually not. Drupal's shipped .htaccess only routes a request to index.php when the requested file does not physically exist (RewriteCond %{REQUEST_FILENAME} !-f). Because llms.txt is a real file on disk, Apache serves it directly before Drupal ever runs. The same logic applies to the robots.txt Drupal already ships.

Will a Drupal update overwrite the file?

A core update can touch shipped files like .htaccess and default robots.txt, but it will not delete a custom file you added such as llms.txt. Still, keep a copy in version control so you can restore it quickly if a deployment process rebuilds the docroot from scratch.

Should I use a module instead?

You can, but it is rarely necessary. The file is static and small. A module makes sense only if you want to edit it from the admin UI or generate it from your content model. If you go that route, confirm the module is actively maintained for your Drupal version before relying on it.

Does publishing llms.txt guarantee AI systems will use it?

No. As of mid-2026 llms.txt is a proposed, advisory standard with no enforcement, and support varies across AI systems. There is no guarantee any model will fetch or act on it. It is a sensible, low-effort signal rather than a guarantee.

Generate Your llms.txt for Drupal

Enter your domain and get a ready-to-upload llms.txt file for your Drupal docroot.

https://