domain_llms_txt
6 sites
Security covered
Domain LLMs.txt extends the LLMs.txt module with per-domain support for sites using the Domain Access module. It allows each domain in a multisite setup to serve its own unique /llms.txt file — with separate header content and an independent set of sections per domain.
The llms.txt specification defines a standard way for websites to provide information to Large Language Models (LLMs) such as ChatGPT, Claude, and Gemini. Without this module, all domains in a Domain Access setup share a single /llms.txt file, which is not useful when domains represent different brands, regions, or languages.
Features
- Per-domain header content — each domain gets its own header for the /llms.txt file, stored as a Domain Config override. Supports text formats, so you can use Token Filter to include dynamic tokens in the header.
- Per-domain sections — each llms_txt_section entity is assigned to exactly one domain. Only sections belonging to the active domain appear in that domain's /llms.txt output.
- Draggable section ordering — reorder sections per domain using a familiar drag-and-drop interface.
- Domain operations integration — configuration links ("LLMs.txt Header" and "LLMs.txt Sections") appear directly in the domain operations dropdown on the Domain records page.
- Automatic route override — the module transparently replaces the default /llms.txt controller with a domain-aware version. No additional configuration is needed for the route to work.
Post-Installation
- Go to Admin > Configuration > Domain records (/admin/config/domain).
- In the operations dropdown for any domain, you will see two new links:
- LLMs.txt Header — opens a form where you can edit the header content for that domain's /llms.txt file. Select a text format and enter your content. If your text format has Token Filter enabled, you can use tokens here.
- LLMs.txt Sections — shows a draggable list of sections assigned to that domain. You can reorder them, edit existing sections, or add new ones. Each new section is automatically assigned to the domain you're managing.
- Visit /llms.txt on each domain to verify the output. The file is served as text/markdown and includes the domain-specific header followed by the domain's sections.
- Grant the "Administer llms.txt per domain" permission to the roles that should be able to edit domain-level llms.txt configuration.
Additional Requirements
- Domain Access (including the Domain Config submodule)
- LLMs.txt
Recommended modules/libraries
- Token Filter — enables token replacement inside text format fields. Useful for including dynamic content (e.g., site name, lists of content) in the llms.txt header.
- Domain Config UI — part of the Domain package. While not required, having it enabled provides a consistent admin experience for other per-domain configuration.
Similar projects
- LLMs.txt — the base module that this project extends. Provides a single global /llms.txt file with header and sections, but has no domain awareness.
- Domain Robots.txt — provides a similar per-domain override pattern for robots.txt. Domain LLMs.txt follows the same architectural approach.