Your licence, in RSL
The machine-readable licence we publish for your site, what it grants, and the one line for your robots.txt.
On this page
Your toll enforces terms: agents pay, people and search engines read free. RSL (Really Simple Licensing) is the open standard for stating those terms in a form a crawler can read before it acts. We generate one for every site from your pricing and the terms you choose.
Your licence lives at https://your-site.example/license.xml, and crawlers
receive it as application/rsl+xml. It is short; read it once, because it is what
an AI company's crawler checks. A browser gets the same document as plain XML so it
displays instead of downloading; that needs @naulon/enforce 0.5.4
or the WordPress plugin 0.5.7
if your own site serves it.
What it says
It states three things, each of which the toll enforces:
Search indexes free. A search permission with <payment type="free"/>.
Your pages stay in Google.
Reading and citing costs money. Permissions for ai-input and ai-index, meaning
using your page to answer a question now or to index it for that purpose, are priced
in USD at exactly what an agent is asked to authorize: your price plus anything the
toll adds. The licence and your 402 show the same number, so a crawler can budget
from the document. Your earnings show your share. If a citation costs more than a
read on your site, it appears as a second priced licence.
Payment is x402. The licence advertises application/x402+json as an
accepted payment method, the protocol your 402 response speaks. A crawler that
reads RSL and speaks x402 can go from "is this licensed?" to "paid" with no human
involved.
What you can add to it
By default it does not mention AI training. A per-page price does not sell a training corpus, and we do not decide that for you.
When you answer Who may read in your site's Site settings, the licence says
what you chose, in RSL's own words, and the toll enforces the same thing. Refusing a
use adds it to the licence's prohibits list and turns the matching crawlers away with
a 403. Making reads free publishes a free licence and the toll stops charging agents.
Selling training by agreement publishes the rights contact you give, so someone knows
who to ask.
Issuing licences through naulon
An RSL crawler can also hold a licence instead of paying each 402 itself. Turn on Issue licences through naulon in your site's Advanced settings and every priced block in your licence names naulon as its licence server:
<content url="/essays/*" server="https://gate.naulon.app/_naulon/olp/example.com">A crawler that follows RSL then gets a licence from naulon before it reads, for free terms too, because the standard asks for one whatever the price. Each read under that licence is charged separately from the crawler's wallet to your authors, at the price your licence states. Nothing is prepaid or pooled. A free section (a carve-out, a static file) names no server.
People and search engines still read free; the toll never asks them for a licence.
How a licensed read is checked depends on what serves your pages:
- naulon serves them. Nothing else to do.
- Your app serves them with the SDK middleware. The middleware asks naulon about each licence a crawler presents, and serves the page only when naulon has charged the read. The crawler must sign its request with the key it registered when it got the licence, because only your server saw the read.
- The WordPress plugin serves them. The plugin does not check licences yet. A crawler holding one gets the same 402 as before and can still pay for the read that way.
Turning it off removes the server from your licence at once.
How crawlers find it
Two ways happen automatically:
- Every response we serve carries a
Linkheader pointing at your licence:Link: <https://your-site.example/license.xml>; rel="license"; type="application/rsl+xml". If your origin already sends its ownLink: rel="license", we leave it alone. - The document is served at a predictable path,
/license.xml, which is the location the standard's own examples use.
If you run the WordPress plugin
Nothing. Version 0.5.0
and later serve /license.xml from your own domain, add the License: line to
your robots.txt, and put a <link rel="license"> in every page head. The plugin
fetches the document with the key it already stores, keeps it for twelve hours,
and refreshes it on its hourly check, so a price change reaches crawlers without
any action from you. Skip the rest of this page.
If your app serves your own pages
The two mechanisms above assume we serve your traffic. With @naulon/enforce in
your own app, we are not in the request path, so we cannot add the header, and you
serve /license.xml.
Nothing, if your middleware runs on that path. From @naulon/enforce 0.5.1,
the config your app fetches to decide the toll carries the licence with it, and
the middleware answers GET /license.xml from it directly, before any toll
decision. There is no route to add, and because it is fetched with your API key it
keeps working if your site id changes. On an older version, upgrade.
One thing to check: if you scope your middleware with a matcher, /license.xml
has to be inside it. In Next.js the default matcher excludes paths with a dot, so
add it explicitly. From @naulon/enforce 0.5.3
the middleware also answers /.well-known/x402, the payment terms every 402 points
an agent at, so keep that path in the matcher too:
export const config = { matcher: ["/((?!_next/static|_next/image).*)", "/license.xml", "/.well-known/x402"] };Pass serveLicense: false if you would rather serve your own document there. A
config with no licence passes straight through, so an existing rewrite is never
shadowed.
Or mount it as a route. If your middleware cannot reach the path, on the same version:
import { serveRslDocument } from "@naulon/enforce";
// the same `source` you passed to the middleware
export const GET = serveRslDocument(source);Or rewrite to the site URL. If you don't run our SDK or plugin, your site's
Licensing section shows a URL of the form
https://gate.naulon.app/_naulon/rsl/<your-site-id>/license.xml; point
/license.xml on your domain at it with a rewrite. In Next.js:
// next.config.js
async rewrites() {
return [{
source: "/license.xml",
destination: "https://gate.naulon.app/_naulon/rsl/<your-site-id>/license.xml",
}];
}It is public, cacheable for a day, and always reflects your current pricing, so a price change needs no redeploy.
The URL names your site id. If the site is deleted and created again, it gets a new id, the old URL returns 404, and your rewrite passes that 404 to every crawler with no visible change on your side. If you run the SDK, let it serve the document instead.
Don't save the document into your app as a static file; a copy stops tracking your pricing.
One step needs you, once. Add this line to your robots.txt:
License: https://your-site.example/license.xmlYour origin serves robots.txt and we pass it through untouched, so we cannot add
this line. Many crawlers read robots.txt and nothing else. Your site's
Licensing section has the exact line for your domain.
Checking it worked
On our regular sweep we fetch your licence the way a crawler would: GET /license.xml on your domain, and your robots.txt for the License: line. Your
site's Licensing section shows a status line for each, with its fix.
For the document, you will see one of these:
- It returns this licence. Done.
- It still returns your previous terms. You changed a price or a setting recently. Every copy we hand out is cached for up to a day, so this clears on its own.
- It returns a licence that hasn't matched your terms for over a day. That is usually a copy of the file saved into your app, or a rewrite pointing at another site's licence. Serve it one of the ways above.
- It returns nothing. If you run the SDK, check the version and your matcher. If you run the WordPress plugin, update it; a caching or security plugin can also block the path. If you rewrite, check the rewrite points at the URL your Licensing section shows today. A login wall in front of your site also looks like this.
For robots.txt, the section says whether the License: line is there. If it
points somewhere other than /license.xml on your domain, we fetch that URL too.
If that returns a licence, it counts as done; we never overwrite terms you stated
first. If it returns nothing, the section says so.
If you toll your whole site
The licence follows your scope. Tolling everything means the priced terms apply
to /, and each section you excluded appears as its own free block. In RSL the
more specific declaration wins, as in the gate. Both come from the same
configuration.
When it changes
The document is generated on request from your current settings, so a price
change is live immediately. It carries max-age="1" (one day) and an HTTP cache
header to match, so a crawler that cached yesterday's terms will re-read within a
day.