# Connecting your file

Agents look for `llms.txt` at the root of your domain (`https://yoursite.com/llms.txt`). We host the always-current copy; you bridge it to your root one of two ways.

Both snippets use your site's URLs (find the `siteId` in **[Account → Managed sites](/account/sites)**, under "How to serve this from your domain").

## Option A — Edge rewrite (recommended)

Add one rule so your `/llms.txt` transparently serves our copy. Set it once; our schedule keeps the content fresh. Lowest effort, and genuinely always-current.

**Vercel** (`vercel.json`)

```json
{
  "rewrites": [
    { "source": "/llms.txt", "destination": "https://llms-txt.io/s/<siteId>/llms.txt" }
  ]
}
```

**Netlify** (`_redirects` — the `200` makes it a rewrite, not a redirect)

```text
/llms.txt  https://llms-txt.io/s/<siteId>/llms.txt  200
```

**Nginx**

```nginx
location = /llms.txt {
  proxy_pass https://llms-txt.io/s/<siteId>/llms.txt;
}
```

**Cloudflare Worker**

```js
if (new URL(request.url).pathname === "/llms.txt")
  return fetch("https://llms-txt.io/s/<siteId>/llms.txt")
```

::callout{type="note"}
This keeps a small runtime dependency on us. An `llms.txt` is the lowest-stakes endpoint on your site — if it's briefly unavailable, an agent simply re-checks later — and our copy is edge-cached.
::

## Option B — Webhook → commit (no runtime dependency)

Prefer to serve the file from your own infrastructure? Set a **Webhook URL** on the site (in Edit). We POST it whenever the content changes; your handler writes the file into your repo/build and commits it.

The payload includes the file contents, so you can write them directly:

```json
{
  "siteId": "<siteId>",
  "url": "https://yoursite.com",
  "changed": true,
  "generatedAt": "2026-06-15T03:00:00.000Z",
  "files": {
    "llms.txt": "https://llms-txt.io/s/<siteId>/llms.txt",
    "llms-full.txt": "https://llms-txt.io/s/<siteId>/llms-full.txt"
  },
  "llmsTxt": "# Your site\n…",
  "llmsFullTxt": "# Your site\n…"
}
```

We only fire the webhook when the generated content actually **changed**, so a no-op refresh won't spam your CI.

## Which should I pick?

- **Want it effortless and always live?** Use the **edge rewrite**.
- **Can't take any runtime dependency?** Use the **webhook** and serve the committed file yourself.
