How to add llms.txt to squarespace​

To add an llms.txt file to Squarespace, you must upload the file to your asset manager and then use URL Mappings to create a 301 redirect from yourdomain.com/llms.txt to the file's actual CDN storage path. Because hosted platforms like Squarespace or Shopify do not offer direct root directory access, this redirect method safely mimics a traditional root upload, allowing LLM scrapers to easily discover your AI instruction file.

Here is the step-by-step guide to setting it up.

Steps to Add llms.txt to Squarespace

You need to prepare a llms.txt file for uploading to Squarespace

Step 1: Prepare and Upload Your File

  1. Create your llms.txt file locally on your computer.

  2. Go to your Squarespace dashboard and navigate to Pages (/config/pages).

  3. Click the Plus (+) icon next to Main Navigation and select Link.

  4. Click the gear icon, choose File in the Link Type dropdown, and upload your llms.txt file.

  5. Exit the Link Editor without saving because we are using the Link Manger as a gateway for file upload only.

Your file is now safely hosted on Squarespace at yoursite.com/s/llms.txt.

Link manager mimics Squarespace root directory upload

Link manager mimics Squarespace root directory upload

Step 2: Trace the Real CDN URL

While the uploaded file is accessible at /s/llms.txt, this path is actually a 302 redirect to its Static URL. Squarespace hosts all uploaded files as static assets on its CDN. You need to trace the file to its source URL to get the real path of the file on the CDN.

Get the real URL of the uploaded file using a URL tracing tool like WhereGoes or Beyondspace Redirection tracer

  • In the trace URL input, enter your file.txt path, e.g., https://yoursite.com/s/llms.txt, and click "Trace URL".

  • Once tracking is complete, copy the real URL of the uploaded file.

Trace Squarespace static asset URL

Trace Squarespace uploaded llms.txt

Step 4: Create a Redirect in URL Mappings

Create new URL mapping

  • The redirection will be in this format /llms.txt -> {real-file-path} 301.

  • If you used Beyondspace Redirection tracerto trace the redirection, simply copy the redirection in Root Directory Redirection after the trace completed.

Copy root redirection

Copy Squarespace llms.txt root redirection

Add new redirection in URL Mappings

  • Go to Settings > Developer Tools > URL Mappings in your Squarespace dashboard.

  • Insert a new line and place the redirection as new line

  • Press Save.

Setting up URL mappings

Setting up URL mappings

Step 5: Verify llms.txt file on Squarespace

You can verify the llms.txt file using tool like llmstxtchecker.net to check if the file can be found on your Squarespace website.

The video below shows all step-by-step

How This Works

Some services accept redirections. By setting up a redirect, we simulate the presence of the llms.txt file in the root directory. Google, for example, explicitly states in their documentation that they support redirects for ads.txt files.

Google documentation on redirects

Google supports a single HTTP redirect to a destination outside the original root domain (e.g., example1.com/ads.txt redirects to example2.com/ads.txt). Multiple redirects are also supported as long as each redirect location remains within the original root domain. This is why tracing the source is crucial since the initial upload creates a 302 redirect, and by pointing directly to the CDN source, we create a single redirect.

https://yoursite.com/llms.txt
—> https://static1.squarespace.com/.../llms.txt
— Squarespace CDN single redirect

Frequently asked questions

Question: Where is the root directory in Squarespace?

Squarespace doesn’t operate with a traditional root directory like tradditional hosting. Files uploaded to your Squarespace site are stored as static assets on its Content Delivery Network (CDN) rather than at the top-level domain. These files are accessible through specific URLs, not directly from a root folder.

Question: How to upload an llms.txt File to Squarespace?

Since Squarespace does not offer direct access to a root directory, you can achieve the exact same functionality by uploading the file via the Link Manager and using URL Mappings to simulate its placement at the root domain (/llms.txt)

Question: How to upload an llms.txt File to Squarespace?

Yes. Much like Google's crawlers handle redirects for ads.txt, major LLM scrapers and search bots follow standard HTTP 301 redirects to find configuration files. Setting up a single redirect to Squarespace's CDN ensures they can read your context and permissions without issue.

Conclusion

While Squarespace doesn't provide a traditional root directory, you can easily meet the requirements for AI instructions (llms.txt) by using 301 redirects. This approach keeps your site compliant with evolving web standards and AI protocols without relying on complex external hosting setups.

Beyondspace

As a Squarespace Circle member, Beyondspace delivers plugins that elevate your website, streamline workflows, and optimize the Editor experience—saving time and driving engagement.

https://beyondspace.studio
Next
Next

How to display super high-res images on Squarespace