Generate an llms.txt file for your site
On this page
llms.txt is a typical method for giving AI tools and large language models (LLMs) structured, plain text context about your site. This is similar to how robots.txt gives instructions to search engine crawlers. Learn more about llms.txt.
:::note
Serving llms.txt requires StoreConnect website v21 or later.
:::
Unlike robots.txt, StoreConnect does not auto-generate an llms.txt file for you. You need to create and maintain it yourself using a content page.
How llms.txt works
llms.txt is served through the same mechanism as any other alternate content type on a content page: a Page record with a file extension in its Path field. There is no dedicated llms.txt feature or setting, so you have full control over the file’s content and when it changes. The same mechanism can serve any other on-demand feed an AI tool or answer engine expects, not only llms.txt. See answer engine and generative engine optimization.
Create your llms.txt file
- Go to the Pages list for the store and select New.
- Set the Path field to
llms.txt(no leading/). - Give the record a Title, such as
LLMs.txt, and check Publish the page on the site. - Replace the default
{{ content_page | render_content_blocks }}snippet in the Content Body (Markdown) field (s_c__Body_Markdown__con the Page,s_c__Page__c) with your llms.txt content. Start from the template below. - Save the record.
Open https://shop.example.com/llms.txt in your browser. The file returns as plain text, without the header, footer, or theme wrapper.
To update the llms.txt later, edit the Content Body (Markdown) field on this record.
What you can put in it
The Content Body (Markdown) field is rendered through Liquid, so llms.txt can be generated from live store data instead of maintained as a static file. These store fields are available.
| Field | Returns |
|---|---|
store.name |
The store’s name |
store.url |
The complete URL for the store |
store.domain |
The store’s domain |
store.meta_title |
The Meta Title attribute |
store.meta_description |
The Meta Description attribute |
store.meta_keywords |
The Meta Keywords attribute |
store.currency_code |
The currency code, such as AUD |
store.locale |
The store’s locale |
store.timezone |
The store’s timezone |
store.navigation_categories |
Top-level product categories that can be shown in navigation, each with .name, .path, and .url |
store.staff |
Staff users who assist customers |
store.terms_conditions_page |
The page set up as the terms and conditions page, with .path and .url |
store.home_path, store.search_path |
Link paths for the home and search pages |
store.logo, store.social_image |
The store logo, and the image used when sharing pages |
You can also list catalog and content records with all_products, all_product_categories, all_articles, all_pages, and all_menus. Summarize your catalog by category rather than listing every product.
You can pull values from store variables in the same way.
:::warning
Sample llms.txt content circulating in demo stores uses fields that do not exist: store.description, store.products.count, store.taxonomies.count, store.email, store.phone, and store.hours. A field that does not exist renders blank rather than raising an error, so the page appears to work while serving empty sections to every answer engine that reads it. Check a field against the table above before using it.
:::
Write for answer engines
- Lead with identity. Say what the store is, who it serves, and where it operates. The opening lines carry the most weight.
- Use a clear heading structure. One
#title, then##sections such as About, Product Categories, Key Pages, Policies, and Contact. - State facts plainly. Short declarative sentences. Answer engines extract claims, not marketing copy.
- Link to full URLs, so engines can crawl further and cite you.
- Use Liquid for anything that changes, so the page stays current without being edited.
- Keep it concise. Summarize the catalog by category rather than listing every product.
- Include policies and contact details. Shipping, returns, and support are common high-intent questions.
A template to start from
```markdown
{{ store.name }}
{{ store.meta_description }}
About
{{ store.name }} is an online store{% if store.currency_code %} operating in {{ store.currency_code }}{% endif %}. Visit us at {{ store.url }}.
Product Categories
{% for category in store.navigation_categories %} - {{ category.name }} {% endfor %}
Key Pages
- Home: {{ store.url }}{{ store.home_path }}
- Search: {{ store.url }}{{ store.search_path }} {% if store.terms_conditions_page %}- Terms and Conditions: {{ store.terms_conditions_page.url }}{% endif %}
Contact and Support
For help, visit {{ store.url }} and use the on-site support options. ```
Add your shipping, returns, and support policies as plain statements under their own headings.
:::tip
store.navigation_categories and store.terms_conditions_page both expose .url, which returns a complete URL. Use it instead of joining store.url and .path yourself, which produces a doubled slash when the path already starts with one.
:::
Have an AI agent write it
An agent connected to your store can draft the content from your live catalog and create the Page record for you. See build on StoreConnect using AI agents.
Replace some of the details in the sample prompt below, then provide it to your AI agent. Copy and paste the Markdown it returns into Content Body (Markdown) in the llms.txt file you created above.
```text
ROLE You are writing a StoreConnect store’s llms.txt so AI answer engines (ChatGPT, Perplexity, Claude, Google AI Overviews) describe and cite the store accurately.
HOW IT WORKS - llms.txt is a Page record with the Path “llms.txt”. Its Content Body (Markdown) field accepts Markdown with Liquid. - The server evaluates the Liquid and returns the Markdown as plain text. The body is the output, word for word. - The deliverable is the Content Body (Markdown) content. No code changes.
USE ONLY THESE FIELDS (anything else renders blank) store.name, store.url, store.domain, store.meta_title, store.meta_description, store.meta_keywords, store.currency_code, store.locale, store.timezone, store.navigation_categories (each with .name, .path and .url), store.staff, store.terms_conditions_page, store.home_path, store.search_path, store.logo, store.social_image Catalog and content lookups: all_products, all_product_categories, all_articles, all_pages, all_menus. Prefer categories over listing every product.
DO NOT USE store.description, store.products, store.email, store.phone, store.hours, store.taxonomies. These do not exist and render blank.
GUIDELINES - Open with what the store is, who it serves, and where it operates. - Plain declarative facts, no marketing copy. - One # title, then ## sections: About, Product Categories, Key Pages, Policies, Contact. - Use the .url property for links rather than joining store.url to a path. - Concise. Summarize the catalog by category. - Use Liquid for anything that changes.
STORE DETAILS (fill these in) - Store name and what it sells: - Who it serves, and the regions it ships to: - Key categories or specialties: - Shipping, returns, and support highlights: - Anything answer engines currently get wrong:
TASK Write the complete Content Body (Markdown) for llms.txt, mixing factual fixed copy with the fields above. Return only the Markdown body, ready to paste. After it, list any assumptions you made or store facts that still need confirming. ```
Check the result
Visit https://shop.example.com/llms.txt after saving. You should see your headings and real values, with no blank lines where a field should be.
- A blank value almost always means a field that does not exist. Check it against What you can put in it.
- A not-found page means the Page record is missing, has a different Path, or does not have Publish the page on the site checked.
- A themed web page rather than plain text means the Path is missing its
.txtextension.
Remove llms.txt
Delete the Page record with the Path llms.txt, or clear its Content Body (Markdown). Removing the page means requests to llms.txt return a 404, and there is no auto-generated fallback.
llms.txt and stealth mode
llms.txt and Stealth mode work in opposite directions: llms.txt gives AI tools content to read, while stealth mode tells crawlers to stay away.
Enabling stealth mode does not take your llms.txt page offline. Stealth mode only suppresses robots.txt, the sitemap, and merchant feeds. A custom llms.txt content page is not on that list, so anyone who requests the URL directly still receives the file. What changes is that compliant crawlers no longer read or index it:
- Stealth mode’s robots.txt returns
Disallow: /, which instructs compliant crawlers not to request any path on the store, including/llms.txt. - Every response from the store, including
/llms.txt, carries anX-Robots-Tag: noindex, nofollowheader, which instructs compliant crawlers not to index the content.
In short, stealth mode leaves the file readable but tells well-behaved AI crawlers not to fetch or index it. If your goal is to block AI crawlers from your store, use stealth mode. An llms.txt file cannot do this; it provides information to AI tools, it does not control their access.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.