Suggestions
LLMs.txt Lab logo LLMs.txt Lab

llms.txt Tutorial

Where Should llms.txt Go on a Website?

The recommended location for an llms.txt file is the public root of your website, where visitors can open /llms.txt directly.

Short Answer

Put your llms.txt file at the public site root: https://yourdomain.com/llms.txt. This is the most predictable, crawlable and discoverable location for AI agents and other tools that check for the file.

If your website is installed in a subfolder but served from the main domain, place the file where it loads from the main public URL, not necessarily where the application code lives.

Why the Site Root Is the Best Location

A root URL is easy to guess and easy to verify. A crawler, developer or AI agent can check /llms.txt without needing to search through your navigation. That matters because llms.txt is meant to be a simple convention, not a hidden configuration file.

Root placement also keeps the file close to related machine-readable files such as /robots.txt and /sitemap.xml. Each file has a different purpose, but they all benefit from predictable locations.

What to Do With an llms.txt File After Creating It

After creating the file, your job is to publish, test and maintain it. Many people stop after downloading the file, but the file only helps if it is publicly accessible and up to date.

  1. Download the file from the llms.txt generator.
  2. Validate it with the llms.txt Validator.
  3. Upload it to your public website root folder.
  4. Open https://yourdomain.com/llms.txt in a browser.
  5. Check that the file is not redirected to a login page, blocked by permissions or served as an error page.
  6. Update it when major documentation, product, API or support pages change.

Common Root Folders by Platform

The correct folder depends on your hosting setup. The goal is always the same: the file should load publicly at the root URL.

  • Hostinger or cPanel static/PHP sites: usually public_html.
  • WordPress: usually the folder containing wp-config.php.
  • Laravel: often the public directory, not the project root.
  • Next.js, Astro or static hosting: the public/static folder or final build output folder.
  • Subdomain sites: the root folder for that subdomain, so it loads at https://docs.example.com/llms.txt if the subdomain is the target.

Should llms.txt Be Linked From Your Website?

It is not required, but it can be useful. You can link to /llms.txt from a developer page, documentation footer or AI policy page. This makes the file easier for people to inspect and may help crawlers discover it through normal internal links.

Do not hide important website information only inside llms.txt. The file should summarize and point to public resources, not replace normal pages that users and search engines need.

Common Mistakes to Avoid

  • Uploading the file into the wrong private application folder.
  • Naming it llms.txt.txt by accident.
  • Publishing it at /assets/llms.txt instead of /llms.txt.
  • Blocking the file with server permissions or security rules.
  • Creating the file once and never updating it after site changes.

Frequently Asked Questions

Does llms.txt go on site root or somewhere else?
The best location is the public site root, available as /llms.txt.
What do I do with an llms.txt file?
Validate it, upload it to your root folder, confirm it loads, and keep it updated.
Can llms.txt be inside a subfolder?
It can be, but the root location is more discoverable and easier for tools to find.
Do I need to submit llms.txt anywhere?
Usually no. Make it publicly accessible and link to it where useful.
What should the final URL look like?
For a normal domain, it should look like https://yourdomain.com/llms.txt.