---
title: Answers at /ask
description: Set your key and your site answers questions at /ask, from its own pages. Rebilder reads the pages and does the answering. There is nothing to write.
canonical_url: https://rebilder.com/docs/ask
last_updated: "2026-12-04"
---

# [Answers at /ask](https://rebilder.com/docs/ask)

> Set your key and your site answers questions at /ask, from its own pages. Rebilder reads the pages and does the answering. There is nothing to write.

This site answers questions directly. Ask at https://rebilder.com/ask?q=your+question instead of reading more pages.

- **Updated:** 2026-12-04
- **Author:** Rebilder
- **Section:** Getting started
- **Description:** Set your key and your site answers questions at /ask, from its own pages. Rebilder reads the pages and does the answering. There is nothing to write.
- **Publisher:** Rebilder

## Rebilder at a glance

AEO gets you seen. Rebilder gets you heard. When customers ask ChatGPT about your business, your site answers with your real prices and policies.

**Common questions**

- **What does it cost?** Connecting is free. Starter is $49/mo, Pro is $99/mo and Agency is $299/mo. [Pricing](https://rebilder.com/pricing)
- **How does my site answer new questions live?** Rebilder reads your pages, products and policies. When an AI assistant asks, your site answers from them. Nothing on your site changes. [See how it works](https://rebilder.com/autopilot)
- **Can someone trick my site into a wrong price or a discount?** No. Every answer comes from your own pages and is checked against them. If your site does not say it, Rebilder does not say it. [Read security details](https://rebilder.com/security)

**How it compares**

- **Why choose Rebilder?** Choose Rebilder when you want your own site to answer AI assistants with your real facts, and to see who asked. [Compare](https://rebilder.com/compare)

| Compared with | The difference |
| --- | --- |
| Profound, Peec AI, Otterly.ai | These tools watch AI answers and tell you where you show up. Rebilder makes your own site answer when AI comes to check. |
| Cloudflare Markdown for Agents, @vercel/agent-readability, Yoast llms.txt | These tools tidy or map your pages for AI. Rebilder answers from those pages and shows you who asked. |
| Intercom Fin, Tidio Lyro | Chatbots answer the customers who contact you. Rebilder answers the AI assistants that visit your site for them. |
| SEO on its own, Shopify agentic storefronts, Writing an llms.txt yourself | Good SEO, your store platform and a simple llms.txt all help. Here is what Rebilder adds to each. |

Source: [Compare](https://rebilder.com/compare)

## One question, one answer

An agent usually reads one page of a site and leaves. With `/ask` it sends its question to your site and gets the answer back in one request, with the page the answer came from. Your site answers from its own pages, so there are no answers to write and nothing to keep in step.

- Every answer comes from your pages, with a quote and the address of the page it came from.
- Rebilder reads your pages and keeps its copy current as they change.
- A question your pages do not answer gets a plain no.
- Your pages look the same to people and search crawlers.
- If your site already uses `/ask`, set [`askPath`](/docs/ask#how-agents-find-it).

> **Off until your key is set** With no key, the line does nothing. No ask address is advertised, and `/ask` is whatever your site already serves there.

## Turn it on

The setup command writes the line for you, in the config for the framework it finds in your project.

terminal

```bash
npm install @rebilder/gateway @rebilder/events
npx rebilder init --out lib/gateway-config.ts
```

Or add it to a config you already have. `createRebilderAsk` is in `@rebilder/gateway` 0.9.0 and later.

gateway-config.ts

```ts
import { createRebilderAsk, type GatewayConfig } from '@rebilder/gateway'

export const gatewayConfig: GatewayConfig = {
  storeId: 'my-site',
  // Every page gets a markdown copy made from the page your site already serves.
  pages: true,
  // /ask answers questions from this site's own pages.
  ask: createRebilderAsk({ apiKey: process.env.REBILDER_API_KEY }),
}
```

- Create a free account. Your API key is shown once, when you add your site. You can create a new one in [Console → Settings](/console/settings).
- Set it as `REBILDER_API_KEY` where your site runs.
- Deploy. Mount the gateway where it sees `/ask`. In Next.js that means a `proxy.ts` with no `matcher`, or a matcher that covers `/ask`.

Then press **Connect** under Answers on your site in [Console → Connections](/console/install). The first question your site receives connects it too. Rebilder asks your site to confirm, your site confirms with its key, and Rebilder starts reading your pages. It reads them a batch at a time, and each answer uses the pages read so far.

> **Only your site can connect your site** Rebilder reads your pages after your site confirms with its own key, at its own address. To ask, it reads only your `robots.txt` and home page and sends one request to your ask address, which is always on your site. Until your site confirms, your home page names that address, or it is `/ask`. When your site confirms, it names the address itself, and after that only a request made with your key can change it. If a confirmation fails, Rebilder goes back to the address your home page names, or `/ask`. While your site stays connected, Rebilder asks it to confirm again regularly. A key used on another site connects nothing.

## What an agent gets

Take the page from [Automatic pages](/docs/pages#example), a tune-up at $95.00. An agent asks:

terminal

```bash
curl "https://example.com/ask?q=How+much+is+a+tune-up%3F"
```

response

```json
{
  "protocol": "nlweb/0.5",
  "query": "How much is a tune-up?",
  "site": "https://example.com",
  "status": "answered",
  "answer": "Tune-up. A full tune-up for any bike, ready in two days. Price: $95.00.",
  "results": [
    {
      "@type": "WebPage",
      "name": "Tune-up",
      "url": "https://example.com/services/tune-up",
      "description": "Tune-up. A full tune-up for any bike, ready in two days. Price: $95.00 We adjust the gears and brakes, true both wheels and check every bolt.",
      "source": {
        "quote": "Tune-up. A full tune-up for any bike, ready in two days. Price: $95.00 We adjust the gears and brakes, true both wheels and check every bolt."
      },
      "facts": { "Price": "$95.00" }
    }
  ]
}
```

- The reply is JSON by default and markdown when the request carries `Accept: text/markdown`.
- `answer` is the answer in a sentence or two. `results` lists each passage it came from, with the page address in `url`, the passage in `source.quote` and the page’s stated facts in `facts`.
- A question can arrive as `?q=`, as `?query=`, or as a `POST` with `{"query": "..."}`.
- Replies are sent with `Cache-Control: no-store`.

When nothing on your pages answers the question, the reply says so:

response

```json
{
  "protocol": "nlweb/0.5",
  "query": "Do you rent surfboards?",
  "site": "https://example.com",
  "status": "unanswered",
  "answer": null,
  "results": [],
  "message": "No published source on https://example.com answers this question."
}
```

## How agents find it

- The markdown copy an agent gets at a page’s own address carries `Link: </ask>; rel="service-desc"; type="application/json"`, so an agent that reads one page learns it can ask.
- Set `askInvitation: true` and every markdown copy also says so in one line under its title, with the full address. That includes copies at `.md` addresses, which carry a `Link` to the page itself and none to your ask address. A model that is handed only the body of a page reads that line.
- Set `askPath` to serve the answers at another address. The first time, Rebilder asks your site to confirm at the ask address the markdown copy of your home page names, or at `/ask` when it names none. The package answers that request at `/ask` whatever `askPath` says. Your site names its ask address each time it confirms, and Rebilder asks there next.

gateway-config.ts

```ts
import { createRebilderAsk, type GatewayConfig } from '@rebilder/gateway'

export const gatewayConfig: GatewayConfig = {
  storeId: 'my-site',
  pages: true,
  ask: createRebilderAsk({
    apiKey: process.env.REBILDER_API_KEY,
    // How long a question may take, in milliseconds.
    timeoutMs: 6000,
  }),
  // Serve the answers at another address.
  askPath: '/questions',
  // Say in every markdown copy that the site answers questions.
  askInvitation: true,
}
```

| Option | What it does | Default |
| --- | --- | --- |
| `apiKey` | Your API key. Blank or unset turns the line off. | Required |
| `timeoutMs` | How long a question may take before `/ask` answers `503`. Between 500 and 15,000. | `4000` |
| `clientLimit` | How many questions one client may ask in a minute, counted by each server. Past it, `/ask` answers `429` and sends nothing. `0` turns it off. | `30` |
| `clientKey` | Names the client for `clientLimit`. Pass it when a CDN sits in front of your host, or when your host is not Vercel or Cloudflare Workers. The address stays on your server. | The visitor’s address from a known host or CDN header. A request without one is not counted. See [the reference](/docs/reference#gateway-root). |
| `fetch` | A replacement for `fetch`, for a runtime with its own way to make requests. | The runtime’s `fetch` |

## What your site sends

For each question, your site sends Rebilder what is listed here.

| Sent | Why |
| --- | --- |
| The question | To answer it. |
| The asker’s `User-Agent` and `Referer`, and any agent identity the assistant declares in `Signature-Agent` | So your reporting shows which agent asked. |
| The `Accept` header | To reply in JSON or markdown. |
| The name and version of the package | So Rebilder knows the question came through your site. |
| Your API key | To answer from your site and no other. |

> **Nothing else leaves your site** The asker’s cookies, `Authorization` header and network address stay on your server. The reply comes back with its body and content type only.

Each question is counted once in [your reporting](/docs/events), against the agent that asked. Rebilder’s own reads of your pages are never counted as visits.

## What Rebilder reads

Rebilder reads the public pages of your site: the home page, and the pages in your sitemap and `llms.txt`, up to a limit. With [`pages: true`](/docs/pages) it reads the markdown copy of each page, which is a small fraction of the page’s size.

- Every read names itself: `rebilder-index/0.1 (+https://rebilder.com/bots)`.
- It follows your `robots.txt` for every request, and reads it before anything else. Rules for `rebilder-index` come first, then `rebilder-ars`, then `*`. When `robots.txt` closes your site to it, Rebilder sends nothing more. When it closes your ask address, Rebilder reads your home page and does not ask your site to confirm.
- If your `robots.txt` closes `/ask`, open `/ask` to `rebilder-index`, or name your ask address on your home page. Name it the same way when the gateway does not run at `/ask`: set `askPath` to an address the gateway serves and `robots.txt` leaves open, and set `pages: true`. The markdown copy of your home page then names that address, and Rebilder asks your site to confirm there.
- It reads at most two pages at once. When your `robots.txt` sets a `Crawl-delay` for it, it reads one page at a time and waits that long between pages, up to a limit.
- A `429` or `503` tells Rebilder to come back later. It stops reading your site and waits for the time `Retry-After` gives, up to a limit.
- A page marked `noindex` is left out of answers. Rebilder reads the `X-Robots-Tag` header of every response and the robots meta tag of HTML. Copies made with `pages: true` carry the page’s `noindex` for you. A copy your own resolver writes carries no `noindex`, so keep that page out with `robots.txt`.
- Pages are read as an anonymous visitor, with no cookies. No cart, sign-in or account page, nothing under `/api/` and no file is read as a page.
- A read never leaves your site. A redirect to another site is not followed.
- A page that changes is read again and its answers change with it. A page you remove is removed from the answers.

To keep a page out, disallow it in `robots.txt` or mark it `noindex`. See [how Rebilder’s readers identify themselves](/bots).

## When it cannot answer

| Situation | What `/ask` returns |
| --- | --- |
| Your pages do not answer the question | `200` with `status: "unanswered"`. |
| The request has no question | `400` with `error: "missing_query"`. |
| The question is too long to send | `400` with `error: "query_too_long"`. |
| Questions arrive too fast, from one client or from the whole site | `429` with `Retry-After`. |
| Rebilder cannot answer: it cannot be reached in time, or your key is not accepted | `503` with `Retry-After: 30`. |

The hook never throws. Whatever happens to a question, every other address on your site is served exactly as before, unless you set `interceptSearch: true`. Then an agent’s search on your site (`?q=`, `?query=`, `?search=` or `?s=`) is a question too, and gets these replies in place of the search page.

## Turn it off

- Remove the `ask` line, or unset the key, and deploy. `/ask` stops answering and is no longer advertised.
- Press **Turn off** under Answers on your site in [Console → Connections](/console/install). Rebilder deletes the pages it holds for the site and stops reading it until you turn it on again.
- A site that stops confirming its connection is disconnected, and the pages held for it are deleted.
- Change the site’s domain to another site in [Console → Settings](/console/settings) and Rebilder deletes the pages it read from the old one. Connect the site again to answer from the new one.

## Check it

terminal

```bash
curl "https://example.com/ask?q=What+are+your+opening+hours"
curl -H "Accept: text/markdown" "https://example.com/ask?q=What+are+your+opening+hours"
curl -X POST https://example.com/ask -H "Content-Type: application/json" -d '{"query":"What are your opening hours?"}'
curl -s -o /dev/null -D - -H "Accept: text/markdown" https://example.com/ | grep -i '^link'
```

- The first command returns the answer as JSON, the second as markdown.
- The third asks with a `POST`.
- The fourth prints the `Link` header of your home page’s markdown copy, which tells agents where to ask.
- If the fourth prints nothing, your home page has no markdown copy ([when a page has no copy](/docs/pages#no-copy)). Rebilder then asks your site to confirm at `/ask` the first time.

[Console → Connections](/console/install) shows whether the site is connected and how many of its pages are being answered from.