When to pick this method over URL Mappings
Pick the Code Injection method in one of three cases: the llms.txt you ship is stable and rarely changes, you want the served file to look as close to plain text as Squarespace allows, or you are running a future strict parser that rejects text/html responses. For most service-business Squarespace sites — where the manifest body changes every time you add a page or restructure pricing — the URL Mappings install on the hub stays the better default because the destination is a real Squarespace page you can edit in the CMS.
The install — three steps
Author the llms.txt body locally as a .txt file. Upload it to Squarespace's File Storage panel — Squarespace puts it at /s/llms.txt automatically. Add an HTML link tag to header Code Injection so crawlers see the file referenced in every page's head. Optionally add a URL Mapping that bridges the canonical /llms.txt to /s/llms.txt so crawlers hitting the root expectation still resolve. Total time: under five minutes, mostly spent finding the File Storage panel.
01. Upload the .txt file to /s/
In a local editor: save your manifest body as llms.txt with UTF-8 encoding. In Squarespace: Settings > Advanced > Custom Files (or Pages > settings cog > Custom CSS > Manage Custom Files, depending on the panel revision). Click Add Custom Files and select your llms.txt. Squarespace writes it to /s/llms.txt and returns the public URL.
02. Advertise the file from the sitemap and the page head
The /s/ upload does not appear in Squarespace's auto-generated sitemap.xml. To make it discoverable from a crawl, advertise it. In Settings > Advanced > Code Injection, add an HTML link tag in the Header panel — one line. Also add a visible link in the site footer with anchor text that names the file. The combined signal: every page in the HTML head references the file, and a crawler scanning footer links sees it as a standard internal link.
03. Bridge the canonical URL with a URL Mapping
The spec assumes /llms.txt at the root. Without a bridge, a crawler hitting /llms.txt on your site gets a 404, then has to discover /s/llms.txt via the link tag or footer link. Add one line in Settings > Advanced > URL Mappings: /llms.txt -> /s/llms.txt 301. Now the canonical URL works too, and the response chain is short: 301 to the /s/ path, 200 with the file body. This single bridge brings the Code Injection install back into compliance with the spec's URL convention.
Trade-offs versus the URL Mappings install
The Code Injection method is harder to edit but produces a closer-to-spec serve. The URL Mappings install on the hub is editable inside the CMS but serves text/html. Both reach the same crawlers via the same canonical /llms.txt URL once the bridge mapping is in place. The decision comes down to update cadence: if the manifest body changes more than twice a year, the URL Mappings install on the hub wins. If it changes less, the Code Injection method is the cleaner artifact.