Blog
How to add llms.txt to WordPress and Shopify
Step-by-step ways to add an llms.txt file to a WordPress site (Yoast, Rank Math, upload, or a plugin) and to a Shopify store (the llms.txt.liquid template), plus how to check it works.
Last updated
On WordPress, the quickest way to add llms.txt is your SEO plugin: Yoast SEO and Rank Math can both create and update the file for you. You can also upload a file you wrote to the site's root folder. On Shopify, stores get a default /llms.txt, and you replace it by adding a templates/llms.txt.liquid file to your theme. Whichever way you choose, open yourdomain.com/llms.txt afterwards to check it shows plain text.
New to the file? Read what llms.txt is and what it does first. In short: it lists your most important pages for AI tools, it is cheap to add, and it is not a ranking factor.
WordPress option 1: Yoast SEO
- Update Yoast SEO to the latest version. The feature is in the free plugin.
- Go to Yoast SEO, Settings, Site features, and switch on llms.txt.
- Pick automatic page selection or choose the pages yourself.
Yoast refreshes the file on a schedule. If a real llms.txt file already sits in your site's root folder, Yoast can't create its own until you remove that file.
WordPress option 2: Rank Math
- Update Rank Math, then go to Rank Math SEO, Dashboard.
- Switch on the llms.txt module.
- Open General Settings, Edit llms.txt, and choose which post types to include. Pages set to noindex are left out.
WordPress option 3: upload your own file
- Write the file, or build it in a minute with the free llms.txt generator, which fills it from your own page titles and descriptions.
- Save it as llms.txt (plain text, UTF-8).
- Upload it to the folder that holds wp-config.php, using your host's file manager or SFTP.
A file you upload stays the same until you change it, so update it when you add or remove an important page. Some hosts also create an llms.txt automatically; check whether one exists before you add another.
Shopify: the llms.txt.liquid template
Shopify doesn't let you upload files to the root of your domain, but it now serves a default /llms.txt for stores. To change what it says:
- In Shopify admin, go to Online Store, Themes, then Edit code on your live theme.
- In the Templates folder, add a new template named llms.txt.liquid.
- Paste your llms.txt content (plain Markdown; Liquid tags work if you want to list collections automatically) and save.
- Open yourstore.com/llms.txt and check it shows your version.
Shopify has changed how these AI files work more than once, so check the live address again after theme updates.
Check it works
- Open yourdomain.com/llms.txt in a private window. You should see plain text starting with a # title, not an HTML page or a 404.
- Make sure robots.txt doesn't block AI crawlers, or they won't read the file. The free AI crawler checker tests robots.txt and llms.txt together, and the robots.txt generator for AI crawlers writes the rules if you need to fix them.
- Keep the links in the file pointing at live pages. A file full of dead links does more harm than none.
Let Sonnetpilot keep it up to date
If your WordPress site is connected to Sonnetpilot, it can write llms.txt from your real pages and publish it after you approve, and it never overwrites a file you made yourself. See how the AI search checks work, or run the free SEO, AEO and GEO checker on your homepage.